[vtkusers] quickly iterate over voxel data in vtkImageData in Java

Jonathan Morra jonmorra at gmail.com
Tue Nov 30 11:33:05 EST 2010


I'm running vtk with Java and want to quickly iterate over the voxels in a
3D vtkImageData.  Right now, the only methods I found were
GetScalarComponentAsFloat
and
SetScalarComponentFromFloat
however, these methods appear to be very slow.
1.  Are these methods actually slow?
2.  Is there a quicker way to iterate over a section of voxels in
vtkImageData.

My problem specifically is that I have 2 3D vtkImageData's.  I want to copy
one plane of one vtkImageData into one plane of the other vtkImageData.  The
only way I found of doing that is to iterate over the plane and use the
get/set scalar components method.  Is there another way?  If not, how can I
speed up what I'm doing.

Thanks,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101130/1fd7f9e5/attachment.htm>


More information about the vtkusers mailing list