[Insight-users] GetPixel problems

Stephen R. Aylward aylward at unc.edu
Wed Mar 16 15:31:21 EST 2005

Please verify that you are accessing the row/column information in the 
image consistently between matlab and itk.

Also, matlab can use a colormap to convert values stored at a pixel to 
intensity values.   Please make sure ITK and matlab are processing the 
same data (mapped/unmapped values).

You might want to use ImageViewer in InsightApplications to look at the 
pixel values in the image.   This will verify that itk is reading your 
image correctly.  You can use it to explore the pixel values.   With the 
cursor in the ImageViewer window, press the h key.  This will bring up a 
list of options.  You'll be able to zoom-in on the image using '+', 
scroll the image using i-j-k-m, and have pixel values at mouse-clicks 
reported in the window using the 'v' option.

I hope this helps,

Alex Houston wrote:
> Hi Guys,
> I have problems replicating pixel values in ITK.
> I have a problem regarding the mismatch of pixel
> values read from Matlab and same values read from ITK
> for dicom images.
> Here is what I have done.
> In Matlab, I create a text file containing
> co-ordinates of pixels with a particular intensity.
> I then read this text file in ITK and use GetPixel()
> to read the pixel values. However these values are
> very different from ones in Matlab. (The change in the
> pixel value is not linear.... it seems to be random)
> Has somebody faced this problems please advise, 
> Thanks in advance
> A. Houston
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/ 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
aylward at unc.edu
(919) 966-9695

More information about the Insight-users mailing list