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 <div>GetScalarComponentAsFloat</div><div>and</div><div>SetScalarComponentFromFloat</div>
<div>however, these methods appear to be very slow.</div><div>1. Are these methods actually slow?</div><div>2. Is there a quicker way to iterate over a section of voxels in vtkImageData.</div><div><br></div><div>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.</div>
<div><br></div><div>Thanks,</div><div>Jon</div>