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

Method GetSelectedItems

Filters/Extraction/vtkConvertSelection.cxx:1078–1101  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1076
1077//------------------------------------------------------------------------------
1078void vtkConvertSelection::GetSelectedItems(
1079 vtkSelection* input, vtkDataObject* data, int fieldType, vtkIdTypeArray* indices)
1080{
1081 vtkSelection* indexSel =
1082 vtkConvertSelection::ToSelectionType(input, data, vtkSelectionNode::INDICES);
1083 for (unsigned int n = 0; n < indexSel->GetNumberOfNodes(); ++n)
1084 {
1085 vtkSelectionNode* node = indexSel->GetNode(n);
1086 vtkIdTypeArray* list = vtkArrayDownCast<vtkIdTypeArray>(node->GetSelectionList());
1087 if (node->GetFieldType() == fieldType && node->GetContentType() == vtkSelectionNode::INDICES &&
1088 list)
1089 {
1090 for (vtkIdType i = 0; i < list->GetNumberOfTuples(); ++i)
1091 {
1092 vtkIdType cur = list->GetValue(i);
1093 if (indices->LookupValue(cur) < 0)
1094 {
1095 indices->InsertNextValue(cur);
1096 }
1097 }
1098 }
1099 }
1100 indexSel->Delete();
1101}
1102
1103//------------------------------------------------------------------------------
1104void vtkConvertSelection::GetSelectedVertices(

Callers

nothing calls this directly

Calls 10

GetSelectionListMethod · 0.80
DeleteMethod · 0.65
GetNumberOfNodesMethod · 0.45
GetNodeMethod · 0.45
GetFieldTypeMethod · 0.45
GetContentTypeMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetValueMethod · 0.45
LookupValueMethod · 0.45
InsertNextValueMethod · 0.45

Tested by

no test coverage detected