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

Function setArrayComponentInfo

Common/ExecutionModel/vtkAlgorithm.cxx:75–91  ·  view source on GitHub ↗

Set or unset the vtkDataObject::FIELD_ATTRIBUTE_COMPONENT() value of \a info.

Source from the content-addressed store, hash-verified

73
74// Set or unset the vtkDataObject::FIELD_ATTRIBUTE_COMPONENT() value of \a info.
75void setArrayComponentInfo(vtkInformation* info, int component)
76{
77 switch (component)
78 {
79 case vtkArrayComponents::Requested:
80 vtkErrorWithObjectMacro(
81 info, "SetInputArrayToProcess should never be called with 'requested' components.");
82 [[fallthrough]];
83 case vtkArrayComponents::AllComponents:
84 // Remove the key since entire tuples should be processed rather than a component.
85 info->Remove(vtkDataObject::FIELD_ATTRIBUTE_COMPONENT());
86 break;
87 default:
88 info->Set(vtkDataObject::FIELD_ATTRIBUTE_COMPONENT(), component);
89 break;
90 }
91}
92
93vtkSmartPointer<vtkAbstractArray> arrayWithRequestedComponent(
94 vtkAbstractArray* array, int specifiedComponent, int requestedComponent)

Callers 1

Calls 2

RemoveMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected