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

Method RequestData

Filters/Extraction/vtkExtractGrid.cxx:138–159  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

136
137//------------------------------------------------------------------------------
138int 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//------------------------------------------------------------------------------
162bool vtkExtractGrid::RequestDataImpl(

Callers

nothing calls this directly

Calls 9

RequestDataImplMethod · 0.95
GetInformationObjectMethod · 0.80
GetDataFunction · 0.50
InitializeMethod · 0.45
GetExtentMethod · 0.45
IsValidMethod · 0.45
GetMethod · 0.45
SetExtentMethod · 0.45
GetOutputWholeExtentMethod · 0.45

Tested by

no test coverage detected