------------------------------------------------------------------------------
| 114 | |
| 115 | //------------------------------------------------------------------------------ |
| 116 | static std::vector<double> ParseVector(std::string s) |
| 117 | { |
| 118 | std::vector<double> result; |
| 119 | |
| 120 | s = trim(s); |
| 121 | if ((s[0] != '(') || (s[s.length() - 1] != ')')) |
| 122 | return result; |
| 123 | s = s.substr(1, s.length() - 2); |
| 124 | while (true) |
| 125 | { |
| 126 | size_t i = s.find(','); |
| 127 | std::string value = s.substr(0, i); |
| 128 | result.push_back(vtk::scan_value<double>(value)->value()); |
| 129 | if (i == std::string::npos) |
| 130 | break; |
| 131 | s = s.substr(i + 1); |
| 132 | } |
| 133 | |
| 134 | return result; |
| 135 | } |
| 136 | |
| 137 | //------------------------------------------------------------------------------ |
| 138 | static int NrrdType2VTKType(std::string nrrdType) |