[Insight-developers] NIfTI orientation issue
Mathieu Coursolle
mathieu at rogue-research.com
Tue Oct 27 09:26:21 EDT 2009
Hi,
On the same topic, the itkNiftiImageIO has a function called
DumpNiftiHeader used to output
the header information.
Any objection on all this header information being added to the
metadata dictionary ?
Thanks,
Mathieu
On 2009-10-26, at 1:59 PM, Mathieu Coursolle wrote:
> 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/20091027/5c00afe1/attachment-0001.htm>
More information about the Insight-developers
mailing list