[Insight-users] How to extract a 3D Slice

Luis Ibanez luis.ibanez at kitware.com
Sun May 2 16:50:37 EDT 2010


Hi Vincent,

There are two typical ways of extracting a 3D slice
from a 3D image.

Where by "3D slice" we assume a 3D image of a
single slice.

Given a 3D image with a direction Matrix M,
and pixel grid of size "WxHxD"

The two way are:

A)  Maintain the direction matrix M
      and select the slice to be along
      one of the planes

          *  WxHx1
          *  Wx1xD
          *  1xHxD

or

B)  Rotate the Matrix M and make appear
      the planes above to be of type

            W' x H'  x  1


You can do (A) with the RegionOfInterest
image filter, but it looks like what you want
to do is (B).

You can achieve (B) by using the Resample
ImageFilter with a IdentityTransform, and by
just seeting the OutputDirection of the filter
to the direction of the slice.


    Regards,


          Luis


---------------------------------------------------
On Thu, Apr 29, 2010 at 10:19 AM, Daanen Vincent <daanen at koelis.com> wrote:
> Hi Itk users,
>
> I'm trying to extract a slice for a 3D image. I used itk::ExtractImageFilter
> but it looses the collapsed dimension (see a previous post of mime in date
> of today i.e. 2010.04.29)
> One (Matt Mc Cormick) suggests me to use itk::RegionOfInterestImageFilter
> instead of itk::ExtractImageFilter. It works fine when extracting a slice in
> the acquisition direction (i.e. extract a axial slice for an axila 3D image)
> but if I extract a coronal slice from a Axial 3D image (of size WxHxD), I
> get D images of size (Wx1) whereas I want 1 image of size (WxD).
>
> I do not find any filter to perform what I want.
>
> I could do this with the following pipeline :
>  1) Extract a slice using itk::ExtractImageFilter
>  2) reconstruct 3D slice from 3D image and raw data
>
> I find this a bit complicated so I would like to be sure there is no filter
> to use before doing this ..
>
> Thanks for help
>
> Vince
>
> _____________________________________
> 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
>


More information about the Insight-users mailing list