------------------------------------------------------------------------------
| 136 | |
| 137 | //------------------------------------------------------------------------------ |
| 138 | int vtkExtractGrid::RequestData(vtkInformation* vtkNotUsed(request), |
| 139 | vtkInformationVector** inputVector, vtkInformationVector* outputVector) |
| 140 | { |
| 141 | // Reset internal helper to the actual extents of the piece we're working on: |
| 142 | vtkInformation* inInfo = inputVector[0]->GetInformationObject(0); |
| 143 | vtkStructuredGrid* inGrid = vtkStructuredGrid::GetData(inInfo); |
| 144 | this->Internal->Initialize( |
| 145 | this->VOI, inGrid->GetExtent(), this->SampleRate, (this->IncludeBoundary != 0)); |
| 146 | |
| 147 | if (!this->Internal->IsValid()) |
| 148 | { |
| 149 | return 0; |
| 150 | } |
| 151 | |
| 152 | // Set the output extent -- this is how RequestDataImpl knows what to copy. |
| 153 | vtkInformation* outInfo = outputVector->GetInformationObject(0); |
| 154 | vtkStructuredGrid* output = |
| 155 | vtkStructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT())); |
| 156 | output->SetExtent(this->Internal->GetOutputWholeExtent()); |
| 157 | |
| 158 | return this->RequestDataImpl(inputVector, outputVector) ? 1 : 0; |
| 159 | } |
| 160 | |
| 161 | //------------------------------------------------------------------------------ |
| 162 | bool vtkExtractGrid::RequestDataImpl( |
nothing calls this directly
no test coverage detected