[Insight-users] Question regarding itkNiftiIO

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 15 22:26:17 EDT 2010


Hi Erik,

We may have to search for the Nifti gurus...

or even post the question to the Nifti mailing list...

       http://nifti.nimh.nih.gov/board/list.php?f=1


In the meantime,
the CVS commit logs may give us some hints.

For example:

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkNiftiImageIO.cxx?root=Insight&r1=1.77&r2=1.78

Indicates that the "if" checks were added recently.


and

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/IO/itkNiftiImageIO.cxx?root=Insight&r1=1.48&r2=1.49

says that

"ENH: When reading in NIfTI files, preserve rotation information from header
instead of setting Dir Cosines to the nearest canonical orientation"


I would guess that you concern is more about the
minus sign in the [1] direction, than about the
"if" conditions.    Is that right ?


Please let us know


     Thanks


           Luis


-----------------------------------------------------------------------------------------------
On Tue, Apr 13, 2010 at 2:51 PM, Erik Tuerke <tuerke at cbs.mpg.de> wrote:

> Hi
>
> In the itkNiftiImageIO.cxx i discovered something what is kind of
> inconclusively to me.
>
> line 1533, itk version 3.16
>
> m_Origin[0] = -theMat.m[0][3];
> if(dims > 1)
>  {
>  m_Origin[1] = -theMat.m[1][3];
>  }
> if(dims > 2)
>  {
>  m_Origin[2] = theMat.m[2][3];
>  }
>
> When writing a nifti file from an external source (not red by the
> itkImageFileReader), i noticed different orientation in both the input image
> (which was red by a not-itk-reader) and the output image (what was written
> by an itk-writer).
> When reading the image with the itkReader this difference does not occur.
> So i think those negation is done by the reader as well (unfortunately did
> not find the code for this, yet).
> What is the sense of this? Why is itk internally using different
> orientation then stored in the file?
>
> Thanks in advance
>
> cheers
>
> --
> Erik Türke
> Department of Neurophysics
> Max-Planck-Institute for Human Cognitive and Brain Sciences
> Stephanstrasse 1A
> 04103 Leipzig
> Germany
> Tel: +49 341 99 40-2440
> Email: tuerke at cbs.mpg.de
> www.cbs.mpg.de
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100415/64437614/attachment-0001.htm>


More information about the Insight-users mailing list