=============================================================================
| 201 | |
| 202 | //============================================================================= |
| 203 | void vtkExtractPiece::ExtractStructuredGrid(vtkStructuredGrid* sGrid, vtkCompositeDataSet* output, |
| 204 | int piece, int numberOfPieces, int ghostLevel, vtkCompositeDataIterator* iter) |
| 205 | { |
| 206 | vtkInformation* extractInfo; |
| 207 | int ext[6]; |
| 208 | |
| 209 | vtkExtractGrid* extractSG = vtkExtractGrid::New(); |
| 210 | sGrid->GetExtent(ext); |
| 211 | |
| 212 | vtkExtentTranslator* translate = vtkExtentTranslator::New(); |
| 213 | translate->SetPiece(piece); |
| 214 | translate->SetNumberOfPieces(numberOfPieces); |
| 215 | translate->SetGhostLevel(ghostLevel); |
| 216 | translate->SetWholeExtent(ext); |
| 217 | translate->PieceToExtent(); |
| 218 | translate->GetExtent(ext); |
| 219 | |
| 220 | extractSG->SetInputData(sGrid); |
| 221 | extractInfo = extractSG->GetOutputInformation(0); |
| 222 | extractSG->UpdateInformation(); |
| 223 | extractInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1); |
| 224 | extractSG->UpdateExtent(ext); |
| 225 | vtkStructuredGrid* extractOutput = vtkStructuredGrid::New(); |
| 226 | extractOutput->ShallowCopy(extractSG->GetOutput()); |
| 227 | output->SetDataSet(iter, extractOutput); |
| 228 | extractSG->Delete(); |
| 229 | translate->Delete(); |
| 230 | extractOutput->Delete(); |
| 231 | } |
| 232 | |
| 233 | //============================================================================= |
| 234 | void vtkExtractPiece::ExtractUnstructuredGrid(vtkUnstructuredGrid* uGrid, |
no test coverage detected