MCPcopy Create free account
hub / github.com/Kitware/VTK / InvertSelection

Function InvertSelection

Filters/Extraction/vtkExtractSelection.cxx:193–204  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

191{
192//----------------------------------------------------------------------------
193void InvertSelection(vtkSignedCharArray* array)
194{
195 const vtkIdType n = array->GetNumberOfTuples();
196 vtkSMPTools::For(0, n,
197 [&array](vtkIdType start, vtkIdType end)
198 {
199 for (vtkIdType i = start; i < end; ++i)
200 {
201 array->SetValue(i, static_cast<signed char>(array->GetValue(i) * -1 + 1));
202 }
203 });
204}
205
206//----------------------------------------------------------------------------
207// Remove all selection nodes that their propId = vtkSelectionNode::PROCESS_ID()

Callers 2

EvaluateSelectionMethod · 0.85

Calls 4

ForFunction · 0.50
GetNumberOfTuplesMethod · 0.45
SetValueMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected