[Insight-users] How to get one 2d image from 3d volume data?

Luis Ibanez luis . ibanez at kitware . com
Fri, 05 Dec 2003 10:41:05 -0500


Hi Chunyan,

Please look at the itk::ExtractImageFilter
http://www . itk . org/Insight/Doxygen/html/classitk_1_1ExtractImageFilter . html

an example on how to use this filter is available at

Insight/Examples/IO/
                ImageReadExtractWrite.cxx

You can actually use this demo application as a command
line tool for extracting slices from a volume.

In your case, you are probably more interested in
copy/pasting the core code from the example into your
application.


Regards,


    Luis


-----------------------------------------------
jiang wrote:

> Dear ITK-users,   
> I read a series of 2d image files to form a 3d volume. Now I want to get one
> slice of those images from the volume pointer. How should I do?
> The type of volume is:
>   typedef itk::Image<PixelType, 3>		  ImageNDType;
>   ImageNDType::Pointer volume;
> 
> The 2d image type is:
>   typedef itk::Image<PixelType, 2>        ImageType;
>   ImageType::Pointer OnePiece.
> 
> 
> Thank you very much!
> 
> 
> Chunyan
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>