[Neuroimaging] [Nibabel] Public dataset generates unexpected
matthew.brett at gmail.com
Sun Sep 10 17:02:31 EDT 2017
On Sun, Sep 10, 2017 at 9:04 PM, Eleftherios Garyfallidis
<elef at indiana.edu> wrote:
> Clearly the title was meant to be "Public dataset generates unexpected
> affine matrix" :)
> On Sun, Sep 10, 2017 at 1:31 PM Eleftherios Garyfallidis <elef at indiana.edu>
>> Hello Matthew and all,
>> I downloaded a dataset from NITRC by Boekel et al.
>> and I used nibabel to get the affine and voxel size. The authors claimed
>> that the voxel size is 2x2x2mm^3 however the affine tells a different story.
>> import nibabel as nib
>> img = nib.load('pp26_dwi_run01_A.nii.gz')
>> [[ -1.999 0.047 0.077 108.292]
>> [ 0.042 1.984 -0.471 -94.461]
>> [ 0.047 0.251 3.703 -116.857]
>> [ 0. 0. 0. 1. ]]
>> array([ 2. , 2. , 3.733])
>> The zoom function gives a different answer in agreement with the authors'
>> (2.0, 2.0, 2.0)
>> Could it be that the authors damaged the header during preprocessing?
>> I am assuming here that nibabel is bringing the correct information i.e.
>> whatever is in the Nifti1 image.
>> If you agree that this is an issue with the data itself. It would be nice
>> to contact the authors.
So - it looks like the authors have modified the sform field to set a
new affine matrix. You can check with e.g. "print(img.header)"
Maybe when they say "voxel size" they mean the values set in the
"pixdim", specifically? Anyway, if I were the authors, I would want
to know about the discrepancy. I think you can give them all the
details with the information from "print(img.header)"?
More information about the Neuroimaging