[vtkusers] Picking DICOM pixel (scalar) value

Manuel Corrales manuelcorrales at gmail.com
Sun Aug 18 13:12:13 EDT 2013


Hello,

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:

(short*)vtkImageData->GetScalarPointer(indices[0], indices[1], indices[2]);


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:

vtkDataArray* array = imageData->GetPointData()->GetScalars()


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?

Regards,
Manuel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130818/6e350cc6/attachment.htm>


More information about the vtkusers mailing list