[Insight-users] ImageReadExtractWrite

Luis Ibanez luis . ibanez at kitware . com
Fri, 09 May 2003 12:51:35 -0400


Hi Marisa,

You may need to change the PixelType of the ImageFileWriter.

Currently it is "signed short".

Please edit the file:

   Insight/Examples/IO/ImageReadExtractWrite.cxx

and in line 78, replace:

     typedef   signed short OutputPixelType;

with

     typedef   unsigned short OutputPixelType;


Then, rebuild the executable.

----

PNG only supports pixel types:

     unsigned char
     unsigned short



Regards,


    Luis


----------------------
marisa aurelio wrote:
> Hello,
> 
> I'm trying to run the ImageReadExtractWite file.
> 
> -->> ImageReadExtractWrite Heart.png HeartEx.png 10 10 25 60
> 
> 
> I tried to run it with .png images, which was the output image of the 
> DICOMApp aplication, and it sends an error like:
> 
> File: C:\Users\MedImage\InsightToolkit-1.2.0\Code\IO\itkPNGImageIO.cxx
> Line: 510
> Description: itk::ERROR: PNGImageIO(01038A38): PNG supports unsigned 
> char and un
> signed short
> 
> How can I set .png images as input so it stops delivering this error????
> 
> Thanks in advance
> 
> Marisa
> 
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>