---------------------------------------------------------------------------- Remove all selection nodes that their propId = vtkSelectionNode::PROCESS_ID() is not the same as the processId = vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER().
| 207 | // Remove all selection nodes that their propId = vtkSelectionNode::PROCESS_ID() |
| 208 | // is not the same as the processId = vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER(). |
| 209 | void 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 | //------------------------------------------------------------------------------ |
no test coverage detected