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

Method ReadPrimaryElement

IO/XML/vtkXMLStructuredDataReader.cxx:59–84  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

57
58//------------------------------------------------------------------------------
59int vtkXMLStructuredDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary)
60{
61 // Get the whole extent attribute.
62 int extent[6];
63 if (ePrimary->GetVectorAttribute("WholeExtent", 6, extent) == 6)
64 {
65 memcpy(this->WholeExtent, extent, 6 * sizeof(int));
66
67 // Set the output's whole extent.
68 vtkInformation* outInfo = this->GetCurrentOutputInformation();
69 outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent, 6);
70
71 // Check each axis to see if it has cells.
72 for (int a = 0; a < 3; ++a)
73 {
74 this->AxesEmpty[a] = (extent[2 * a + 1] > extent[2 * a]) ? 0 : 1;
75 }
76 }
77 else
78 {
79 vtkErrorMacro(<< this->GetDataSetName() << " element has no WholeExtent.");
80 return 0;
81 }
82
83 return this->Superclass::ReadPrimaryElement(ePrimary);
84}
85
86//------------------------------------------------------------------------------
87void vtkXMLStructuredDataReader::SetupOutputInformation(vtkInformation* outInfo)

Callers

nothing calls this directly

Calls 4

GetVectorAttributeMethod · 0.80
SetMethod · 0.45
GetDataSetNameMethod · 0.45

Tested by

no test coverage detected