brain_segmentation icon indicating copy to clipboard operation
brain_segmentation copied to clipboard

run main_data_generation.py occurred error

Open zhenyezi opened this issue 7 years ago • 1 comments

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 !

zhenyezi avatar May 26 '17 13:05 zhenyezi

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

ataldim avatar Feb 23 '18 10:02 ataldim