[Insight-users] threshold levels for pixels in itkThresholdImageFilter

Kent Ogden ogdenk at upstate.edu
Thu Apr 19 09:21:00 EDT 2012


Daniel, 

To add a little more information that may or may not be helpful - 

The pixel values stored in a dicom image file are frequently shifted and/or scaled from the values that you will see in the loaded image (I don't think this is a concern for you, it should be taken care of when the image is loaded).  This is usually done by rescaling the data based on Dicom tags 28,1052 and 28,1053 (RescaleIntercept and RescaleSlope).  In a GE CT image I am looking at, these have values of -4047 and 1, so basically you are just subtracting 4047 from the values stored in the file.  This easily allows all pixel values in a CT image to be in the positive 0-65k range (they will generally not be above 7k or so in the file).   

Also note that CT images (and some other modalities like Fluoro) are actually circular due to the reconstruction process, and are embedded in a square matrix, usually 512^2 though other matrix sizes can be reconstructed.  The corners of the square are 'padded' with a pixel padding value which may be listed in the dicom header.  Again, in the CT image I am looking at, the corners are at -3024.  Air is -1000 in a perfect system so if you write software expecting that to be the lowest value, you may have an issue (not sure if you are working with CT data though).  Given the padding and offset values in my CT image, the smallest value stored in the file should be 1023 (-3024+4047). 

In general, be very careful about what the actual data values are in memory when working with dicom data, it may not be what you expect. 

Kent 

 

>>> "Robert Haase" <robert_haase at gmx.de> 4/19/2012 02:13 AM >>>
Hi Daniel,

firstly it depends on what image you are trying to threshold. CT images for example usually have values between -1000 and +4000 (hounsfield units). If you are working with a 'crazy' PET (Bequerel per millilitre) or MRI image, your value range may be explainable. If you know what kind of image it is, you should find a definition of the value range in the documentation of the modality. You may also have a look at the tag "0054|1001" in the DICOM eader. It documents in what physical unit the image should be interpreted.

http://dicomlookup.com/lookup.asp?sw=Tnumber&q=%280054,1001%29

Secondly the range depends on what data type your image variable is. If you wish to have it as an unsigned char (range 0-255) you could easily resample any image to a range of 0 to 255 by using itkRescaleIntensityImageFilter.

Best,
Robert

-------- Original-Nachricht --------
> Datum: Wed, 18 Apr 2012 23:05:20 -0400 (EDT)
> Von: danieljohnsonusa at netscape.net
> An: insight-users at itk.org
> Betreff: [Insight-users] threshold levels for pixels initkThresholdImageFilter

> I am using  itkThresholdImageFilter to threshold a dicom image.  I am
> using the ThresholdOutside method to specify the range of pixel to
> leave unfiltered.  I initially set my upper and lower thresholds to
> values between 0 and 255, but I kept getting that everything was above
> the threshold.  I did some experimenting and  found the range of
> intensities that filtered what I wanted ended up being 6000 to 300000.
> Can anyone explain the intesity mapping range of values for a dicom
> image in itk?  Is this intensity number RGB pixel values all multiplied
> together, and if so, is there a way to specify thresholds individually
> to each instead of all 3 multiplied together?  Is there a way to tell
> how the pixels are formatted in your input image and convert between
> formats like RGB to greyscale?  A reference to any type of
> documentation that explains pixel intensities in the different formats
> would be greatly appreciated.
>
> Thanks,
>
> Daniel
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> 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

--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120419/9ca226cb/attachment.htm>


More information about the Insight-users mailing list