<div dir="ltr">Thanks David, will try that.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 10:54 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Sun, Aug 18, 2013 at 1:12 PM, Manuel Corrales<br>
<<a href="mailto:manuelcorrales@gmail.com">manuelcorrales@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to pick a "pixel" value from a series of DICOM image. I am able<br>
> to pick a pixel using the mouse and the get the value using this:<br>
><br>
> (short*)vtkImageData->GetScalarPointer(indices[0], indices[1], indices[2]);<br>
><br>
><br>
> Now I have to iterate trought all data of the image and I am attempting to<br>
> do that by getting the dataArray of the image like this:<br>
><br>
> vtkDataArray* array = imageData->GetPointData()->GetScalars()<br>
><br>
><br>
> But the, when I try to fetch the information from the array, the<br>
> getTuple(index) method is returning a double* instead of short*. I have<br>
> probably a missunderstanding of some concept here, can you help me?<br>
><br>
> Regards,<br>
> Manuel.<br>
<br>
</div></div>I think you can just do:<br>
<br>
vtkShortArray* array = vtkShortArray::SafeDownCast (<br>
imageData->GetPointData()->GetScalars() );<br>
<br>
David<br>
</blockquote></div><br></div>