[Insight-users] Orientation pb itk/Volview (and paraview) ?
Karthik Krishnan
Karthik.Krishnan at kitware.com
Mon Sep 12 14:41:53 EDT 2005
SCHMID, Jerome wrote:
>Hi,
>
>I am encountering some orientations issues in itk/Volview, I post here even if it is a volview related topic as it deals with itk itself also.
>
>The pb is simple. Let's suppose I work on 2D images for simplicity and that volview is able to load such images.
>
>First I load a raw image in volview with the _default_ orientation options (RAS + anterior + right). The result is as expected: in the axial view the R(ight) part corresponds to the left part of my raw image (the view is flipped thus).
>
>Now in an itk prgm, I use an importImageFilter with the raw data + a writter to Analyze or vtk format. The result is then a file .hdr or .vtk readable in Volview.
>
>If I load this new file in Volview, always with default orientation options, the result is not as previously: the axial view looks like the raw image, which means that actually the image is flipped vertically. >From a visualization viewpoint this could be not a pb, but the (x,y) coordinates are now "erroneous".
>
>I suspect that the Vtk and Analyse writer sets a kind of default orientation that Volview recognizes.
>
>
>
I've had a similar problem several times before.
First a clarification,
The default RAS co-ordinates in VolView are
R = +x
A = -y (increasing rows... is equivalent to decreasing y )
With raw files, things are as expected.. Usually what I would like to
have, is not the default settings, but
R = +x
A = +y
This ensures that the co-ordinates are displayed correctly (with respect
to the ITK co-ordinate system)
On a related note, I've had the same problem with paraview in the past
For instance:
a VTK file and a MetaImage file both written out using ITK:
end up with different co-ordinate conventions when read in using Paraview:
The VTK image is flipped vertically, the meta image file is not !
Its the same with VolView too...
I suspect the VTK writer in ITK may not be doing the right thing, but I
haven't looked at it.
>So here come 2 questions:
>
>- Is there a way to bypass the orientation setting, i.e. the physical origin will be always defined as the bottom-left pt?
>
>
The RAS - xyz mapping is what defines where the origin is going to be.
Not sure what you mean by "the physical origin will be always defined as
the bottom-left pt?". I don't think you want to bypass it. What would be
useful is if each file format's orientation is consistently interpreted
from its headers by all toolkits.
>- How an itk reader filter will behave with such .hdr and .vtk files? Will it take the raw data or apply some kind of orientation correction due to some orientation setting?
>
>
As far as I've see, if they were written out using ITK, they read
correctly using ITK. With MetaImage/Analyse files, you can specify the
orientation while creating it.
>Sorry for the difficult reading but without images it may sound a little unclear.
>
>
>Thanks!
>
>Best Regards,
>
>Jerome
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>
>
>
More information about the Insight-users
mailing list