<div dir="ltr">Hello, <div><br>I am trying to pick a "pixel" value from a series of DICOM image. I am able to pick a pixel using the mouse and the get the value using this: </div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">short</span><span style="color:rgb(0,0,0)">*)</span><span style="color:rgb(128,0,128);font-family:arial">vtkImageData</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">GetScalarPointer</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">indices</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">],</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">indices</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">],</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">indices</span><span style="color:rgb(0,0,0)">[</span><span style="color:rgb(0,0,128)">2</span><span style="color:rgb(0,0,0)">]);</span></pre>
</div><div><br></div><div>Now I have to iterate trought all data of the image and I am attempting to do that by getting the dataArray of the image like this: </div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px">
<span style="color:rgb(128,0,128)">vtkDataArray</span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">array</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">imageData</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetPointData</span><span style="color:rgb(0,0,0)">()-></span><span style="color:rgb(0,0,0)">GetScalars</span><span style="color:rgb(0,0,0)">()</span></pre>
</div><div><br></div><div>But the, when I try to fetch the information from the array, the getTuple(index) method is returning a double* instead of short*. I have probably a missunderstanding of some concept here, can you help me?</div>
<div><br></div><div>Regards,</div><div>Manuel.</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre></div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">
<br></pre></div></div>