Replies: 1 comment
-
Hello this issue has been raise several times, (I can not find the corresponding issue) but it was solved ... there is a tolerance parameter, to make the consistency check more tolerant, (but not sure how to change it) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
Since my image and label do not have the identical affine I can not use the dataloader. However they are more or less the same.
Is there a way to 1) either increase the tolerance? 2) to copy the affine of the image?
Error Message:
RuntimeError: More than one spacing found in subject images:
{'label': (0.8984375000000001, 0.8984375, 6.599999904632569),
't1_km': (0.8984375, 0.8984375000000001, 6.599999904632568),
't1_native': (0.8984375, 0.8984375000000001, 6.599999904632568)}
Probably the mistake:
import nibabel as nib
a = nib.load('t1_native.nii.gz')).affine
b = nib.load('t1_km.nii.gz')).affine
c = nib.load('label.nii.gz')).affine
In:
a == b
Out:
array([[ True, True, True, True],
[ True, True, True, True],
[ True, True, True, True],
[ True, True, True, True]])
In:
a == c
Out:
array([[False, False, False, True],
[False, False, False, True],
[False, False, False, True],
[ True, True, True, True]])
Beta Was this translation helpful? Give feedback.
All reactions