[Insight-users] OrientedImageAdaptor or ExtractOrientedImageFilter?

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 17 12:25:51 EDT 2009


Hi Constantine,

I would suggest to use the itk::ResampleImageFilter<>.

You can set a Rigid3DTransform to define the orientation of the slice.

Also, declare the output image to be a 3D image of 1-slice.
In this way the output image will carry the full information
about the slice position in 3D space.

Please note that since ITK 3.10, the standar itk::Image behaves
just the same as the itk::OrientedImage.



    Regards,


       Luis


-------------------------
Constantine Zakkaroff wrote:
> Dear ALL,
> 
> I'm looking for a way of extracting slices of arbitrary orientation 
> specified by any given orientation matrix. At the moment I can do it in 
> two different ways, but I suspect there should be a better way.
> 
> My first way is to resample the volume with the given orientation matrix 
> and then use ExtractImageFilter to get a slice.
> 
> The other way I tried is a bit more involved but it is closer to what I 
> need. First I construct an OrientedImage with the given orientation 
> matrix and then use ImageRegionIteratorWithIndex to traverse the pixels 
> and for each index obtained from the iterator I get the value of a pixel 
> in the corresponding physical location in the volume.
> 
> I'm wondering if it is possible (and sensible) to use something like 
> SpatialOrientationAdapter, but with an ability to set arbitrary 
> orientation matrix so that the image appears already resampled if I want 
> to extract a slice form it?
> 
> Or is there a way to cook up something like ExtractImageFilter that 
> would let me extract slices under any arbitrary orientation specified 
> through the given orientation matrix?
> 
> Thank you very much,
> Constantine
> 
> 
> 
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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
> 


More information about the Insight-users mailing list