[Insight-users] Problem : Meta Image Element Types

Neha D itkneha at yahoo . com
Fri, 14 Nov 2003 15:42:17 -0800 (PST)


--0-1865435637-1068853337=:849
Content-Type: text/plain; charset=us-ascii


hi all,

i am trying to read stimulate file, by using metaImage header. (since i have already program using metaImage format) 

For this, i create .mhd file.  Original .spr file (header file for stimulate format) and my .mhd file are as follows:

.spr file

numDim: 4

dim: 256 256 24 1

interval: 0.625000 0.625000 3.000000 1.0

dataType: WORD

sdtOrient: ax

endian: ieee-be

.mhd file

NDims = 4

DimSize = 256 256 24 1

ElementSpacing = 0.625000 0.625000 3.000000 1.0

Position = 0 0

ElementByteOrderMSB = True

ElementType = MET_SHORT  ( i tried wtih MET_USHORT as well since i am not sure

if WORD is MET_USHORT or MET_SHORT )

HeaderSize = -1

ElementDataFile = shilpa_magI_001.raw

when i try to read raw file using above header file, i get following error message

ElementType required and not defined.
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file
Exception caught during Raw file reading

itk::ExceptionObject (00F1F520)
Location: "Unknown"
File: C:\Insight1.2\Code\IO\itkImageIOBase.cxx
Line: 122
Description: itk::ERROR: MetaImageIO(00228ED0): Unknown pixel type: 0

I am not able to find out what exactly is wrong.  I think I am specifying MET_USHORT in incorrect way.  Any input on this is appreciated.

Thanks,

Neha


---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
--0-1865435637-1068853337=:849
Content-Type: text/html; charset=us-ascii

<P>hi all,</P>
<P>i am trying to read stimulate file, by using metaImage header. (since i have already program using metaImage format) </P>
<P>For this, i create .mhd file.&nbsp; Original .spr file (header file for stimulate format) and my .mhd file are as follows:</P>
<P><STRONG><U>.spr file</U></STRONG></P><FONT size=2>
<P>numDim: 4</P>
<P>dim: 256 256 24 1</P>
<P>interval: 0.625000 0.625000 3.000000 1.0</P>
<P>dataType: WORD</P>
<P>sdtOrient: ax</P>
<P>endian: ieee-be</P></FONT>
<P><STRONG><U>.mhd file</U></STRONG></P><FONT size=2>
<P>NDims = 4</P>
<P>DimSize = 256 256 24 1</P>
<P>ElementSpacing = 0.625000 0.625000 3.000000 1.0</P>
<P>Position = 0 0</P>
<P>ElementByteOrderMSB = True</P>
<P>ElementType = MET_SHORT&nbsp; ( i tried wtih MET_USHORT as well since i am not sure</P>
<P>if WORD is MET_USHORT or MET_SHORT )</P>
<P>HeaderSize = -1</P>
<P>ElementDataFile = shilpa_magI_001.raw</P></FONT>
<P><STRONG><U>when i try to read raw file using above header file, i get following error message</U></STRONG></P>
<P>ElementType required and not defined.<BR>MetaObject: Read: MET_Read Failed<BR>MetaImage: M_Read: Error parsing file<BR>MetaImage: Read: Cannot parse file<BR>Exception caught during Raw file reading</P>
<P>itk::ExceptionObject (00F1F520)<BR>Location: "Unknown"<BR>File: C:\Insight1.2\Code\IO\itkImageIOBase.cxx<BR>Line: 122<BR>Description: itk::ERROR: MetaImageIO(00228ED0): Unknown pixel type: 0</P>
<P>I am not able to find out what exactly is wrong.&nbsp; I think I am specifying MET_USHORT in incorrect way.&nbsp; Any input on this is appreciated.</P>
<P>Thanks,</P>
<P>Neha</P><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://antispam . yahoo . com/whatsnewfree">Protect your identity with Yahoo! Mail AddressGuard</a>
--0-1865435637-1068853337=:849--