[vtkusers] iterating through vtkImageStencilData

David Gobbi david.gobbi at gmail.com
Tue Jul 20 19:34:53 EDT 2010


Hi Prathamesh,

You can use the following method of vtkImageStencilData to do the iteration:

  int vtkImageStencilData::GetNextExtent(int &r1, int &r2, int xMin,
            int xMax, int yIdx, int zIdx, int &iter);

The documentation describes what each of the parameters is for.  I
started work on a proper iterator for vtkImageStencilData many, many
years ago but never found time to finish it.

  David


On Tue, Jul 20, 2010 at 5:00 PM, Prathamesh Kulkarni
<prathameshmkulkarni at gmail.com> wrote:
> Hello all,
>
> I want to be able to write vtkImageStencilData to text files in a CSV format
> in order to be analyzed in some other software.
>
> I could not find a way to iterate through vtkImageStencilData similar to
> vtkImageData.
>
> One idea is to convert the vtkImageStencilData to vtkImageData and then use
> vtkImageIterator. However, I do not know how to perform this conversion.
>
> Has anyone tried this before? How?
>
> Thanks,
> Prathamesh
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list