[Insight-users] Re: Importing image data from a byte array

Chris Farmer cfarmer at scitegic.com
Wed Sep 7 17:26:30 EDT 2005



This makes perfect sense.  I was trying this since others suggested the
ImportImageFilter as a way to get PNG data into an itk image.  Now I'm
back to square one... is there a straightforward way to get PNG data (or
some other non-raw image format) from a byte array into an itk Image?



 

-----Original Message-----
From: Karthik Krishnan [mailto:Karthik.Krishnan at kitware.com] 
Sent: Wednesday, September 07, 2005 2:14 PM
To: Chris Farmer
Cc: insight-users at itk.org
Subject: Re: [Insight-users] Re: Importing image data from a byte array

<snip>

You cannot read in a PNG image like a standard file stream . PNG's have 
headers... You could do this with a "RAW" file format. (which you 
probably will never find on the web). Such a raw file will be of size 
240*160*sizeof(PixelType).

This is why your output is garbled.

 


More information about the Insight-users mailing list