[Insight-users] read 16-bit grayscale png file

Luis Ibanez luis . ibanez at kitware . com
Fri, 22 Aug 2003 12:03:00 -0400


Hi Weicheng

You may want to add a try/catch block around the ->Update()
call of the reader. It is likely that an exception is
being thrown.

Print out the eventual message of the exception.
Examples on this are available in the IO chapter of the
software guide.

Also, please make sure that your png files have
extension ".png".  ITK relies on the extension of
filenames for identifying the fileformat.


Regards,


    Luis



-------------------------
SHEN, WEICHENG . wrote:
> Hi,
> 
>  
> 
> I have a number of 16-bit grayscale .png files that I wish to process 
> using ITK. When using the itkImageFileReader class to read them in, the 
> following message occurred
> 
>  
> 
> This application has requested the Runtime to terminate it in an unusual 
> way.
> 
> Please contact the application's support team for more information.
> 
>  
> 
> This program works fine with the 8-bit .png file.
> 
>  
> 
> Does anyone know if the .png 16-bit support in itk works?
> 
>  
> 
> Thanks!
> 
>  
> 
> //Weicheng Shen, Ph.D.//
> 
> //Senior Scientist//
> 
> //Science Applications International Corporation//
> 
> //1710 SAIC Drive//
> 
> //MailStop ////2-6-9//
> 
> //McLean////, ////VA//// ////22102//
> 
> //(703) 676-4189//
> 
>  
>