[Insight-users] Re: read series files
Luis Ibanez
luis.ibanez@kitware.com
Thu, 27 Mar 2003 08:53:37 -0500
Hi Zhao,
zhao yong qiang wrote:
> Hi Luis,
> 1.How to read series DICOM or other type files in VTK?
1) You may want to send this question to the VTK mailing list.
VTK and ITK are separate toolkits. VTK is oriented to visualization,
ITK is oriented to image processing, with emphasis in segmentation
and registration.
If you want to read DICOM images with ITK the
simplest way at this point is to use the
MetaImageImporter application that will generate
a MetaImage header for you.
> 2. If I define the itk::image<pixel type, 3>,how I write the series
> images data to the defined image type? I check that
> itk::ImportImageFilter can import data from a standard C array into an
> itk::Image ,but I can not find how I set input data.
> Thanks!!!
2) Examples on how to write data are availble in
Insight/Code/IO
and are described in the SoftwareGuide
http://www.itk.org/ItkSoftwareGuide.pdf
Chapter 6, pdf-page 157
By default, writers use the PixelType when writing
to the file. You can modify this if you directly
instantiate the ImageIO object and invoke its method
SetPixelType().
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html
Note that this will result in a C-style casting with no
effort for correcting the dynamic range of the intensities.
Regards,
Luis