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

run main_data_generation.py occurred error #13

Open
zhenyezi opened this issue May 26, 2017 · 1 comment
Open

run main_data_generation.py occurred error #13

zhenyezi opened this issue May 26, 2017 · 1 comment

Comments

@zhenyezi
Copy link

run main_data_generation.py occurred error:

./datasets/miccai/2/mri/1004_3.nii
Traceback (most recent call last):
File "main_data_generation.py", line 16, in
generate_and_save(data_cf)
File "/home/zhenye/brain_segmentation-master/data_brain_parcellation.py", line 336, in generate_and_save
ds.populate_from_config(config)
File "/home/zhenye/brain_segmentation-master/data_brain_parcellation.py", line 283, in populate_from_config
data_generator.init_from_config(config)
File "/home/zhenye/brain_segmentation-master/data_brain_parcellation.py", line 66, in init_from_config
self.__init_common()
File "/home/zhenye/brain_segmentation-master/data_brain_parcellation.py", line 84, in __init_common
mri = nib.load(mri_file).get_data().squeeze()
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/loadsave.py", line 45, in load
return image_klass.from_filename(filename, **kwargs)
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/keywordonly.py", line 17, in wrapper
return func(*args, **kwargs)
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/analyze.py", line 1001, in from_filename
return klass.from_file_map(file_map, mmap=mmap)
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/keywordonly.py", line 17, in wrapper
return func(*args, **kwargs)
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/analyze.py", line 971, in from_file_map
img._affine = header.get_best_affine()
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/nifti1.py", line 731, in get_best_affine
return self.get_qform()
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/nifti1.py", line 915, in get_qform
quat = self.get_qform_quaternion()
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/nifti1.py", line 890, in get_qform_quaternion
return fillpositive(bcd, self.quaternion_threshold)
File "/home/zhenye/.local/lib/python2.7/site-packages/nibabel/quaternions.py", line 99, in fillpositive
raise ValueError('w2 should be positive, but is %e' % w2)
ValueError: w2 should be positive, but is -6.401211e-07

so I want to ask anyone has been mat this problem and how to solve it ? Thank you !

@ataldim
Copy link

ataldim commented Feb 23, 2018

I am stuck at the same spot. Did you manage to resolve the problem?

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