[vtkusers] Extract all cell within range by thresholding.
David E DeMarle
dave.demarle at kitware.com
Mon Jun 29 09:46:50 EDT 2015
Apply the threshold filter to an unstructured grid that contains the 3D
elements (voxels and tetrahedrons for example). Polydata can only contain
2D elements (quadrilaterals and triangles for example.)
Was the polydata produces by an extract surface filter? If so, apply the
threshold to whatever you fed into that instead.
hth
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Fri, Jun 26, 2015 at 5:15 AM, madz <madaramh at gmail.com> wrote:
> I tried the following method to extract cells from a polydata within a
> range,
>
> vtkSmartPointer<vtkThreshold> threshold =
> vtkSmartPointer<vtkThreshold>::New();
> #if VTK_MAJOR_VERSION <= 5
> threshold->SetInput(polydata);
> #else
> threshold->SetInputData(polydata);
> #endif
> threshold->ThresholdBetween(1364623,1598476);
> threshold->SetInputArrayToProcess(0, 0, 0,
> vtkDataObject::FIELD_ASSOCIATION_CELLS, "Index1");
> threshold->Update();
>
> However both this only gives an unstructured grid which displays the outer
> cells of the threshold with none of the inside cells.
>
> How do I get all the cells within the range, and not just the crust.
> Thank you.
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Extract-all-cell-within-range-by-thresholding-tp5732554.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150629/f962ecfe/attachment.html>
More information about the vtkusers
mailing list