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

Method GetInputArrayComponent

Common/ExecutionModel/vtkAlgorithm.cxx:599–620  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

597
598//------------------------------------------------------------------------------
599int vtkAlgorithm::GetInputArrayComponent(int idx)
600{
601 vtkInformationVector* inArrayVec = this->Information->Get(INPUT_ARRAYS_TO_PROCESS());
602 if (!inArrayVec)
603 {
604 vtkErrorMacro("Attempt to get an input array for an index that has not been specified");
605 return vtkArrayComponents::AllComponents;
606 }
607 vtkInformation* inArrayInfo = inArrayVec->GetInformationObject(idx);
608 if (!inArrayInfo)
609 {
610 vtkErrorMacro("Attempt to get an input array for an index that has not been specified");
611 return vtkArrayComponents::AllComponents;
612 }
613
614 if (inArrayInfo->Has(vtkDataObject::FIELD_ATTRIBUTE_COMPONENT()))
615 {
616 int component = inArrayInfo->Get(vtkDataObject::FIELD_ATTRIBUTE_COMPONENT());
617 return component;
618 }
619 return vtkArrayComponents::AllComponents;
620}
621
622//------------------------------------------------------------------------------
623vtkDataArray* vtkAlgorithm::GetInputArrayToProcess(int idx, vtkInformationVector** inputVector)

Callers 1

GetInputArrayMethod · 0.95

Calls 3

GetInformationObjectMethod · 0.80
GetMethod · 0.45
HasMethod · 0.45

Tested by

no test coverage detected