[vtkusers] Set the visibility of a single cell

Jana Sefcikova neollie at gmail.com
Thu Sep 6 05:45:56 EDT 2012


Hi , I realized visibility by adding unsigned char array to polydata (0=
not visible, 1=visible) and than thresholding visible points/cells by
vtkThresholdPoints. Here is example

    // Select only used lights

    vtkSmartPointer<vtkThresholdPoints> thresholdF =
vtkSmartPointer<vtkThresholdPoints>::New();

thresholdF->ThresholdBetween(1, 1);

    lightsDirections->GetPointData()->SetActiveScalars("Is_Used");

    thresholdF->SetInputArrayToProcess(0, 0, 0,
vtkDataObject::FIELD_ASSOCIATION_POINTS, "Is_Used");

    //thresholdF->SetInput(lightsDirections);

    thresholdF->SetInputConnection(0,filterGDL->GetOutputPort(1));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120906/70010a80/attachment.htm>


More information about the vtkusers mailing list