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

Luis Ibanez luis.ibanez@kitware.com
Thu, 13 Mar 2003 17:50:09 -0500


Hi Gary,

MetaImage can only read stacks of files when they
contain raw binary data at the end of each
file/slice.

It is likely that your PNG images are compressed
using zlib.  In order to use MetaImage here you
will have to make sure the the PNG files are
uncompressed.


Please let us know if you have further questions


Thanks


  Luis


--------------------------------------------

Gary O Tedeschi wrote:
> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>