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

Method DICOMStringToOrientationVectors

Modules/DICOM/src/mitkDICOMTag.cpp:123–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void mitk::DICOMStringToOrientationVectors( const std::string& s,
124 Vector3D& right,
125 Vector3D& up,
126 bool& successful )
127{
128 successful = false;
129
130 try
131 {
132 std::vector<std::string> strs;
133 boost::split( strs, s, boost::is_any_of( "\\" ) );
134 if ( strs.size() == 6 )
135 {
136 int i = 0;
137 for ( ; i < 3; ++i )
138 {
139 right[i] = OFStandard::atof( strs[i].c_str() );
140 }
141 for ( ; i < 6; ++i )
142 {
143 up[i - 3] = OFStandard::atof( strs[i].c_str() );
144 }
145 successful = true;
146 }
147 }
148 catch ( const std::exception& /*e*/ )
149 {
150 right.Fill( 0.0 );
151 right[0] = 1.0;
152
153 up.Fill( 0.0 );
154 up[1] = 1.0;
155
156 successful = false;
157 }
158}
159
160
161bool

Callers

nothing calls this directly

Calls 3

splitFunction · 0.85
sizeMethod · 0.45
FillMethod · 0.45

Tested by

no test coverage detected