[Insight-users] Writing / Reading RGB color images

Luis Ibanez luis.ibanez@kitware.com
Fri, 20 Dec 2002 09:54:16 -0500


Hi Zein,


1) An example on Reading/Writing RGB images
    is availble in the directory:

      Insight/Examples/DataRepresentation/Image

    in the file:

       RGBImage.cxx

    The example RGB image you can use is the
    cryogenic sections of the VisibleWoman Head
    available at :

ftp://public.kitware.com/pub/itk/Data/VisibleWomanHead/RawRGB

    These examples are relatively new in the repository.

    If you cannot find them in your current source tree
    it may be necessary to cvs update your checkout.



2) Yes,
    you can write color images just as any other MetaImage.

    RGB Images can be writen directly both in PNG and
    MetaImage format simply using the ImageFileWriter.
    Note that the ImageFileWriter does not require to
    set the ImageIO object anymore. The ImageIO object
    is selected based on the extension of the file name
    you pass in SetFileName().


Please let us know if you find any problems,


    Thanks


       Luis


---------------------------------------


Zein Salah wrote:
> Hi Luis,
> 
> I am trying to write an RGB meta image. I could not fine any example that
> does that.
> 
> The example you have mentioned in this somehow old email does not exist in
> my ITK directory.
> 
> Can I write RGB images just like other meta images??
> 
> Many thanks,
> 
> Zein
>