I have a nii image with dimension 39*305*305(may be radiological convention). I think I need to swap the dimensions (change to neurological) so that the number of slices is 39 and the new dimension is 305*305*39.Please verify the following
img = readNIfTI("Sub1.nii") //commands in R
print(img)
NIfTI-1 format
Type : nifti
Data Type : 4 (INT16)
Bits per Pixel : 16
Slice Code : 0 (Unknown)
Intent Code : 0 (None)
Qform Code : 1 (Scanner_Anat)
Sform Code : 0 (Unknown)
Dimension : 39 x 305 x 305
Pixel Dimension : 2 x 1.25 x 1.25
Voxel Units : Unknown
Time Units : Unknown
fslorient -deleteorient Sub1.nii
fslswapdim Sub1.nii z -y -x image.nii
fslorient -setqformcode 1 image.nii
img = readNIfTI("image.nii") //commands in R
print(img) //command in R gives the following
NIfTI-1 format
Type : nifti
Data Type : 4 (INT16)
Bits per Pixel : 16
Slice Code : 0 (Unknown)
Intent Code : 0 (None)
Qform Code : 1 (Scanner_Anat)
Sform Code : 1 (Scanner_Anat)
Dimension : 305 x 305 x 39
Pixel Dimension : 1.25 x 1.25 x 2
Voxel Units : mm
Time Units : sec
|