Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Community » Message Board

History of AFNI updates   Suggested reading for beginners   Add yourself to the AFNI map!

|
April 27, 2012 10:35PM
Hi,

I tried both Dimon and dcm2nii to convert Siemens DICOM data to NIFTI format. Then I used fslhd in FSL to compare the qform and sform and found large discrepancy in the NIFTI header generated by the two converters. The rotation matrix were quite similar although not exactly the same. The offset coordinates were quite different.

For example, the geometric information of a NIFTI image converted by Dimon was:

qform_name Scanner Anat
qform_code 1
qto_xyz:1 -1.234374 -0.000863 -0.003327 76.039642
qto_xyz:2 0.001618 -0.640545 -2.564461 19.782814
qto_xyz:3 0.000027 -1.055169 1.556770 17.499359
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Superior-to-Inferior
qform_zorient Anterior-to-Posterior
sform_name Scanner Anat
sform_code 1
sto_xyz:1 -1.234375 -0.000814 -0.003260 75.863754
sto_xyz:2 0.001569 -0.640545 -2.564463 54.271824
sto_xyz:3 0.000000 -1.055169 1.556771 56.207764
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Superior-to-Inferior
sform_zorient Anterior-to-Posterior

In comparison, the geometric information of a NIFTI image of the same data converted by dcm2nii was:

qform_name Scanner Anat
qform_code 1
qto_xyz:1 -1.234374 0.000720 -0.003669 75.744331
qto_xyz:2 0.001664 0.640545 -2.564460 -39.888336
qto_xyz:3 -0.000168 1.055170 1.556769 -98.902161
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Inferior-to-Superior
qform_zorient Anterior-to-Posterior
sform_name Scanner Anat
sform_code 1
sto_xyz:1 -1.234374 0.000814 -0.003260 75.744331
sto_xyz:2 0.001569 0.640545 -2.564460 -39.888336
sto_xyz:3 0.000000 1.055169 1.556770 -98.902161
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Inferior-to-Superior
sform_zorient Anterior-to-Posterior

The geometric information in the DICOM header was below which I don't know how to relate to the results of both converter:

0020 0032 50 [4516 ] // REL Image Position Patient//-392.03965704495\-192.22789854512\284.12436107522
0020 0037 100 [4574 ] //REL Image Orientation (Patient)//0.99999919192085\-0.0012712818931\-2.73073691e-008\0.00065967435517\0.5189228042892\-0.8548208514176
0020 1041 16 [4750 ] // REL Slice Location//-17.307595976771
0028 0030 18 [4824 ] // IMG Pixel Spacing//1.234375\1.234375


Since qform is defined based on the scanner coordinate system, I would assume it should be the same no matter which converter is used. What can explain the above discrepancy between the two NIFTI converters?

There is another question for the above results. As we can see in the header of the NIFTI file converted by Dimon, the offset coordinates of qform was very different from those of sform. I was wondering if it looks reasonable. Is there any AFNI document that explains how exactly sform is calculated by Dimon or to3d? If it is based on affine transformation to an atlas brain, is there any problem to calculate sform for an image with only partial brain coverage (e.g. some high resolution fMRI)?

I look forward to having your feedback.

Thanks,
Zhuang

Subject Author Posted

qform, sform, and NIFTI converters

zhuang song April 27, 2012 10:35PM

Re: qform, sform, and NIFTI converters

Daniel Glen April 30, 2012 12:01PM

Re: qform, sform, and NIFTI converters

zhuang song May 01, 2012 03:45PM

Re: qform, sform, and NIFTI converters

rick reynolds May 04, 2012 03:15PM

Re: qform, sform, and NIFTI converters

zhuang song May 23, 2012 03:33PM



Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
CAPTCHA
Message:

Powered by Plone

phorum.org

This site conforms to the following standards: