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

Method ReadPrimaryElement

IO/XML/vtkXMLPImageDataReader.cxx:73–97  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

71
72//------------------------------------------------------------------------------
73int vtkXMLPImageDataReader::ReadPrimaryElement(vtkXMLDataElement* ePrimary)
74{
75 if (!this->Superclass::ReadPrimaryElement(ePrimary))
76 {
77 return 0;
78 }
79
80 // Get the image's origin.
81 if (ePrimary->GetVectorAttribute("Origin", 3, this->Origin) != 3)
82 {
83 this->Origin[0] = 0;
84 this->Origin[1] = 0;
85 this->Origin[2] = 0;
86 }
87
88 // Get the image's spacing.
89 if (ePrimary->GetVectorAttribute("Spacing", 3, this->Spacing) != 3)
90 {
91 this->Spacing[0] = 1;
92 this->Spacing[1] = 1;
93 this->Spacing[2] = 1;
94 }
95
96 return 1;
97}
98
99//------------------------------------------------------------------------------
100// Note that any changes (add or removing information) made to this method

Callers

nothing calls this directly

Calls 1

GetVectorAttributeMethod · 0.80

Tested by

no test coverage detected