from medpy.io import load
import SimpleITK
import vtk
image_data, image_header = load('/Users/N01-T2.mha')
print image_data.shape
Et l'erreur est:LazyITKModule » objet n'a pas d'attribut 'AnalyzeImageIO'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/wuzhenglin/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile
execfile(filename, namespace)
File "/Users/wuzhenglin/anaconda/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
builtins.execfile(filename, *where)
File "/Users/wuzhenglin/Python_nice/SAL_LUNG/test.py", line 140, in <module>
changeage()
File "/Users/wuzhenglin/Python_nice/SAL_LUNG/test.py", line 42, in changeage
image_data, image_header = load('/Users/wuzhenglin/Python_nice/SAL_BRAIN/brain_healthy_dataset/Normal001-T2.mha')
File "/Users/wuzhenglin/anaconda/lib/python2.7/site-packages/medpy/io/load.py", line 201, in load
raise err
medpy.core.exceptions.ImageLoadingError: Failes to load image /Users/wuzhenglin/Python_nice/SAL_BRAIN/brain_healthy_dataset/Normal001-T2.mha as
Itk/Vtk MetaImage (.mhd, .mha/.raw). Reason signaled by third-party module:
'LazyITKModule' object has no attribute 'AnalyzeImageIO'
Je veux traiter .mha image, mais il ne fonctionne pas. J'ai installé medpy, itk et vtk.
J'ai cherché sur Google, mais il n'y a pas de réponse à ce problème.
.mha devrait invoquer MetaImageIO, pas AnalyzeImageIO. Peut-être signaler cela comme un problème sur tracker problème de medpy: https://github.com/loli/medpy/issues –
@ Dženan Merci, j'ai signalé le problème et avez-vous d'autres façons de faire face à image.mha avec Python? – JourneyWoo