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

Method run

Modules/MatchPointRegistrationUI/src/QmitkRegistrationJob.cpp:164–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void QmitkRegistrationJob::run()
165{
166 try
167 {
168 mitk::MAPAlgorithmHelper helper(m_spLoadedAlgorithm);
169 mitk::MaskedAlgorithmHelper maskedHelper(m_spLoadedAlgorithm);
170
171 //*@TODO Data Check and failure handle
172 helper.SetData(this->m_spMovingData, this->m_spTargetData);
173 maskedHelper.SetMasks(this->m_spMovingMask, this->m_spTargetMask);
174
175 // perform registration
176 m_spResultRegistration = helper.GetRegistration();
177
178 // wrap the registration in a data node
179 if (m_spResultRegistration.IsNull())
180 {
181 emit Error(QString("Error. No registration was determined. No results to store."));
182 }
183 else
184 {
185 auto spRegWrapper = mitk::MAPRegistrationWrapper::New(m_spResultRegistration);
186
187 emit RegResultIsAvailable(spRegWrapper, this);
188 }
189 }
190 catch (::std::exception &e)
191 {
192 emit Error(QString("Error while registering data. Details: ") + QString::fromLatin1(e.what()));
193 }
194 catch (...)
195 {
196 emit Error(QString("Unknown error when registering data."));
197 }
198
199 emit Finished();
200}

Callers

nothing calls this directly

Calls 7

SetMasksMethod · 0.80
whatMethod · 0.80
QStringClass · 0.50
NewFunction · 0.50
SetDataMethod · 0.45
GetRegistrationMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected