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

Method ParseLabel

IO/AMR/vtkAMREnzoReader.cxx:110–127  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

108
109//------------------------------------------------------------------------------
110void vtkAMREnzoReader::ParseLabel(const std::string& labelString, int& idx, std::string& label)
111{
112
113 std::vector<std::string> strings;
114
115 std::istringstream iss(labelString);
116 std::string word;
117 while (iss >> word)
118 {
119 if (!vtksys::SystemTools::StringStartsWith(word.c_str(), "="))
120 {
121 strings.push_back(word);
122 }
123 }
124
125 idx = this->GetIndexFromArrayName(strings[0]);
126 label = strings[strings.size() - 1];
127}
128
129//------------------------------------------------------------------------------
130void vtkAMREnzoReader::ParseCFactor(const std::string& labelString, int& idx, double& factor)

Callers 1

Calls 4

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

Tested by

no test coverage detected