[Insight-users] Re: meta image files (fwd)

Luis Ibanez luis.ibanez@kitware.com
Mon, 14 Apr 2003 16:02:18 -0400


Hi George,

There is not much to say here...

It is hard to compare the visualization
that you are obtaining with the one in
your scanner without being able to take
a look at any one of them.

MetaImage is capable of reading Unsigned
short, that shouldn't be a problem.

What are you using for visualizing your
images ?

Could you post a *small* jpg file with
the screenshot of how the  image looks
like ?

-----

You can easily verify if your data is
being read correctly, by doing a direct
save after reading the data. That is,
connect a writer to your reader and
dump the image in MetaImage as soon
as you read it.

Truncate the header by using the
"tail" command (available in Unix and
Cygwin), then use "diff" to compare
the binary block of both the original
and the saved image. These blocks
should be identical.





Regards,


    Luis


-----------------------------
George C LaVerde wrote:
> 
> I'm trying to use MRI
> images from a General Electric 3.0T magnet in ITK.  They are short int
> images (256X256) with a 7904 byte header.  I have been trying to convert
> them to Meta (.mha) image files by removing the header, leaving just the
> raw data.  Is that what you recommend?  However, when I write in the .mha
> file:
> 
> ElementType = MET_SHORT
> 
> The images can be opened and viewed with VTK/FLTK; however, they don't
> look right (the pixel values seem to be clipped)....they don't look like
> they do on the 3.0T console.  Do you have any suggestions for me?
> 
> Are the meta variables like:
> 
> MET_CHAR
> MET_UCHAR
> MET_SHORT
> MET_USHORT
> MET_FLOAT
> MET_DOUBLE
> 
> Thanks for any help you can give,
> 
> George LaVerde
> 
> -----------------
> George C. LaVerde
> MD/PhD Student
> Univ. of Pittsburgh
> gclst6+@pitt.edu
> (412)889-2046
> 
> ---------- Forwarded message ----------
> Date: Mon, 14 Apr 2003 10:56:00 -0400 (EDT)
> From: George C LaVerde <gclst6@pitt.edu>
> To: dmshelto@andrew.cmu.edu
> Subject: Re: meta image files
> 
> 
> Damion,
> 	In brainweb165a10f17.mha is:
> 
> NDims = 3
> DimSize = 181 217 180
> ElementType = MET_UCHAR
> ElementSpacing = 1.0 1.0 1.0
> ElementByteOrderMSB = False
> ElementDataFile = brainweb165a10f17.raw
> 
> I'm trying to convert raw image files to .mha files.  I assume that the
> above:
> ElementType = MET_UCHAR
> is declaring the pixel type to unsigned char.  What is the correct thing
> for:
> 
> short int
> long int
> float
> double
> 
> and do I just add the "U" to make them unsigned?
> 
> I looked at the website below, but I couldn't find any info about this.
> 
> The BrainWeb project home page is :
> 
>    http://www.bic.mni.mcgill.ca/brainweb
> 
> Thanks,
> 
> George
> 
> 
> -----------------
> George C. LaVerde
> MD/PhD Student
> Univ. of Pittsburgh
> gclst6+@pitt.edu
> (412)889-2046
> 
> 
> 
>