MCPcopy Create free account
hub / github.com/MITK/MITK / DICOMStringToSpacing

Method DICOMStringToSpacing

Modules/DICOM/src/mitkDICOMTag.cpp:161–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159
160
161bool
162mitk::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
185mitk::Point3D mitk::DICOMStringToPoint3D( const std::string& s, bool& successful )

Callers

nothing calls this directly

Calls 2

splitFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected