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

Method DICOMStringToPoint3D

Modules/DICOM/src/mitkDICOMTag.cpp:185–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183
184
185mitk::Point3D mitk::DICOMStringToPoint3D( const std::string& s, bool& successful )
186{
187 Point3D p;
188 successful = true;
189
190 try
191 {
192 std::vector<std::string> strs;
193 boost::split( strs, s, boost::is_any_of( "\\" ) );
194 if ( strs.size() == 3 )
195 {
196 for ( int i = 0; i < 3; ++i )
197 {
198 p[i] = OFStandard::atof( strs[i].c_str() );
199 }
200 }
201 }
202 catch ( const std::exception& /*e*/ )
203 {
204 p.Fill( 0.0 );
205 }
206
207
208 return p;
209}

Callers

nothing calls this directly

Calls 3

splitFunction · 0.85
sizeMethod · 0.45
FillMethod · 0.45

Tested by

no test coverage detected