| 44 | } |
| 45 | |
| 46 | int vtkExtractArray::RequestData( |
| 47 | vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 48 | { |
| 49 | vtkArrayData* const input = vtkArrayData::GetData(inputVector[0]); |
| 50 | |
| 51 | if (this->Index < 0 || this->Index >= input->GetNumberOfArrays()) |
| 52 | { |
| 53 | vtkErrorMacro(<< "Array index " << this->Index << " out-of-range for vtkArrayData containing " |
| 54 | << input->GetNumberOfArrays() << " arrays."); |
| 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | vtkArrayData* const output = vtkArrayData::GetData(outputVector); |
| 59 | output->ClearArrays(); |
| 60 | output->AddArray(input->GetArray(this->Index)); |
| 61 | |
| 62 | this->CheckAbort(); |
| 63 | |
| 64 | return 1; |
| 65 | } |
| 66 | VTK_ABI_NAMESPACE_END |
nothing calls this directly
no test coverage detected