[Insight-users] reading dicom series by metaimageheader

Soumen Dey soumend at magnum . barc . ernet . in
Wed, 24 Sep 2003 18:19:05 +0530 (IST)


hi,

I have tried to read a series of dicom files by using a metaimage header.
My .mhd file looks like this...NDims = 3
DimSize = 512 512 5
ElementSpacing = 1 1 1
Position = 0 0 0
ElementByteOrderMSB = False
ElementType = MET_UCHAR
HeaderSize = -1
ElementDataFile = LIST
1187920.dcm
1187938.dcm
1187956.dcm
1187974.dcm
1187992.dcm

But running the program gives me following error messages...
NDims required and not defined.
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file
NDims required and not defined.
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file
NDims required and not defined.
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file

I am invoking the program as follows...<program name> 1187920.dcm 1
i.e i am giving the first file in series as imagefilename and 1 as slice
number.
Plz help me out by pointing out the problem. Is it there in invocation or
in writting metheader.
thenks for the help
soumen