| 169 | } |
| 170 | |
| 171 | map::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 | |
| 208 | mitk::Image::Pointer loadMaskImage(std::string filepath, std::string labelName = "") |
| 209 | { |