Dear FSL experts,
I use the package in ${FSLDIR}/etc/matlab to read and process NIFTI image.
img1=read_avw(file1);
img2=read_avw(file2);
...
After calculating and processing from img1, img2 .... I have imgResult, which has the save dimension with the input. However, when I try to save this matrix to NIFTI format with
save(imgResult, filename, 'f', [1 1 2 1]); % 1 1 2 is the voxel size, and the last 1 is TR=1
The result nii.gz file header does not contain enough information, eg when loaded with fslview, there is no orientation marker (S,I,A,P,L,R), the cursor widget also display incorrect cursor position in mm.
Can any one point out what I may miss during the transformation from matrix to NIFTI or how can I add the correct information to the NIFTI header.
Any help would be much appreciated.
Best regards,
Khoi
|