Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I use medpy.io.load to read .nii files,it always wrong. #92

Closed
Alagirl opened this issue Jul 28, 2019 · 1 comment
Closed

When I use medpy.io.load to read .nii files,it always wrong. #92

Alagirl opened this issue Jul 28, 2019 · 1 comment

Comments

@Alagirl
Copy link

Alagirl commented Jul 28, 2019

my code is following:
img, img_header = load(args.data + '/myTrainingData/volume-' + str(idx) + '.nii')

The path is absolutely path.It always show
Traceback (most recent call last):
File "/home/zhounan/PycharmProjects/H-DenseUNet/train_2ddense.py", line 217, in
train_and_predict()
File "/home/zhounan/PycharmProjects/H-DenseUNet/train_2ddense.py", line 186, in train_and_predict
trainidx, img_list, tumor_list, tumorlines, liverlines, tumoridx, liveridx, minindex_list, maxindex_list = load_fast_files(args)
File "/home/zhounan/PycharmProjects/H-DenseUNet/train_2ddense.py", line 142, in load_fast_files
img, img_header = load(os.path.join(args.data, 'myTrainingData/volume-' + str(idx) + '.nii'))
File "/home/zhounan/anaconda3/envs/py27/lib/python2.7/site-packages/medpy/io/load.py", line 113, in load
sitkimage = sitk.ReadImage(image)
File "/home/zhounan/anaconda3/envs/py27/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 8876, in ReadImage
return _SimpleITK.ReadImage(*args)
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:107:
sitk::ERROR: Unable to determine ImageIO reader for "/home/zhounan/PycharmProjects/H-DenseUNet/data/myTrainingData/volume-1.nii"

what's wrong with it?

@loli
Copy link
Owner

loli commented Aug 23, 2019

Unrelated to MedPy.

@loli loli closed this as completed Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants