Hi,
I was trying to create affine matrix from DICOM file and compared with the one created by mri_convert.
For T1 image, if I use mri_convert
mri_convert -it dicom [in filename] -ot nii [out filename]
The affine matrix (srow*) part get from load_nii_hdr.m command is
Affine I:
srow_x: [0 0 -1.2000 92.2031] srow_y: [-1 0 0 132.7965] srow_z: [0 -1 0 131.8291]
which is the same affine matrix I got directly from DICOM file according to the description in nifti header doc.
However, if I use
mri_convert -it dicom [in filename] -ot nii [out filename] -out_orientation PRS
The affine matrix (srow*) part get from load_nii_hdr.m command is
Affine II:
srow_x: [1 0 0 -123.7969] srow_y: [0 -1 0 140.7965] srow_z: [0 0 1.2000 -92.1709]
That I do not know how to create. I know the orientation is changed from PSR (T1 sag original) to RPS (specified in out_orientation). Could you tell me what I can do in order to obtain an affine matrix II from affine I?
Thanks.
Jun
Jun, the "--out_orientation" is probably not what you want. As the documentation says,
NOTE: THIS IS ONLY TO BE USED WHEN THE ORIENTATION INFORMATION IN THE INPUT FILE IS *WRONG*. IF IT IS CORRECT, THIS WILL MAKE IT WRONG!
if you're starting with dicom, it is very probably right. Is there a reason you think it would be wrong. What are you trying to do?
doug
Xu, Jun wrote:
Hi,
I was trying to create affine matrix from DICOM file and compared with the one created by mri_convert.
For T1 image, if I use mri_convert
mri_convert –it dicom [in filename] –ot nii [out filename]
The affine matrix (srow*) part get from load_nii_hdr.m command is
Affine I:
srow_x: [0 0 -1.2000 92.2031]
srow_y: [-1 0 0 132.7965]
srow_z: [0 -1 0 131.8291]
which is the same affine matrix I got directly from DICOM file according to the description in nifti header doc.
*However,* if I use
mri_convert –it dicom [in filename] –ot nii [out filename]
–out_orientation PRS
The affine matrix (srow*) part get from load_nii_hdr.m command is
Affine II:
srow_x: [1 0 0 -123.7969]
srow_y: [0 -1 0 140.7965]
srow_z: [0 0 1.2000 -92.1709]
That I do not know how to create. I know the orientation is changed from PSR (T1 sag original) to RPS (specified in out_orientation). Could you tell me what I can do in order to obtain
an affine matrix II from affine I?
Thanks.
Jun
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu