[Insight-users] pixel type
Miller, James V (Research)
millerjv at crd.ge.com
Tue, 30 Mar 2004 09:31:39 -0500
Silviu,
Most image viewers do not "like" 16 bit pngs. If your viewer can read the
data, you may have to adjust the intensity (window/level, gamma,
brightness/contrast) within the viewer inorder to be able to see the image
as anything other than a black square. When your 8 bit images are converted
to 16 bits images all the original dynamic range is in the low bits of the
16 bits images. When the viewer displays the 16 bits images, it maps 65535
to white and 0 to black. So your 0-255 pixel data is all in very dark shades
of black.
Jim
-----Original Message-----
From: Silviu D Minut [mailto:minutsil at cse.msu.edu]
Sent: Monday, March 29, 2004 5:36 PM
To: insight-users at itk.org
Subject: [Insight-users] pixel type
I'm messing with the ImageReadWrite example and I'm running it on some
image.png that I created with gimp.
The PixelType is set to unsigned short. The output image is a blank
(black) square image (both with xv and with ImageViewer). That's no good.
The image I created was grayscale, so it has 8bpp. I changed the PixelType
to unsigned char and it worked. I understand png supports both char and
short. I assume that the data is stored ultimately as a PixelType * array.
Is that right? Can anybody explain what goes wrong when I have a type
missmatch between the image on disk and the PixelType?
Thanks!
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users