[Insight-developers] NIfTI orientation issue
Mathieu Coursolle
mathieu at rogue-research.com
Mon Oct 26 13:59:31 EDT 2009
Hi ITK developers,
I am using the itkNiftiImageIO to load NIfTI image data. The NIfTI
file format defines 2 different methods to map voxels
to physical coordinates. One of those methods is using a quaternion
and is defined when the qform_code > 0. The other
method is using a linear transform and is defined when the sform_code
> 0.
Looking at the code which sets the orientation based on the NIfTI
header, it seems to prioritize the qform over the sform.
(See void NiftiImageIO:: SetImageIOOrientationFromNIfTI(unsigned short
int dims))
However, there are some cases where I would need both the qform and
the sform transforms once the data is loaded.
I guess one option would be to add them as part of the metadata ?
Could we do something like:
EncapsulateMetaData<std::vector<std::vector<double> > >(this-
>GetMetaDataDictionary(),"qform", myQForm);
EncapsulateMetaData<std::vector<std::vector<double> > >(this-
>GetMetaDataDictionary(),"sform", mySForm);
Any other suggestions ?
Thanks,
Mathieu
_________________________
Mathieu Coursolle, ing.jr., M.Ing.
Rogue Research Inc.
www.rogue-research.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20091026/8a0c6c08/attachment.htm>
More information about the Insight-developers
mailing list