MCPcopy Create free account
hub / github.com/Kitware/VTK / ExtractStructuredGrid

Method ExtractStructuredGrid

Filters/ParallelImaging/vtkExtractPiece.cxx:203–231  ·  view source on GitHub ↗

=============================================================================

Source from the content-addressed store, hash-verified

201
202//=============================================================================
203void 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//=============================================================================
234void vtkExtractPiece::ExtractUnstructuredGrid(vtkUnstructuredGrid* uGrid,

Callers 1

RequestDataMethod · 0.95

Calls 14

PieceToExtentMethod · 0.80
UpdateExtentMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
GetExtentMethod · 0.45
SetNumberOfPiecesMethod · 0.45
SetWholeExtentMethod · 0.45
SetInputDataMethod · 0.45
GetOutputInformationMethod · 0.45
UpdateInformationMethod · 0.45
SetMethod · 0.45
ShallowCopyMethod · 0.45

Tested by

no test coverage detected