------------------------------------------------------------------------------
| 32 | |
| 33 | //------------------------------------------------------------------------------ |
| 34 | int vtkHyperTreeGridOutlineFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 35 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 36 | { |
| 37 | // get the info objects |
| 38 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 39 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 40 | |
| 41 | // get the input and output |
| 42 | vtkHyperTreeGrid* input = |
| 43 | vtkHyperTreeGrid::SafeDownCast(inInfo->Get(vtkHyperTreeGrid::DATA_OBJECT())); |
| 44 | if (!input) |
| 45 | { |
| 46 | vtkErrorMacro( |
| 47 | "Incorrect type of input: " << inInfo->Get(vtkHyperTreeGrid::DATA_OBJECT())->GetClassName()); |
| 48 | return 0; |
| 49 | } |
| 50 | |
| 51 | vtkPolyData* output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 52 | if (!output) |
| 53 | { |
| 54 | vtkErrorMacro( |
| 55 | "Incorrect type of output: " << outInfo->Get(vtkDataObject::DATA_OBJECT())->GetClassName()); |
| 56 | return 0; |
| 57 | } |
| 58 | |
| 59 | vtkDebugMacro(<< "Creating dataset outline"); |
| 60 | |
| 61 | // |
| 62 | // Let OutlineSource do all the work |
| 63 | // |
| 64 | |
| 65 | this->OutlineSource->SetBounds(input->GetBounds()); |
| 66 | this->OutlineSource->SetGenerateFaces(this->GenerateFaces); |
| 67 | this->OutlineSource->SetContainerAlgorithm(this); |
| 68 | this->OutlineSource->Update(); |
| 69 | |
| 70 | output->CopyStructure(this->OutlineSource->GetOutput()); |
| 71 | |
| 72 | return 1; |
| 73 | } |
| 74 | |
| 75 | //------------------------------------------------------------------------------ |
| 76 | int vtkHyperTreeGridOutlineFilter::FillInputPortInformation(int, vtkInformation* info) |
nothing calls this directly
no test coverage detected