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

Method ReadPrimaryElement

IO/XML/vtkXMLPStructuredDataReader.cxx:170–198  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

168
169//------------------------------------------------------------------------------
170int vtkXMLPStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary)
171{
172 if (!this->Superclass::ReadPrimaryElement(ePrimary))
173 {
174 return 0;
175 }
176
177 // Get the whole extent attribute.
178 int extent[6];
179 if (ePrimary->GetVectorAttribute("WholeExtent", 6, extent) == 6)
180 {
181 // Set the output's whole extent.
182 vtkInformation* outInfo = this->GetCurrentOutputInformation();
183 outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent, 6);
184
185 // Check each axis to see if it has cells.
186 for (int a = 0; a < 3; ++a)
187 {
188 this->AxesEmpty[a] = (extent[2 * a + 1] > extent[2 * a]) ? 0 : 1;
189 }
190 }
191 else
192 {
193 vtkErrorMacro(<< this->GetDataSetName() << " element has no WholeExtent.");
194 return 0;
195 }
196
197 return 1;
198}
199
200//------------------------------------------------------------------------------
201void vtkXMLPStructuredDataReader::CopyOutputInformation(vtkInformation* outInfo, int port)

Callers

nothing calls this directly

Calls 4

GetVectorAttributeMethod · 0.80
SetMethod · 0.45
GetDataSetNameMethod · 0.45

Tested by

no test coverage detected