<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&#44;</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 &#40;I don&#39;t think this is a concern for you&#44; it should be taken care of when the image is loaded&#41;. &nbsp;This is usually done by rescaling the data based on Dicom tags 28&#44;1052 and 28&#44;1053 &#40;RescaleIntercept and RescaleSlope&#41;. &nbsp;In a GE CT image I am looking at&#44; these have values of -4047 and 1&#44; so basically you are just subtracting 4047 from the values stored in the file. &nbsp;This easily allows all pixel values in a CT image to be in the positive 0-65k range &#40;they will generally not be above 7k or so in the file&#41;. &nbsp;</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font size="5" face="Times New Roman">Also note that CT images &#40;and some other modalities like Fluoro&#41; are actually circular due to the reconstruction process&#44; and are embedded in a square matrix&#44; usually 512&#94;2 though other matrix sizes can be reconstructed. &nbsp;The corners of the square are &#39;padded&#39; with a pixel padding value which may be listed in the dicom header. &nbsp;Again&#44; in the CT image I am looking at&#44; the corners are at -3024. &nbsp;Air is -1000 in a perfect system so if you write software expecting that to be the lowest value&#44; you may have an issue &#40;not sure if you are working with CT data though&#41;. &nbsp;Given the padding and offset values in my CT image&#44; the smallest value stored in the file should be 1023 &#40;-3024&#43;4047&#41;.</font>    </p>
<br>      
    <p style="margin-bottom: 0; margin-top: 0">
      <font size="5" face="Times New Roman">In general&#44; be very careful about what the actual data values are in memory when working with dicom data&#44; 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">&nbsp;</font><br><br>&gt;&gt;&gt; &quot;Robert Haase&quot; &lt;robert_haase@gmx.de&gt; 4/19/2012 02:13 AM &gt;&gt;&gt;<br>Hi Daniel&#44;<br><br>firstly it depends on what image you are trying to threshold. CT images for example usually have values between -1000 and &#43;4000 &#40;hounsfield units&#41;. If you are working with a &#39;crazy&#39; PET &#40;Bequerel per millilitre&#41; or MRI image&#44; your value range may be explainable. If you know what kind of image it is&#44; you should find a definition of the value range in the documentation of the modality. You may also have a look at the tag &quot;0054&#124;1001&quot; 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&#63;sw&#61;Tnumber&amp;q&#61;&#37;280054&#44;1001&#37;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 &#40;range 0-255&#41; you could easily resample any image to a range of 0 to 255 by using itkRescaleIntensityImageFilter.<br><br>Best&#44;<br>Robert<br><br>-------- Original-Nachricht --------<br>&gt; Datum: Wed&#44; 18 Apr 2012 23:05:20 -0400 &#40;EDT&#41;<br>&gt; Von: danieljohnsonusa@netscape.net<br>&gt; An: insight-users@itk.org<br>&gt; Betreff: &#91;Insight-users&#93; threshold levels for pixels initkThresholdImageFilter<br><br>&gt; I am using&#160;&#32;itkThresholdImageFilter to threshold a dicom image.&#160;&#32;I am<br>&gt; using the ThresholdOutside method to specify the range of pixel to<br>&gt; leave unfiltered.&#160;&#32;I initially set my upper and lower thresholds to<br>&gt; values between 0 and 255&#44; but I kept getting that everything was above<br>&gt; the threshold.&#160;&#32;I did some experimenting and&#160;&#32;found the range of<br>&gt; intensities that filtered what I wanted ended up being 6000 to 300000.<br>&gt; Can anyone explain the intesity mapping range of values for a dicom<br>&gt; image in itk&#63;&#160;&#32;Is this intensity number RGB pixel values all multiplied<br>&gt; together&#44; and if so&#44; is there a way to specify thresholds individually<br>&gt; to each instead of all 3 multiplied together&#63;&#160;&#32;Is there a way to tell<br>&gt; how the pixels are formatted in your input image and convert between<br>&gt; formats like RGB to greyscale&#63;&#160;&#32;A reference to any type of<br>&gt; documentation that explains pixel intensities in the different formats<br>&gt; would be greatly appreciated.<br>&gt;<br>&gt; Thanks&#44;<br>&gt;<br>&gt; Daniel<br>&gt;<br>&gt;<br>&gt; _____________________________________<br>&gt; Powered by www.kitware.com<br>&gt;<br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>&gt;<br>&gt; Kitware offers ITK Training Courses&#44; for more information visit:<br>&gt; <a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br>&gt;<br>&gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt;<br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <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&#33;<br>Jetzt informieren: <a href="http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a">http://mobile.1und1.de/&#63;ac&#61;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&#44; 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>