[Insight-users] Saving a Meta raw image into individual 2d images

Luis Ibanez luis . ibanez at kitware . com
Wed, 18 Jun 2003 10:23:39 -0400


Hi Zein,

You may want to look at the FAQ entry:
http://www . itk . org/cgi-bin/InsightFAQ/InsightFAQ?req=show&file=faq01 . 007 . htp

Probably your best options are:

  1) PNG
  2) 2D MetaImage
  3) 2D Analyze

-----

PGM format is not supported.

BMP format is not supported
     (this is a pretty bad format for medical images,
      but... code was posted recently to the list
      regarding how to write ITK slices in BMP)
http://www . itk . org/pipermail/insight-users/2003-June/003952 . html

-----

In order to save individual slices you could use
the ExtractImageFilter,
http://www . itk . org/Insight/Doxygen/html/classitk_1_1ExtractImageFilter . html
and define the slice using the ExtractRegion.

Then pass the output slice to a 2D ImageFileWriter,
and put the whole inside a loop that runs over all
the slices of your volume.




Regards,


    Luis



---------------
salah wrote:
> Hello all,
> 
> I am using a 3d Meta image (.mhd and .mha) and process 
> it in ITK. (itk images. I want to write this image to disk as
> a series of individual 2d images, where each slice stands
> in a file. 
> 
> How can I do that in itk? Which files format are then supported?
> for example, is .pgm format supported?
> 
> Many Thanks,
> Zein
> 
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah 
> University of Tübingen, WSI-GRIS, Sand 14, 72076 Tübingen 
> Email: salah at gris . uni-tuebingen . de
> Tel.: (07071) 29 75465 (GRIS),           Fax: (07071) 29 54 66
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at www . itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>