| 159 | |
| 160 | |
| 161 | bool |
| 162 | mitk::DICOMStringToSpacing(const std::string& s, ScalarType& spacingX, ScalarType& spacingY) |
| 163 | { |
| 164 | bool successful = false; |
| 165 | |
| 166 | try |
| 167 | { |
| 168 | std::vector<std::string> strs; |
| 169 | boost::split( strs, s, boost::is_any_of( "\\" ) ); |
| 170 | if ( strs.size() > 1 ) |
| 171 | { |
| 172 | spacingY = OFStandard::atof( strs[0].c_str() ); |
| 173 | spacingX = OFStandard::atof( strs[1].c_str() ); |
| 174 | successful = true; |
| 175 | } |
| 176 | } |
| 177 | catch ( const std::exception& /*e*/ ) |
| 178 | { |
| 179 | } |
| 180 | |
| 181 | return successful; |
| 182 | } |
| 183 | |
| 184 | |
| 185 | mitk::Point3D mitk::DICOMStringToPoint3D( const std::string& s, bool& successful ) |