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

Method RequestInformation

IO/Image/vtkImageReader.cxx:76–114  ·  view source on GitHub ↗

This method returns the largest data that can be generated. ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

74// This method returns the largest data that can be generated.
75//------------------------------------------------------------------------------
76int vtkImageReader::RequestInformation(vtkInformation* vtkNotUsed(request),
77 vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector)
78{
79 // call the old method to help with backwards compatibility
80 this->ExecuteInformation();
81
82 // get the info objects
83 vtkInformation* outInfo = outputVector->GetInformationObject(0);
84 outInfo->Set(vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT(), 1);
85
86 double spacing[3];
87 int extent[6];
88 double origin[3];
89
90 // set the extent, if the VOI has not been set then default to
91 // the DataExtent
92 if (this->DataVOI[0] || this->DataVOI[1] || this->DataVOI[2] || this->DataVOI[3] ||
93 this->DataVOI[4] || this->DataVOI[5])
94 {
95 this->ComputeTransformedExtent(this->DataVOI, extent);
96 }
97 else
98 {
99 this->ComputeTransformedExtent(this->DataExtent, extent);
100 }
101 outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent, 6);
102
103 // set the spacing
104 this->ComputeTransformedSpacing(spacing);
105 outInfo->Set(vtkDataObject::SPACING(), this->DataSpacing, 3);
106
107 // set the origin.
108 this->ComputeTransformedOrigin(origin);
109 outInfo->Set(vtkDataObject::ORIGIN(), this->DataOrigin, 3);
110
111 vtkDataObject::SetPointDataActiveScalarInfo(
112 outInfo, this->DataScalarType, this->NumberOfScalarComponents);
113 return 1;
114}
115
116//------------------------------------------------------------------------------
117int vtkImageReader::OpenAndSeekFile(int dataExtent[6], int idx)

Callers

nothing calls this directly

Calls 6

GetInformationObjectMethod · 0.80
ExecuteInformationMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected