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

Method ParseCFactor

IO/AMR/vtkAMREnzoReader.cxx:130–146  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

128
129//------------------------------------------------------------------------------
130void vtkAMREnzoReader::ParseCFactor(const std::string& labelString, int& idx, double& factor)
131{
132 std::vector<std::string> strings;
133
134 std::istringstream iss(labelString);
135 std::string word;
136 while (iss >> word)
137 {
138 if (!vtksys::SystemTools::StringStartsWith(word.c_str(), "="))
139 {
140 strings.push_back(word);
141 }
142 }
143
144 idx = this->GetIndexFromArrayName(strings[0]);
145 VTK_FROM_CHARS_IF_ERROR_BREAK(strings[strings.size() - 1], factor);
146}
147
148//------------------------------------------------------------------------------
149void vtkAMREnzoReader::ParseConversionFactors()

Callers 1

Calls 4

GetIndexFromArrayNameMethod · 0.95
c_strMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected