[Insight-users] MetaIO - problems reading a stack of PNG images

Gary O Tedeschi gotedesc@ucsd.edu
Thu, 13 Mar 2003 14:26:53 -0800 (PST)


Hi,

I am attempting to generate a 3D image from a stack of images, each slice
in its own file. My MetaHeader is as follows:

NDims = 3
DimSize = 1024 1024 16
ElementType = MET_USHORT
HeaderSize = -1
ElementSize = 0.081 0.081 0.651
ElementByteOrderMSB = False
ElementDataFile = ant.png.%d 0 15 1

Upon execution I get the following error messages:

Using string 'ant.png.%d' with values 0 to 15 stepping 1
  file = _ant.png.0_
MetaImage: M_ReadElements: data not read completely
   ideal = 2097152 : actual = 833914
  file = _ant.png.1_
MetaImage: M_ReadElements: data not read completely
   ideal = 2097152 : actual = 0
  file = _ant.png.2_
MetaImage: M_ReadElements: data not read completely
   ideal = 2097152 : actual = 0
  file = _ant.png.3_
MetaImage: M_ReadElements: data not read completely
   ideal = 2097152 : actual = 0
  file = _ant.png.4_

...etc.

Any ideas on what I may be doing wrong?

thank you,
Gary