[vtkusers] vtkImageShrink3D deleting input data arrays

Vincent Rivola vincent.rivola at rtech-engineering.com
Tue Nov 17 18:19:39 EST 2015


Dear All,

This is my first subject on this mailing list. I am currently developing a tool using the JAVA wrapper for VTK.
I am reading an image and creating a vtkImageData from this input file.
Since the input image contains Z elevation data, I create three arrays that I add to the pointData of the vtkImageData:
			img.GetPointData().AddArray(z);
			img.GetPointData().AddArray(meanZ);
			img.GetPointData().AddArray(sigmaZ);

So far, so good, if I write the file (or look in debug mode) I can see my three arrays in the Point Data of my img object.
However I would like to use a vtkImageShrink3D filter on image, with the following lines:
		vtkImageShrink3D shrink = new vtkImageShrink3D();
		shrink.SetShrinkFactors(shrinkFactor, shrinkFactor, 1);
		shrink.SetInputData(img);
		shrink.AveragingOff();
		shrink.Update();
		vtkImageData outputImg = shrink.GetOutput();

In the output of this filter I only get one array which is called ImageScalar ! My three initial arrays have been deleted by the filter.
I would like to see my three arrays being passed through the filter like it is the case with other filters.
Could someone help me to solve this issue?

Regards,

Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151118/baf091ae/attachment.html>


More information about the vtkusers mailing list