[Insight-users] Orientation pb itk/Volview (and paraview) ?

SCHMID, Jerome jeromeschmid at surgery.cuhk.edu.hk
Mon Sep 12 22:12:05 EDT 2005


Thanks for the answer,

Well my concern is quite simple, I want to be sure that the order of the raw data is never changed after reading or writting operations. So if I understand what you are saying is that the reading operation is not consistent between itk reader and Volview (or Paraview) readers. But aren't they based on the same code (i.e. itk reader)?

It is quite annoying because in Volview I am looking for markers positions and I want to be sure that their positions are expressed in a frame that will be unchanged accross reading or saving operations. This is was I meant in my unclear sentence "the physical origin will be always defined as the bottom-left pt?", I want to keep the itk default orientation frame, i.e. X oriented from left to right and Y from down to top in a 2D slice.

So what would be the solution, without a deep scaning of the filters behaviour? Should I found the good combination in the volview orientations options for each format to ensure that I have always the same coordinate system? I would be a pity to have to work with raw images instead of enhanced formats able to keep record of spacing, origin, etc...

regards,

Jerome

Karthik Krishnan wrote:

>
> 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