[vtkusers] Copy from vtkImageData to array

Michael Xanadu xanadu.michael at googlemail.com
Thu Nov 19 10:21:31 EST 2009


Hi,

I have got a vtkImageData filled with 3-dimensional CT data. Now I'm doing
this:

vtkUnsignedCharArray *arr =
vtkUnsignedCharArray::SafeDownCast(image->GetPointData()->GetScalars());

This copies the 3-dimensional image data into a 1-dimensional array. But of
course, now I don't know which index of the array I should address if I want
to get an element with former coordinates (x,y,z). In other words, what
principle was used to copy the data from the vtkImageData to the array?


Regards, Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091119/c1bc907c/attachment.htm>


More information about the vtkusers mailing list