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

Function GetVector

IO/Image/vtkNrrdReader.cxx:82–96  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

80
81//------------------------------------------------------------------------------
82static void GetVector(std::string& s, std::vector<int>& dest)
83{
84 std::vector<std::string> strlist = split(s);
85 for (size_t i = 0; i < dest.size(); i++)
86 {
87 if (i < strlist.size())
88 {
89 dest[i] = vtk::scan_int<int>(strlist[i])->value();
90 }
91 else
92 {
93 dest[i] = 0;
94 }
95 }
96}
97
98//------------------------------------------------------------------------------
99static void GetVector(std::string& s, std::vector<double>& dest)

Callers 1

ReadHeaderMethod · 0.85

Calls 3

splitFunction · 0.70
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected