[Insight-users] Creating 3D images based on slices

Luis Ibanez luis.ibanez at kitware.com
Fri, 16 Apr 2004 14:53:07 -0400


Hi Wagner,

Are your slices being stored in independent files ?

If so, you can simply use the ImageSeriesImageReader.
You will find examples in the directory:

        Insight/Examples/IO

they are:

        DicomSeriesReadImageWrite.cxx
        ImageReadImageSeriesWrite.cxx
        ImageSeriesReadWrite.cxx
        RGBImageSeriesReadWrite.cxx



This will create a 3D image with the collection of
2D image from your files.

It is still *your* responsibility to setup the Z
pixel spacing, since the reader has no other way to
figure out this value. (DICOM probably can...).

You can use the itkChangeInformationImageFilter for
the purpose of setting such pixel spacing.

There is no interpolation involved in this process.
The 3D image will be just a concatenation of slices.


If your slices do not correspond to a uniform
sampling along Z.... then.... you are in trouble...  :-/

Are they at least parallel  ? ...

The brute force approach will be to use KernelSplines
in order to interpolate intensity values... that will
work... but is not going to be fast.


    Regards,


       Luis



------------------------
Wagner Sales wrote:

> Hi,
> 
> First, thank's by the last help. like you all probabily know, I need to 
> use a volume in ITK. You told me to use a itkImage with dimension = 3. I 
> looked in the examples, and i'm convinced that that's the right way to 
> do it. But, now I have a different problem... like I said before, I need 
> to fill this 3-dimensional itkImage with n 2-dimensional images. So, my 
> current problem is how o put n differents images into the 3D image, and, 
> furthermore, how to specify the coordinates of the images in the 3D one 
> (the z-axis). After that, I need to interpolate the images, because my 
> slices aren't contiguous, I was looked how to set the space between the 
> images. Are just that? I don't need to specify the interpolation?
> 
> Thanks,
> 
> Wagner
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>