[Insight-users] Meta Image header format

Luis Ibanez luis.ibanez@kitware.com
Sun, 20 Apr 2003 12:07:58 -0400


Hi Prasda,

The PNG image format uses compression. It takes
advantage of the zlib library for this aim. That's
why the file size will not match the value that you
expected.

PNG is a quite limited format and it is not designed
for being used with medical images. The main reason
why it is supported in ITK is because it is easy to
visualize in almost any platform.

Considering that ITK distributes a very flexible viewer
in the InsightApplications module:

    InsightApplications/ImageViewer

You no longer need to be attached to PNG files.

I would strongly suggest you to use a more
formal file format like:

   - Analyze,
   - MetaImage
   - VTK
   - GIPL

Which are capable of managing multiple pixel
types and multiple dimensions.

Please read the Chapter 6  of the SoftwareGuide.

    http://www.itk.org/ItkSoftwareGuide.pdf


starting in pdf-page 157.

The examples on IO are available at

   Insight/Examples/IO

Examples of images are available at


   Insight/Examples/Data

and

   Insight/Testing/Data/Baseline/IO





Regards,


    Luis


------------------------
Prasad Sarma wrote:
> hi Luis,
> 
>    I have written the header file in the following way
> and the program worked for the rescale intensity Image
> filter with out any problem and I got the PNG image
> but surprisingly the size of the PNG file is 2337 !!
> where I expected the 4096 for 64X64 image.
> 
> Could you tell me where I can find the format for
> writing the header files for various types of images
> esp for meta image.(like for float, double etc , I
> have seen from one of class I am taking that the
> header format is like the one below but they used to
> for the 3 dimensional image of MET_UCHAR type).
> 
> I looked at the "IO" and "filtering" modules of ITK
> and they don't seem to have the samples for this type.
> and also class hirarchy for the MetaImageIO. but they
> don't seem to mention the header file format.
> 
> here is mine for 64X64 float type image.
> 
> ------------------------------
> NDims = 2
> DimSize = 64 64
> ElementType = MET_FLOAT
> ElementSpacing = 1.0 1.0
> ElementByteOrderMSB = True
> ElementDataFile = 17198_1_slice_1.raw
> -------------------------------------
> 
> (I checked the float values of pixels for float images
> before. They are fine.)
> 
> Thanks
> 
> Prasad
> 
> _________________________________________