<div dir="ltr">If you want to convert raw values to HU, you should use the formula <br><pre style="font-family: arial,helvetica,sans-serif;">HU = PixelValue * RescaleSlope + RescaleIntercept<br><br>Jothy<br></pre><br><div class="gmail_quote">
On Tue, Apr 13, 2010 at 8:06 PM, Scott Johnson <span dir="ltr">&lt;<a href="mailto:Scott.Johnson@neuwave.com">Scott.Johnson@neuwave.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">Hi Folks,</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">I’m reading a series of DICOM files from a directory
with code like this:</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    _reader=vtkDICOMImageReader::New();</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    _reader-&gt;SetDirectoryName(directory.c_str());</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    _reader-&gt;SetDataScalarTypeToUnsignedShort();</span></p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    _reader-&gt;Update();</span></p>

<p class="MsoNormal"> </p>

<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">    cerr &lt;&lt; <span style="color: rgb(163, 21, 21);">&quot;Scalar
Type: &quot;</span> &lt;&lt; _reader-&gt;GetDataScalarType();</span></p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">How come the value of _<i>reader-&gt;GetDataScalarType is 4,
which is VTK</i>_SHORT?</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">The files are CT which should be 12 bit unsigned data.  When
I access the data I get negative values, which I don’t want.  (I can’t
find code converting to Hounsfield units which could be negative.)  How do I
get Unsigned Short data from vtkDICOMImageReader?</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thanks</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">                                -- Scott</p>

<p class="MsoNormal"> </p>

</div>

</div>


<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>