[Insight-users] Image Series Order - itk::ImageSeriesReader, SetReverseOrder

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 8 18:51:59 EDT 2008


Hi Luke,

You are right in that the itk::Image stores and carries around
the values of the Orientation (in the DirectionType).


However, the itk::Image implementation of the methods:


     TransformPhysicalPointToIndex()
     TransformIndexToPhysicalPoint()


*DOES NOT* take the Orientation into account.



The reasons are historical...



What the itk::OrientedImage offers over the itk::Image, is
overloaded implementations of these two methods:

     TransformPhysicalPointToIndex()
     TransformIndexToPhysicalPoint()

that will take the Orientation (Direction) into account.



---

Your observation about writers seems to be an independent problem.

Different writers have different behaviors.

Could you please be more specific and post to the list
the exact writer that you are using (file format) and
how you arrive to the conclusion that the image is
being reoriented ?


    Thanks


       Luis


---------------
Luke Bloy wrote:
> Hi Luis,
> 
> I'm now confused by the difference between itk::Image and
> itk::OrientedImage. I thought the itk::Image had the ability to encode
> the Orientation in directions variable. Is that not the case? what does
> itk::OrientedImage offer that itk::Image doesn't?
> 
> I've also noticed that all the fileWriters seem to convert output images
> to the LPS frame. Is that true? Is it configurable?
> 
> thanks.
> Luke
> 
> 
> On Tue, 2008-07-08 at 15:23 -0400, Luis Ibanez wrote:
> 
>>Hi Michael,
>>
>>
>>                 Welcome to ITK !
>>
>>
>>Thanks for the detailed description of your problem.
>>
>>With that, you are starting with a good precedent  :-)
>>
>>
>>If you are finding necessary to play with the order of
>>reading the DICOM slices in order to get the anatomical
>>orientation of the images to match, then chances are that
>>the image have been acquired with different orientations.
>>
>>The good news for you is that ITK provides classes for
>>correctly taking image orientation into account.
>>
>>
>>What you want to do first is to replace the use of
>>"itk::Image" in your code, with "itk::OrientedImage".
>>
>>
>>The OrientedImage will make sure that the image orientation
>>that is encoded in the direction cosines stored in the
>>DICOM header, is propagated and taking into consideration
>>at every step of the image registration process.
>>
>>
>>Once you introduce the itk::OrientedImage in replacement
>>for the itk::Image, you shouldn't need to manipulate the
>>slice order in the ImageSeriesReader class.
>>
>>
>>Note that for this,
>>You should use ITK 3.6 or a later CVS version.
>>
>>
>>Please give it a try and let us know if you find any
>>problems.
>>
>>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>>
>>-------------------
>>M. Wirtzfeld wrote:
>>
>>>Good afternoon,
>>>
>>>We are currently writing registration code to handle mono-modality and 
>>>multi-modality image registration using CT and MR data-sets.
>>>
>>>At the present time, the code is able to perform registration using both 
>>>of these data-sets.  The fixed-image is two-dimensional (treated as 
>>>three-dimensional image-type by the code) and the moving-image is a 
>>>volume created from a sequence of two-dimensional DICOM slices.
>>>
>>>Using the itk::ImageSeriesReader class, mono-modality CT registration 
>>>requires the SetReverseOrder method of this class to be called with a 
>>>"true" boolean value and MR registration requires a "false" boolean 
>>>value when the respective volumes are created.
>>>
>>>I have ensured that the maximum-step used by the optimizer is properly 
>>>set in both cases.
>>>
>>>I believe the root of this requirement lies in the meta-data of the 
>>>DICOM images that comprise the CT and MR data-sets, but I do not know 
>>>why or what to look for in order to help find an answer.
>>>
>>>I have not used ITK extensively and this is my first experience with 
>>>image-processing.
>>>
>>>
>>>
>>>Any help is greatly appreciated,
>>>
>>>
>>>Michael.
>>>
>>>Michael Wirtzfeld
>>>Robarts Research
>>>
>>>"Prefer the standard to the offbeat." - Strunk & White
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>
>>_______________________________________________
>>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