[Insight-users] DICOM: problem with the pixel values

Daniel Blezek Blezek.Daniel at mayo.edu
Mon Jun 1 14:17:57 EDT 2009


Hi Raquel,

  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

function [Image Header] = ReadDICOM ( fn )
% Load a DICOM file and apply slope and intecept


Header = dicominfo ( fn );
Image = Header.RescaleSlope * double ( dicomread ( Header ) ) +
Header.RescaleIntercept;
return

Your DICOM and ITK should have the same intensities.  However, be aware that
ITK and DICOM may horizontally flip the images in different ways.

Cheers,
-dan

On 6/1/09 11:57 AM, "Raquel Itk" <raquelitk at gmail.com> wrote:

> Hi,
> I¹m working at Project in my University. I use Dicom Image of CT lungs.
> I can get the value of the pixels with an iterator. There are negative in a
> lot of cases.
> I use too Matlab. When I display my image with this software I match that the
> pixels values are different than with the iterator.
> I define the type of the pixels in Dicom in this way:
> typedef signed short InputPixelType;
> 
> 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.
> I tried rescale the image but I din¹t get the result that I would like.
> 
> Can anybody help me??
> 
> Sorry if my English is no perfect.
> 
> Thanks. Raquel
> 
> Matlab : [-2000, 2286]
> ITK:[-3024,14360]
> 
> 
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090601/642b0c0c/attachment.htm>


More information about the Insight-users mailing list