| 36 | } |
| 37 | |
| 38 | int vtkDataSetTriangleFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 39 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 40 | { |
| 41 | // get the info objects |
| 42 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 43 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 44 | |
| 45 | // get the input and output |
| 46 | vtkDataSet* input = vtkDataSet::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 47 | vtkUnstructuredGrid* output = |
| 48 | vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 49 | |
| 50 | if (input->IsA("vtkStructuredPoints") || input->IsA("vtkStructuredGrid") || |
| 51 | input->IsA("vtkImageData") || input->IsA("vtkRectilinearGrid")) |
| 52 | { |
| 53 | this->StructuredExecute(input, output); |
| 54 | } |
| 55 | else |
| 56 | { |
| 57 | this->UnstructuredExecute(input, output); |
| 58 | } |
| 59 | |
| 60 | vtkDebugMacro(<< "Produced " << this->GetOutput()->GetNumberOfCells() << " cells"); |
| 61 | |
| 62 | return 1; |
| 63 | } |
| 64 | |
| 65 | void vtkDataSetTriangleFilter::StructuredExecute(vtkDataSet* input, vtkUnstructuredGrid* output) |
| 66 | { |
nothing calls this directly
no test coverage detected