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

Method RequestInformation

IO/AMR/vtkAMRBaseReader.cxx:224–259  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

222
223//------------------------------------------------------------------------------
224int vtkAMRBaseReader::RequestInformation(
225 vtkInformation* rqst, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
226{
227 if (this->LoadedMetaData)
228 {
229 return (1);
230 }
231
232 this->Superclass::RequestInformation(rqst, inputVector, outputVector);
233
234 if (this->Metadata == nullptr)
235 {
236 this->Metadata = vtkOverlappingAMR::New();
237 }
238 else
239 {
240 this->Metadata->Initialize();
241 }
242 this->FillMetaData();
243 vtkInformation* info = outputVector->GetInformationObject(0);
244 assert("pre: output information object is nullptr" && (info != nullptr));
245 info->Set(vtkCompositeDataPipeline::COMPOSITE_DATA_META_DATA(), this->Metadata);
246 if (this->Metadata && this->Metadata->GetInformation()->Has(vtkDataObject::DATA_TIME_STEP()))
247 {
248 double dataTime = this->Metadata->GetInformation()->Get(vtkDataObject::DATA_TIME_STEP());
249 info->Set(vtkStreamingDemandDrivenPipeline::TIME_STEPS(), &dataTime, 1);
250
251 vtkTimerLog::MarkStartEvent("vtkAMRBaseReader::GenerateParentChildInformation");
252 this->Metadata->GenerateParentChildInformation();
253 vtkTimerLog::MarkEndEvent("vtkAMRBaseReader::GenerateParentChildInformation");
254 }
255
256 info->Set(CAN_HANDLE_PIECE_REQUEST(), 1);
257 this->LoadedMetaData = true;
258 return 1;
259}
260
261//------------------------------------------------------------------------------
262void vtkAMRBaseReader::SetupBlockRequest(vtkInformation* outInf)

Callers

nothing calls this directly

Calls 10

GetInformationObjectMethod · 0.80
NewFunction · 0.50
assertFunction · 0.50
InitializeMethod · 0.45
FillMetaDataMethod · 0.45
SetMethod · 0.45
HasMethod · 0.45
GetInformationMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected