[vtkusers] Splitting vtkPolyData using scalars

Bill Lorensen bill.lorensen at gmail.com
Mon Aug 9 11:52:59 EDT 2010


Take a look at this example:
http://vtk.org/Wiki/VTK/Examples/Medical/GenerateModelsFromLabels

In the for look, it uses vtkThreshold to split a model into separate
models for each scalar value.

On Mon, Aug 9, 2010 at 11:41 AM, Chris Turner
<cturnercomplex at googlemail.com> wrote:
> Hi,
>
> I have a surface model whose cells are assigned to scalar integers.
> Now I want to split the model accordingly to it's scalar values. So
> for every value I want a new vtkPolyData.
>
> basically something like this (pseudo code):
>
> for each c in poly.GetCells()
>   newPolyData[c.GetValue()].AddCell(c)
>
> I know you can do this by hand but I was wondering if there is a
> filter or a method which can help me with that.
>
>
> Thanks,
> Chris
> _______________________________________________
> 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