------------------------------------------------------------------------------
| 83 | |
| 84 | //------------------------------------------------------------------------------ |
| 85 | int vtkReflectionFilter::RequestData(vtkInformation* vtkNotUsed(request), |
| 86 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 87 | { |
| 88 | // get the input and output |
| 89 | vtkDataSet* inputDS = vtkDataSet::GetData(inputVector[0], 0); |
| 90 | vtkUnstructuredGrid* outputUG = vtkUnstructuredGrid::GetData(outputVector, 0); |
| 91 | |
| 92 | vtkCompositeDataSet* inputCD = vtkCompositeDataSet::GetData(inputVector[0], 0); |
| 93 | vtkCompositeDataSet* outputCD = vtkCompositeDataSet::GetData(outputVector, 0); |
| 94 | |
| 95 | if (inputDS && outputUG) |
| 96 | { |
| 97 | double bounds[6]; |
| 98 | this->ComputeBounds(inputDS, bounds); |
| 99 | return this->RequestDataInternal(inputDS, outputUG, bounds); |
| 100 | } |
| 101 | |
| 102 | if (inputCD && outputCD) |
| 103 | { |
| 104 | outputCD->CopyStructure(inputCD); |
| 105 | double bounds[6]; |
| 106 | if (this->ComputeBounds(inputCD, bounds)) |
| 107 | { |
| 108 | vtkSmartPointer<vtkCompositeDataIterator> iter; |
| 109 | iter.TakeReference(inputCD->NewIterator()); |
| 110 | for (iter->InitTraversal(); !iter->IsDoneWithTraversal(); iter->GoToNextItem()) |
| 111 | { |
| 112 | if (this->CheckAbort()) |
| 113 | { |
| 114 | break; |
| 115 | } |
| 116 | vtkDataSet* ds = vtkDataSet::SafeDownCast(iter->GetCurrentDataObject()); |
| 117 | vtkSmartPointer<vtkUnstructuredGrid> ug = vtkSmartPointer<vtkUnstructuredGrid>::New(); |
| 118 | if (!this->RequestDataInternal(ds, ug, bounds)) |
| 119 | { |
| 120 | return 0; |
| 121 | } |
| 122 | |
| 123 | outputCD->SetDataSet(iter, ug); |
| 124 | } |
| 125 | } |
| 126 | return 1; |
| 127 | } |
| 128 | |
| 129 | return 0; |
| 130 | } |
| 131 | |
| 132 | //------------------------------------------------------------------------------ |
| 133 | int vtkReflectionFilter::RequestDataInternal( |
nothing calls this directly
no test coverage detected