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

Function loadAlgorithm

Modules/MatchPointRegistration/cmdapps/MatchImage.cpp:171–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171map::deployment::RegistrationAlgorithmBasePointer loadAlgorithm(const Settings& settings)
172{
173 map::deployment::RegistrationAlgorithmBasePointer spAlgorithmBase = nullptr;
174
175 std::cout << std::endl << "Load registration algorithm..." << std::endl;
176
177 map::deployment::DLLHandle::Pointer spHandle = nullptr;
178
179 spHandle = map::deployment::openDeploymentDLL(settings.algFileName);
180
181 if (spHandle.IsNull())
182 {
183 mapDefaultExceptionStaticMacro(<<
184 "Cannot open deployed registration algorithm file.");
185 }
186
187 std::cout << "... library opened..." << std::endl;
188
189 std::cout << "Algorithm information: " << std::endl;
190 spHandle->getAlgorithmUID().Print(std::cout, 2);
191 std::cout << std::endl;
192
193 //Now load the algorithm from DLL
194 spAlgorithmBase = map::deployment::getRegistrationAlgorithm(spHandle);
195
196
197 if (spAlgorithmBase.IsNotNull())
198 {
199 std::cout << "... done" << std::endl << std::endl;
200 }
201 else
202 {
203 mapDefaultExceptionStaticMacro(<< "Cannot create algorithm instance");
204 }
205 return spAlgorithmBase;
206};
207
208mitk::Image::Pointer loadMaskImage(std::string filepath, std::string labelName = "")
209{

Callers 1

mainFunction · 0.85

Calls 3

IsNotNullMethod · 0.80
IsNullMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected