------------------------------------------------------------------------------ This method simply copies by reference the input data to the output.
| 162 | //------------------------------------------------------------------------------ |
| 163 | // This method simply copies by reference the input data to the output. |
| 164 | int vtkStructuredGridClip::RequestData(vtkInformation* vtkNotUsed(request), |
| 165 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 166 | { |
| 167 | int* inExt; |
| 168 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 169 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 170 | |
| 171 | vtkStructuredGrid* outData = |
| 172 | vtkStructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 173 | vtkStructuredGrid* inData = |
| 174 | vtkStructuredGrid::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 175 | |
| 176 | inExt = inData->GetExtent(); |
| 177 | |
| 178 | outData->SetExtent(inExt); |
| 179 | outData->GetPointData()->PassData(inData->GetPointData()); |
| 180 | outData->GetCellData()->PassData(inData->GetCellData()); |
| 181 | outData->SetPoints(inData->GetPoints()); |
| 182 | |
| 183 | if (this->ClipData) |
| 184 | { |
| 185 | outData->Crop(outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT())); |
| 186 | } |
| 187 | |
| 188 | this->CheckAbort(); |
| 189 | |
| 190 | return 1; |
| 191 | } |
| 192 | VTK_ABI_NAMESPACE_END |
nothing calls this directly
no test coverage detected