<html>
<head>
</head>
<body style="font-family: Times New Roman; font-style: normal; line-height: normal; margin-bottom: 1px; margin-left: 4px; margin-top: 4px; font-variant: normal; margin-right: 4px; font-size: 16pt; font-weight: normal">
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">Daniel,</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">To add a little more information that may or may not be helpful -</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">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). </font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">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).</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">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.</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman">Kent</font> </p>
<br>
<p style="margin-bottom: 0; margin-top: 0">
<font size="5" face="Times New Roman"> </font><br><br>>>> "Robert Haase" <robert_haase@gmx.de> 4/19/2012 02:13 AM >>><br>Hi Daniel,<br><br>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.<br><br><a href="http://dicomlookup.com/lookup.asp?sw=Tnumber&q=%280054,1001%29">http://dicomlookup.com/lookup.asp?sw=Tnumber&q=%280054,1001%29</a><br><br>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.<br><br>Best,<br>Robert<br><br>-------- Original-Nachricht --------<br>> Datum: Wed, 18 Apr 2012 23:05:20 -0400 (EDT)<br>> Von: danieljohnsonusa@netscape.net<br>> An: insight-users@itk.org<br>> Betreff: [Insight-users] threshold levels for pixels initkThresholdImageFilter<br><br>> I am using  itkThresholdImageFilter to threshold a dicom image.  I am<br>> using the ThresholdOutside method to specify the range of pixel to<br>> leave unfiltered.  I initially set my upper and lower thresholds to<br>> values between 0 and 255, but I kept getting that everything was above<br>> the threshold.  I did some experimenting and  found the range of<br>> intensities that filtered what I wanted ended up being 6000 to 300000.<br>> Can anyone explain the intesity mapping range of values for a dicom<br>> image in itk?  Is this intensity number RGB pixel values all multiplied<br>> together, and if so, is there a way to specify thresholds individually<br>> to each instead of all 3 multiplied together?  Is there a way to tell<br>> how the pixels are formatted in your input image and convert between<br>> formats like RGB to greyscale?  A reference to any type of<br>> documentation that explains pixel intensities in the different formats<br>> would be greatly appreciated.<br>><br>> Thanks,<br>><br>> Daniel<br>><br>><br>> _____________________________________<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>> Kitware offers ITK Training Courses, for more information visit:<br>> <a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br>><br>> Please keep messages on-topic and check the ITK FAQ at:<br>> <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><br>--<br>NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!<br>Jetzt informieren: <a href="http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a">http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a</a><br>_____________________________________<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>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><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>
</p>
</body>
</html>