[Insight-users] Re: Gopal from Philips,India

Luis Ibanez luis.ibanez at kitware.com
Mon Oct 9 19:50:38 EDT 2006


Hi Gopal,

The pixel type declared in this example is "signed short",
in lines 79 and 80 of the file


        Insight/Examples/IO/
           ImageReadRegionOfInterestWrite.cxx


This means that the PNG file that it writes is using 16-bits,
but the input image that you are reading only has intensities
that occupy the low 8-bits.

Most image viewers do not rescale the intensities of 16-bit PNG
when they have values that only go from 0-255 intensity values.
You are probably using one of these naive image viewers.


In other words, your image is probably there, but your viewer
is using a intensity range that goes up to 65535 (16 bits) and
therefore the actual image intensities get mapped very dark.


Please modify the pixel types in lines 79 and 80 to be
"unsigned char", or use a good image viewer, such as the
one in


            InsightApplications/ImageViewer.




   Regards,


       Luis



-----------------------
Gopal Karemore wrote:
> Hi luis
>  
>  
> I am very new in ITK. Iam not able execute 
> ImageReadRegionOfInterestWrite.exe. iam passing parameter as 
> *"BrainMidSagittalSlice.png op.png 0 0 120 100"*
> ** 
> *Iam getting only Black screen . And same with Markov segmentation 
> too Can you help me???*
> ** 
> ** 
> Regards
> K.Gopal
>  




More information about the Insight-users mailing list