Set or unset the vtkDataObject::FIELD_ATTRIBUTE_COMPONENT() value of \a info.
| 73 | |
| 74 | // Set or unset the vtkDataObject::FIELD_ATTRIBUTE_COMPONENT() value of \a info. |
| 75 | void 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 | |
| 93 | vtkSmartPointer<vtkAbstractArray> arrayWithRequestedComponent( |
| 94 | vtkAbstractArray* array, int specifiedComponent, int requestedComponent) |
no test coverage detected