<HTML>
<HEAD>
<TITLE>Re: [Insight-users] DICOM: problem with the pixel values</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi Raquel,<BR>
<BR>
When you load images using Matlab, it does not honor the RescaleSlope and RescaleIntercept tags. Your data in Matlab will always be positive. ITK honors these flags and the images will have negative values (indicating a density less than water). You can achieve the same intensities if you use this Matlab code<BR>
<BR>
function [Image Header] = ReadDICOM ( fn )<BR>
% Load a DICOM file and apply slope and intecept<BR>
<BR>
<BR>
Header = dicominfo ( fn );<BR>
Image = Header.RescaleSlope * double ( dicomread ( Header ) ) + Header.RescaleIntercept;<BR>
return<BR>
<BR>
Your DICOM and ITK should have the same intensities. However, be aware that ITK and DICOM may horizontally flip the images in different ways.<BR>
<BR>
Cheers,<BR>
-dan<BR>
<BR>
On 6/1/09 11:57 AM, "Raquel Itk" <<a href="raquelitk@gmail.com">raquelitk@gmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
I’m working at Project in my University. I use Dicom Image of CT lungs. <BR>
I can get the value of the pixels with an iterator. There are negative in a lot of cases.<BR>
I use too Matlab. When I display my image with this software I match that the pixels values are different than with the iterator.<BR>
I define the type of the pixels in Dicom in this way:<BR>
typedef signed short InputPixelType;<BR>
<BR>
I would prefer that píxel values with the Itk would have the same value that the have with Matlab but I don’t know how I can define the pixels.<BR>
I tried rescale the image but I din’t get the result that I would like.<BR>
<BR>
Can anybody help me??<BR>
<BR>
Sorry if my English is no perfect.<BR>
<BR>
Thanks. Raquel<BR>
<BR>
Matlab : [-2000, 2286]<BR>
ITK:[-3024,14360]<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_____________________________________<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at<BR>
<a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
</SPAN></FONT></FONT></BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>-- <BR>
<B>Daniel Blezek, PhD<BR>
</B>Medical Imaging Informatics Innovation Center<BR>
<BR>
P 127 or (77) 8 8886<BR>
T 507 538 8886<BR>
E <a href="blezek.daniel@mayo.edu">blezek.daniel@mayo.edu</a><BR>
<BR>
Mayo Clinic<BR>
200 First St. S.W.<BR>
Harwick SL-44<BR>
Rochester, MN 55905<BR>
mayoclinic.org<BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>