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

Function vtkTrimSelection

Filters/Extraction/vtkExtractSelection.cxx:209–226  ·  view source on GitHub ↗

---------------------------------------------------------------------------- Remove all selection nodes that their propId = vtkSelectionNode::PROCESS_ID() is not the same as the processId = vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER().

Source from the content-addressed store, hash-verified

207// Remove all selection nodes that their propId = vtkSelectionNode::PROCESS_ID()
208// is not the same as the processId = vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER().
209void vtkTrimSelection(vtkSelection* input, int processId)
210{
211 if (input)
212 {
213 unsigned int numNodes = input->GetNumberOfNodes();
214 for (unsigned int cc = 0; cc < numNodes; cc++)
215 {
216 vtkSelectionNode* node = input->GetNode(cc);
217 int propId = (node->GetProperties()->Has(vtkSelectionNode::PROCESS_ID()))
218 ? node->GetProperties()->Get(vtkSelectionNode::PROCESS_ID())
219 : -1;
220 if (propId != -1 && processId != -1 && propId != processId)
221 {
222 input->RemoveNode(node);
223 }
224 }
225 }
226}
227}
228
229//------------------------------------------------------------------------------

Callers 1

RequestDataMethod · 0.85

Calls 5

GetNumberOfNodesMethod · 0.45
GetNodeMethod · 0.45
HasMethod · 0.45
GetMethod · 0.45
RemoveNodeMethod · 0.45

Tested by

no test coverage detected