diff --git a/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake b/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake index d44b85510b..b94527c3a6 100644 --- a/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake +++ b/CMake/mitkFunctionCreateMatchPointDeployedAlgorithm.cmake @@ -1,102 +1,107 @@ #! #! Create a Command Line App. #! #! \brief This function will create a command line executable and the scripts required to run it #! #! \param NAME (required) Name of the algorithm / cmake target #! \param DEPENDS (optional) Required MITK modules beyond MitkCommandLine #! \param PACKAGE_DEPENDS (optional) list of "packages" this command line app depends on (e.g. ITK, VTK, etc.) #! \param CPP_FILES (optional) list of cpp files, if it is not given NAME.cpp is assumed #! \param INCLUDE_DIRS (optional): All directories that should be added as include dirs to the project #! \param PROFILE (optional): The profile file that should be used for the algorithm. If not set it is "./.profile". +#! \param NO_PROFILE_GEN (optional): Flag. If set no profile resource will be generated. #! \param ADDITIONAL_LIBS (optional) List of additional private libraries linked to this module. #! The folder containing the library will be added to the global list of library search paths. #! \param H_FILES (optional) List of public header files for this module. #! Assuming that there exists a file called MyApp.cpp, an example call looks like: #! \code #! mitkFunctionCreateCommandLineApp( #! NAME MyApp #! DEPENDS MitkCore MitkPlanarFigure #! PACKAGE_DEPENDS ITK VTK #! ) #! \endcode #! function(mitkFunctionCreateMatchPointDeployedAlgorithm) set(_function_params NAME # Name of the algorithm/target + PROFILE # Profile of the algorithm that should be used ) set(_function_multiparams DEPENDS # list of modules this command line app depends on PACKAGE_DEPENDS # list of "packages" this command line app depends on (e.g. ITK, VTK, etc.) CPP_FILES # (optional) list of cpp files, if it is not given NAME.cpp is assumed INCLUDE_DIRS # include directories: [PUBLIC|PRIVATE|INTERFACE] ADDITIONAL_LIBS # list of addidtional private libraries linked to this module. H_FILES # list of header files: [PUBLIC|PRIVATE] ) set(_function_options - + NO_PROFILE_GEN #Flag that indicates that no profile resource should be generated. ) cmake_parse_arguments(ALG "${_function_options}" "${_function_params}" "${_function_multiparams}" ${ARGN}) if( NOT (DEFINED MITK_USE_MatchPoint) OR NOT (${MITK_USE_MatchPoint})) message(FATAL_ERROR "Need package Matchpoint to deploy MatchPoint Algorithms.") endif() if(NOT ALG_NAME) message(FATAL_ERROR "NAME argument cannot be empty.") endif() SET(ALG_TARGET "MDRA_${ALG_NAME}") if(NOT ALG_CPP_FILES) set(ALG_CPP_FILES "${ALG_NAME}.cpp") endif() IF(NOT ALG_PROFILE) set(ALG_PROFILE "${ALG_NAME}.profile") ENDIF(NOT ALG_PROFILE) - MESSAGE(STATUS "... generate MDRA profile (from ${ALG_PROFILE})...") + IF(NOT ALG_NO_PROFILE_GEN) + MESSAGE(STATUS "... generate MDRA profile for ${ALG_NAME} (from ${ALG_PROFILE})...") - include(${MatchPoint_SOURCE_DIR}/CMake/mapFunctionCreateAlgorithmProfile.cmake) - CREATE_ALGORITHM_PROFILE(${ALG_NAME} ${ALG_PROFILE}) + include(${MatchPoint_SOURCE_DIR}/CMake/mapFunctionCreateAlgorithmProfile.cmake) + CREATE_ALGORITHM_PROFILE(${ALG_NAME} ${ALG_PROFILE}) - MESSAGE(STATUS "... algorithm UID: ${ALGORITHM_PROFILE_UID}") + MESSAGE(STATUS "... algorithm UID: ${ALGORITHM_PROFILE_UID}") + ENDIF(NOT ALG_NO_PROFILE_GEN) + MESSAGE(STATUS "... deploy MDRA algorithm ${ALG_NAME}...") ADD_LIBRARY(${ALG_TARGET} SHARED ${ALG_CPP_FILES} ${ALGORITHM_PROFILE_FILE}) SET_TARGET_PROPERTIES(${ALG_TARGET} PROPERTIES OUTPUT_NAME "mdra-${MatchPoint_VERSION_MAJOR}-${MatchPoint_VERSION_MINOR}_${ALG_NAME}" OUTPUT_NAME_DEBUG "mdra-D-${MatchPoint_VERSION_MAJOR}-${MatchPoint_VERSION_MINOR}_${ALG_NAME}" PREFIX "" ) mitk_use_modules(TARGET ${ALG_TARGET} MODULES ${ALG_DEPENDS} PACKAGES PRIVATE ITK MatchPoint ${ALG_PACKAGE_DEPENDS} ) target_include_directories(${ALG_TARGET} PRIVATE ${ALG_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) if(ALG_ADDITIONAL_LIBS) target_link_libraries(${ALG_TARGET} PRIVATE ${ALG_ADDITIONAL_LIBS}) get_property(_mitk_additional_library_search_paths GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS) foreach(_lib_filepath ${ALG_ADDITIONAL_LIBS}) get_filename_component(_search_path "${_lib_filepath}" PATH) if(_search_path) list(APPEND _mitk_additional_library_search_paths "${_search_path}") endif() endforeach() if(_mitk_additional_library_search_paths) list(REMOVE_DUPLICATES _mitk_additional_library_search_paths) set_property(GLOBAL PROPERTY MITK_ADDITIONAL_LIBRARY_SEARCH_PATHS ${_mitk_additional_library_search_paths}) endif() endif() install(TARGETS ${ALG_TARGET} RUNTIME DESTINATION bin LIBRARY DESTINATION bin) endfunction() diff --git a/Modules/MatchPointRegistration/CMakeLists.txt b/Modules/MatchPointRegistration/CMakeLists.txt index d1c55e1ffc..7a5676ebfc 100644 --- a/Modules/MatchPointRegistration/CMakeLists.txt +++ b/Modules/MatchPointRegistration/CMakeLists.txt @@ -1,14 +1,25 @@ MITK_CREATE_MODULE( - INCLUDE_DIRS PUBLIC Rendering Helper + INCLUDE_DIRS PUBLIC Rendering Helper algorithms DEPENDS MitkCore MitkSceneSerializationBase PACKAGE_DEPENDS PUBLIC MatchPoint ) +SET(ALG_PROFILE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/algorithms) + +include(${MatchPoint_SOURCE_DIR}/CMake/mapFunctionCreateAlgorithmProfile.cmake) +file(GLOB ALG_PROFILE_FILES LIST_DIRECTORIES false RELATIVE ${ALG_PROFILE_DIR} "${ALG_PROFILE_DIR}/*.profile") + +foreach(profile_file ${ALG_PROFILE_FILES}) + get_filename_component(profile_name ${profile_file} NAME_WE) + MESSAGE(STATUS "... generate MDRA profile ${profile_name} (from ${profile_file})...") + CREATE_ALGORITHM_PROFILE(${profile_name} ${ALG_PROFILE_DIR}/${profile_file}) +endforeach(profile_file) + if( ${MITK_USE_MatchPoint} ) ADD_SUBDIRECTORY(autoload/IO) - ADD_SUBDIRECTORY(algorithms) + ADD_SUBDIRECTORY(deployment) if(BUILD_TESTING) ADD_SUBDIRECTORY(Testing) endif(BUILD_TESTING) endif() diff --git a/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.h similarity index 52% copy from Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp copy to Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.h index d48fd75983..f3f1d8c3be 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.h @@ -1,27 +1,32 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" +#ifndef mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm_h +#define mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm_h + #include "mapDiscreteElements.h" #include "mapITKFastSymmetricForcesDemonsMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_FastSymmetricForcesDemons_MultiRes_default_ProfileResource.h" -typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKFastSymmetricForcesDemonsMultiResRegistrationAlgorithm -AlgorithmType; +#include "mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm_ProfileResource.h" + +namespace mitk +{ + template + using FastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm = map::algorithm::boxed::ITKFastSymmetricForcesDemonsMultiResRegistrationAlgorithm; +} -mapDeployAlgorithmMacro(AlgorithmType); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_FastSymmetricForcesDemons_MultiRes_default.profile b/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_FastSymmetricForcesDemons_MultiRes_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.h similarity index 55% copy from Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp copy to Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.h index 663c52a5ba..d5b08d5c79 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.h @@ -1,27 +1,32 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" +#ifndef mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm_h +#define mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm_h + #include "mapDiscreteElements.h" #include "mapITKLevelSetMotionMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_LevelSetMotion_MultiRes_default_ProfileResource.h" -typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm -AlgorithmType; +#include "mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm_ProfileResource.h" + +namespace mitk +{ + template + using LevelSetMotionMultiResDefaultRegistrationAlgorithm = map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm; +} -mapDeployAlgorithmMacro(AlgorithmType); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_LevelSetMotion_MultiRes_default.profile b/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_LevelSetMotion_MultiRes_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkMultiModalAffine_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.h similarity index 71% rename from Modules/MatchPointRegistration/algorithms/mitkMultiModalAffine_default.cpp rename to Modules/MatchPointRegistration/algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.h index 3ce44ebb61..c62214bd91 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkMultiModalAffine_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.h @@ -1,136 +1,138 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" +#ifndef mitkMultiModalAffineDefaultRegistrationAlgorithm_h +#define mitkMultiModalAffineDefaultRegistrationAlgorithm_h + #include "mapDiscreteElements.h" #include "mapITKAffineMattesMIMultiResRegistrationAlgorithmTemplate.h" #include "mapConfigure.h" -#include "MITK_MultiModal_affine_default_ProfileResource.h" +#include "mitkMultiModalAffineDefaultRegistrationAlgorithm_ProfileResource.h" namespace mitk { - typedef map::core::discrete::Elements<3>::InternalImageType ImageType; /** \class MultiModalAffineDefaultRegistrationAlgorithm * Algorithm is used as default solution for multimodal affine problem statements in DIPP. * Uses 3 Resolution levels. By default initializes via image centers - */ + */ + template class MultiModalAffineDefaultRegistrationAlgorithm : - public map::algorithm::boxed::ITKAffineMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + public map::algorithm::boxed::ITKAffineMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> { public: typedef MultiModalAffineDefaultRegistrationAlgorithm Self; - typedef ITKAffineMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + typedef map::algorithm::boxed::ITKAffineMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> Superclass; typedef ::itk::SmartPointer Pointer; typedef ::itk::SmartPointer ConstPointer; itkTypeMacro(MultiModalAffineDefaultRegistrationAlgorithm, ITKAffineMattesMIMultiResRegistrationAlgorithm); mapNewAlgorithmMacro(Self); protected: MultiModalAffineDefaultRegistrationAlgorithm() { }; virtual ~MultiModalAffineDefaultRegistrationAlgorithm() { }; void configureAlgorithm() { Superclass::configureAlgorithm(); this->setResolutionLevels(3); this->_preInitialize = true; this->_useCenterOfGravity = false; this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4); //metric this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30); this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(true); this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed(); this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn(); } void doInterLevelSetup() { Superclass::doInterLevelSetup(); //scale setting - int dimCount = ImageType::ImageDimension*ImageType::ImageDimension + ImageType::ImageDimension; - int matrixEnd = ImageType::ImageDimension*ImageType::ImageDimension; - Superclass::ConcreteOptimizerType::ScalesType scales(dimCount); + int dimCount = TImageType::ImageDimension*TImageType::ImageDimension + TImageType::ImageDimension; + int matrixEnd = TImageType::ImageDimension*TImageType::ImageDimension; + typename Superclass::ConcreteOptimizerType::ScalesType scales(dimCount); double matrixScale = 1.0; double transScale = 1.0; if (this->getCurrentLevel() == 0) { matrixScale = 10.0; transScale = 1.0 / 10000; } else { matrixScale = 1.0; transScale = 1.0 / 1000; } for (int i = 0; i < dimCount; ++i) { if (i < matrixEnd) { scales[i] = matrixScale; } else { scales[i] = transScale; } } - getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); //spatial samples setting if (this->getCurrentLevel() != 0) { - getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); + this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); unsigned int nrOfSmpl = ::itk::Math::Round (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.30); - getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); + this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); } }; private: MultiModalAffineDefaultRegistrationAlgorithm(const Self& source); //purposely not implemented void operator=(const Self&); //purposely not implemented }; } -mapDeployAlgorithmMacro(mitk::MultiModalAffineDefaultRegistrationAlgorithm); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_MultiModal_affine_default.profile b/Modules/MatchPointRegistration/algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_MultiModal_affine_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.h b/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.h new file mode 100644 index 0000000000..48d312c47c --- /dev/null +++ b/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.h @@ -0,0 +1,134 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef mitkMultiModalRigidDefaultRegistrationAlgorithm_h +#define mitkMultiModalRigidDefaultRegistrationAlgorithm_h + +#include "mapDiscreteElements.h" +#include "mapITKEuler3DMattesMIMultiResRegistrationAlgorithmTemplate.h" +#include "mapConfigure.h" + +#include "mitkMultiModalRigidDefaultRegistrationAlgorithm_ProfileResource.h" + +namespace mitk +{ + /** \class MultiModalRigidDefaultRegistrationAlgorithm + * Algorithm is used as default solution for multimodal rigid problem statements in DIPP. + * Uses 3 Resolution levels. By default initializes via image centers + */ + template + class MultiModalRigidDefaultRegistrationAlgorithm : + public map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + { + public: + typedef MultiModalRigidDefaultRegistrationAlgorithm Self; + + typedef map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + Superclass; + + typedef ::itk::SmartPointer Pointer; + typedef ::itk::SmartPointer ConstPointer; + + itkTypeMacro(MultiModalRigidDefaultRegistrationAlgorithm, + ITKEuler3DMattesMIMultiResRegistrationAlgorithm); + mapNewAlgorithmMacro(Self); + + protected: + MultiModalRigidDefaultRegistrationAlgorithm() + { + }; + + virtual ~MultiModalRigidDefaultRegistrationAlgorithm() + { + }; + + void configureAlgorithm() + { + Superclass::configureAlgorithm(); + + this->setResolutionLevels(3); + this->_preInitialize = true; + this->_useCenterOfGravity = false; + + //optimizer + typename Superclass::ConcreteOptimizerType::ScalesType scales(6); + scales[0] = 1.0; + scales[1] = 1.0; + scales[2] = 1.0; + scales[3] = 1.0 / 1000; + scales[4] = 1.0 / 1000; + scales[5] = 1.0 / 1000; + + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8); + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4); + + //metric + this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30); + this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(true); + this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed(); + this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn(); + } + + void + doInterLevelSetup() + { + Superclass::doInterLevelSetup(); + + if (this->getCurrentLevel() == 0) + { + typename Superclass::OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6); + scales[0] = 10.0; + scales[1] = 10.0; + scales[2] = 10.0; + scales[3] = 1.0 / 10000; + scales[4] = 1.0 / 10000; + scales[5] = 1.0 / 10000; + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); + } + else + { + this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); + + typename Superclass::OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6); + scales[0] = 1.0; + scales[1] = 1.0; + scales[2] = 1.0; + scales[3] = 1.0 / 1000; + scales[4] = 1.0 / 1000; + scales[5] = 1.0 / 1000; + + this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); + + unsigned int nrOfSmpl = ::itk::Math::Round + (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.15); + + this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); + } + }; + + private: + + MultiModalRigidDefaultRegistrationAlgorithm(const Self& source); //purposely not implemented + void operator=(const Self&); //purposely not implemented + }; + +} + +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_MultiModal_rigid_default.profile b/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_MultiModal_rigid_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigid_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigid_default.cpp deleted file mode 100644 index e6d8b697f1..0000000000 --- a/Modules/MatchPointRegistration/algorithms/mitkMultiModalRigid_default.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "mapDeploymentDLLHelper.h" -#include "mapDiscreteElements.h" -#include "mapITKEuler3DMattesMIMultiResRegistrationAlgorithmTemplate.h" -#include "mapConfigure.h" - -#include "MITK_MultiModal_rigid_default_ProfileResource.h" - -namespace mitk -{ - typedef map::core::discrete::Elements<3>::InternalImageType ImageType; - - /** \class MultiModalRigidDefaultRegistrationAlgorithm - * Algorithm is used as default solution for multimodal rigid problem statements in DIPP. - * Uses 3 Resolution levels. By default initializes via image centers - */ - class MultiModalRigidDefaultRegistrationAlgorithm : - public map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> - { - public: - typedef MultiModalRigidDefaultRegistrationAlgorithm Self; - - typedef ITKEuler3DMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> - Superclass; - - typedef ::itk::SmartPointer Pointer; - typedef ::itk::SmartPointer ConstPointer; - - itkTypeMacro(MultiModalRigidDefaultRegistrationAlgorithm, - ITKEuler3DMattesMIMultiResRegistrationAlgorithm); - mapNewAlgorithmMacro(Self); - - protected: - MultiModalRigidDefaultRegistrationAlgorithm() - { - }; - - virtual ~MultiModalRigidDefaultRegistrationAlgorithm() - { - }; - - void configureAlgorithm() - { - Superclass::configureAlgorithm(); - - this->setResolutionLevels(3); - this->_preInitialize = true; - this->_useCenterOfGravity = false; - - //optimizer - ConcreteOptimizerType::ScalesType scales(6); - scales[0] = 1.0; - scales[1] = 1.0; - scales[2] = 1.0; - scales[3] = 1.0 / 1000; - scales[4] = 1.0 / 1000; - scales[5] = 1.0 / 1000; - - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00); - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5); - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200); - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8); - this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4); - - //metric - this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30); - this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(true); - this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed(); - this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn(); - } - - void - doInterLevelSetup() - { - Superclass::doInterLevelSetup(); - - if (this->getCurrentLevel() == 0) - { - OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6); - scales[0] = 10.0; - scales[1] = 10.0; - scales[2] = 10.0; - scales[3] = 1.0 / 10000; - scales[4] = 1.0 / 10000; - scales[5] = 1.0 / 10000; - getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); - } - else - { - getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); - - OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6); - scales[0] = 1.0; - scales[1] = 1.0; - scales[2] = 1.0; - scales[3] = 1.0 / 1000; - scales[4] = 1.0 / 1000; - scales[5] = 1.0 / 1000; - - getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); - - unsigned int nrOfSmpl = ::itk::Math::Round - (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.15); - - getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); - } - }; - - private: - - MultiModalRigidDefaultRegistrationAlgorithm(const Self& source); //purposely not implemented - void operator=(const Self&); //purposely not implemented - }; - -} - -mapDeployAlgorithmMacro(mitk::MultiModalRigidDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkMultiModalTrans_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.h similarity index 75% rename from Modules/MatchPointRegistration/algorithms/mitkMultiModalTrans_default.cpp rename to Modules/MatchPointRegistration/algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.h index 4cc0bea6b3..5e2b913ab0 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkMultiModalTrans_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.h @@ -1,109 +1,110 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" +#ifndef mitkMultiModalTransDefaultRegistrationAlgorithm_h +#define mitkMultiModalTransDefaultRegistrationAlgorithm_h + #include "mapDiscreteElements.h" #include "mapITKTransMattesMIMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_MultiModal_translation_default_ProfileResource.h" +#include "mitkMultiModalTransDefaultRegistrationAlgorithm_ProfileResource.h" namespace mitk { - typedef map::core::discrete::Elements<3>::InternalImageType ImageType; - /** \class MultiModalTranslationDefaultRegistrationAlgorithm * Algorithm is used as default solution for multimodal 3-degrees of freedom (translation) problem statements in DIPP. * Uses 3 Resolution levels. By default initializes via image centers */ + template class MultiModalTranslationDefaultRegistrationAlgorithm : - public map::algorithm::boxed::ITKTransMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + public map::algorithm::boxed::ITKTransMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> { public: typedef MultiModalTranslationDefaultRegistrationAlgorithm Self; - typedef ITKTransMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> + typedef map::algorithm::boxed::ITKTransMattesMIMultiResRegistrationAlgorithm >, map::algorithm::itk::NoComponentInitializationPolicy> Superclass; typedef ::itk::SmartPointer Pointer; typedef ::itk::SmartPointer ConstPointer; itkTypeMacro(MultiModalTranslationDefaultRegistrationAlgorithm, ITKEuler3DMattesMIMultiResRegistrationAlgorithm); mapNewAlgorithmMacro(Self); protected: MultiModalTranslationDefaultRegistrationAlgorithm() { }; virtual ~MultiModalTranslationDefaultRegistrationAlgorithm() { }; void configureAlgorithm() { Superclass::configureAlgorithm(); this->setResolutionLevels(3); this->_preInitialize = true; this->_useCenterOfGravity = false; //optimizer - ConcreteOptimizerType::ScalesType scales(3); + typename Superclass::ConcreteOptimizerType::ScalesType scales(3); scales[0] = 1.0; scales[1] = 1.0; scales[2] = 1.0; this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8); this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4); //metric this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30); this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(true); this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed(); this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn(); } void doInterLevelSetup() { Superclass::doInterLevelSetup(); if (this->getCurrentLevel() != 0) { - getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); + this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(false); unsigned int nrOfSmpl = ::itk::Math::Round (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.15); - getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); + this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl); } }; private: MultiModalTranslationDefaultRegistrationAlgorithm(const Self& source); //purposely not implemented void operator=(const Self&); //purposely not implemented }; } -mapDeployAlgorithmMacro( mitk::MultiModalTranslationDefaultRegistrationAlgorithm); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_MultiModal_translation_default.profile b/Modules/MatchPointRegistration/algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_MultiModal_translation_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.h similarity index 51% copy from Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp copy to Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.h index fa80e5ce3a..60718bb5dd 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.h @@ -1,28 +1,32 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" -#include "mapContinuousElements.h" +#ifndef mitkRigidClosedFormPointsDefaultRegistrationAlgorithm_h +#define mitkRigidClosedFormPointsDefaultRegistrationAlgorithm_h + +#include "mapDiscreteElements.h" #include "mapITKRigid3DClosedFormRegistrationAlgorithmTemplate.h" #include "mapConfigure.h" -#include "MITK_Rigid_closedform_points_default_ProfileResource.h" +#include "mitkRigidClosedFormPointsDefaultRegistrationAlgorithm_ProfileResource.h" -typedef map::core::continuous::Elements<3>::InternalPointSetType PointSetType; -typedef map::algorithm::boxed::ITKRigid3DClosedFormRegistrationAlgorithmTemplate::Type -AlgorithmType; +namespace mitk +{ + template + using RigidClosedFormPointsDefaultRegistrationAlgorithm = typename map::algorithm::boxed::ITKRigid3DClosedFormRegistrationAlgorithmTemplate::Type; +} -mapDeployAlgorithmMacro(AlgorithmType); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_Rigid_closedform_points_default.profile b/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_Rigid_closedform_points_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp b/Modules/MatchPointRegistration/algorithms/mitkRigidICPDefaultRegistrationAlgorithm.h similarity index 55% copy from Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp copy to Modules/MatchPointRegistration/algorithms/mitkRigidICPDefaultRegistrationAlgorithm.h index 1d85122eb1..c9e83ea381 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp +++ b/Modules/MatchPointRegistration/algorithms/mitkRigidICPDefaultRegistrationAlgorithm.h @@ -1,27 +1,33 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#include "mapDeploymentDLLHelper.h" -#include "mapContinuousElements.h" +#ifndef mitkRigidICPDefaultRegistrationAlgorithm_h +#define mitkRigidICPDefaultRegistrationAlgorithm_h + +#include "mapDiscreteElements.h" #include "mapITKRigid3DICPRegistrationAlgorithmTemplate.h" #include "mapConfigure.h" -#include "MITK_Rigid_ICP_default_ProfileResource.h" +#include "mitkRigidICPDefaultRegistrationAlgorithm_ProfileResource.h" + +namespace mitk +{ + template + using RigidICPDefaultRegistrationAlgorithm = map::algorithm::boxed::ITKRigid3DICPRegistrationAlgorithm; -typedef map::core::continuous::Elements<3>::InternalPointSetType PointSetType; -typedef map::algorithm::boxed::ITKRigid3DICPRegistrationAlgorithm AlgorithmType; +} -mapDeployAlgorithmMacro(AlgorithmType); +#endif diff --git a/Modules/MatchPointRegistration/algorithms/MITK_Rigid_ICP_default.profile b/Modules/MatchPointRegistration/algorithms/mitkRigidICPDefaultRegistrationAlgorithm.profile similarity index 100% rename from Modules/MatchPointRegistration/algorithms/MITK_Rigid_ICP_default.profile rename to Modules/MatchPointRegistration/algorithms/mitkRigidICPDefaultRegistrationAlgorithm.profile diff --git a/Modules/MatchPointRegistration/algorithms/CMakeLists.txt b/Modules/MatchPointRegistration/deployment/CMakeLists.txt similarity index 50% rename from Modules/MatchPointRegistration/algorithms/CMakeLists.txt rename to Modules/MatchPointRegistration/deployment/CMakeLists.txt index 87723f283b..120526bfa0 100644 --- a/Modules/MatchPointRegistration/algorithms/CMakeLists.txt +++ b/Modules/MatchPointRegistration/deployment/CMakeLists.txt @@ -1,7 +1,8 @@ -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_affine_default CPP_FILES mitkMultiModalAffine_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_rigid_default CPP_FILES mitkMultiModalRigid_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_translation_default CPP_FILES mitkMultiModalTrans_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_Rigid_closedform_points_default CPP_FILES mitkRigidClosedFormPoints_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_Rigid_ICP_default CPP_FILES mitkRigidICP_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_FastSymmetricForcesDemons_MultiRes_default CPP_FILES mitkFastSymmetricForcesDemonsMultiRes_default.cpp) -mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_LevelSetMotion_MultiRes_default CPP_FILES mitkLevelSetMotionMultiRes_default.cpp) +set(MDRA_INCLUDE_DIRS PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../algorithms) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_affine_default CPP_FILES mitkMultiModalAffine_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_rigid_default CPP_FILES mitkMultiModalRigid_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_MultiModal_translation_default CPP_FILES mitkMultiModalTrans_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_Rigid_closedform_points_default CPP_FILES mitkRigidClosedFormPoints_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_Rigid_ICP_default CPP_FILES mitkRigidICP_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_FastSymmetricForcesDemons_MultiRes_default CPP_FILES mitkFastSymmetricForcesDemonsMultiRes_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) +mitkFunctionCreateMatchPointDeployedAlgorithm(NAME MITK_LevelSetMotion_MultiRes_default CPP_FILES mitkLevelSetMotionMultiRes_default.cpp NO_PROFILE_GEN INCLUDE_DIRS ${MDRA_INCLUDE_DIRS}) diff --git a/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp b/Modules/MatchPointRegistration/deployment/mitkFastSymmetricForcesDemonsMultiRes_default.cpp similarity index 63% rename from Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp rename to Modules/MatchPointRegistration/deployment/mitkFastSymmetricForcesDemonsMultiRes_default.cpp index d48fd75983..1a3ef6ce5c 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkFastSymmetricForcesDemonsMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkFastSymmetricForcesDemonsMultiRes_default.cpp @@ -1,27 +1,25 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapDiscreteElements.h" -#include "mapITKFastSymmetricForcesDemonsMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_FastSymmetricForcesDemons_MultiRes_default_ProfileResource.h" +#include "mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.h" + typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKFastSymmetricForcesDemonsMultiResRegistrationAlgorithm -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::FastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp b/Modules/MatchPointRegistration/deployment/mitkLevelSetMotionMultiRes_default.cpp similarity index 66% copy from Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp copy to Modules/MatchPointRegistration/deployment/mitkLevelSetMotionMultiRes_default.cpp index 663c52a5ba..768877a8e1 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkLevelSetMotionMultiRes_default.cpp @@ -1,27 +1,24 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapDiscreteElements.h" -#include "mapITKLevelSetMotionMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_LevelSetMotion_MultiRes_default_ProfileResource.h" +#include "mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.h" typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::LevelSetMotionMultiResDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp b/Modules/MatchPointRegistration/deployment/mitkMultiModalAffine_default.cpp similarity index 66% copy from Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp copy to Modules/MatchPointRegistration/deployment/mitkMultiModalAffine_default.cpp index 663c52a5ba..db76ef9a72 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkMultiModalAffine_default.cpp @@ -1,27 +1,25 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapDiscreteElements.h" -#include "mapITKLevelSetMotionMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_LevelSetMotion_MultiRes_default_ProfileResource.h" +#include "mitkMultiModalAffineDefaultRegistrationAlgorithm.h" + typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::MultiModalAffineDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp b/Modules/MatchPointRegistration/deployment/mitkMultiModalRigid_default.cpp similarity index 66% copy from Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp copy to Modules/MatchPointRegistration/deployment/mitkMultiModalRigid_default.cpp index 663c52a5ba..5aacdbbfaa 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkMultiModalRigid_default.cpp @@ -1,27 +1,25 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapDiscreteElements.h" -#include "mapITKLevelSetMotionMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_LevelSetMotion_MultiRes_default_ProfileResource.h" +#include "mitkMultiModalRigidDefaultRegistrationAlgorithm.h" + typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::MultiModalRigidDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp b/Modules/MatchPointRegistration/deployment/mitkMultiModalTrans_default.cpp similarity index 66% rename from Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp rename to Modules/MatchPointRegistration/deployment/mitkMultiModalTrans_default.cpp index 663c52a5ba..f16d4a2791 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkLevelSetMotionMultiRes_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkMultiModalTrans_default.cpp @@ -1,27 +1,25 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapDiscreteElements.h" -#include "mapITKLevelSetMotionMultiResRegistrationAlgorithm.h" #include "mapConfigure.h" -#include "MITK_LevelSetMotion_MultiRes_default_ProfileResource.h" +#include "mitkMultiModalTransDefaultRegistrationAlgorithm.h" + typedef map::core::discrete::Elements<3>::InternalImageType ImageType; -typedef map::algorithm::boxed::ITKLevelSetMotionMultiResRegistrationAlgorithm -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::MultiModalTranslationDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp b/Modules/MatchPointRegistration/deployment/mitkRigidClosedFormPoints_default.cpp similarity index 72% rename from Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp rename to Modules/MatchPointRegistration/deployment/mitkRigidClosedFormPoints_default.cpp index fa80e5ce3a..5649c34ad2 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkRigidClosedFormPoints_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkRigidClosedFormPoints_default.cpp @@ -1,28 +1,26 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapContinuousElements.h" #include "mapITKRigid3DClosedFormRegistrationAlgorithmTemplate.h" #include "mapConfigure.h" -#include "MITK_Rigid_closedform_points_default_ProfileResource.h" +#include "mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.h" typedef map::core::continuous::Elements<3>::InternalPointSetType PointSetType; -typedef map::algorithm::boxed::ITKRigid3DClosedFormRegistrationAlgorithmTemplate::Type -AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::RigidClosedFormPointsDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp b/Modules/MatchPointRegistration/deployment/mitkRigidICP_default.cpp similarity index 68% rename from Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp rename to Modules/MatchPointRegistration/deployment/mitkRigidICP_default.cpp index 1d85122eb1..82a791f572 100644 --- a/Modules/MatchPointRegistration/algorithms/mitkRigidICP_default.cpp +++ b/Modules/MatchPointRegistration/deployment/mitkRigidICP_default.cpp @@ -1,27 +1,25 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mapDeploymentDLLHelper.h" #include "mapContinuousElements.h" -#include "mapITKRigid3DICPRegistrationAlgorithmTemplate.h" #include "mapConfigure.h" -#include "MITK_Rigid_ICP_default_ProfileResource.h" +#include "mitkRigidICPDefaultRegistrationAlgorithm.h" typedef map::core::continuous::Elements<3>::InternalPointSetType PointSetType; -typedef map::algorithm::boxed::ITKRigid3DICPRegistrationAlgorithm AlgorithmType; -mapDeployAlgorithmMacro(AlgorithmType); +mapDeployAlgorithmMacro(mitk::RigidICPDefaultRegistrationAlgorithm); diff --git a/Modules/MatchPointRegistration/files.cmake b/Modules/MatchPointRegistration/files.cmake index d38d4a6dd3..8546d7de97 100644 --- a/Modules/MatchPointRegistration/files.cmake +++ b/Modules/MatchPointRegistration/files.cmake @@ -1,58 +1,65 @@ set(CPP_FILES mitkMAPRegistrationWrapper.cpp mitkMAPRegistrationWrapperObjectFactory.cpp mitkRegEvaluationObjectFactory.cpp mitkRegEvaluationObject.cpp Helper/mitkUIDHelper.cpp Helper/mitkAlgorithmHelper.cpp Helper/mitkMaskedAlgorithmHelper.cpp Helper/mitkRegistrationHelper.cpp Helper/mitkImageMappingHelper.cpp Helper/mitkPointSetMappingHelper.cpp Helper/mitkResultNodeGenerationHelper.cpp Helper/mitkTimeFramesRegistrationHelper.cpp Rendering/mitkRegistrationWrapperMapper2D.cpp Rendering/mitkRegistrationWrapperMapper3D.cpp Rendering/mitkRegistrationWrapperMapperBase.cpp Rendering/mitkRegEvaluationMapper2D.cpp Rendering/mitkRegVisStyleProperty.cpp Rendering/mitkRegVisDirectionProperty.cpp Rendering/mitkRegVisColorStyleProperty.cpp Rendering/mitkRegVisPropertyTags.cpp Rendering/mitkRegVisHelper.cpp Rendering/mitkRegEvalStyleProperty.cpp Rendering/mitkRegEvalWipeStyleProperty.cpp ) set(H_FILES mitkMatchPointPropertyTags.h mitkMAPRegistrationWrapper.h mitkMAPRegistrationWrapperObjectFactory.h mitkRegEvaluationObjectFactory.h mitkRegEvaluationObject.h + algorithms/mitkMultiModalAffineDefaultRegistrationAlgorithm.h + algorithms/mitkMultiModalRigidDefaultRegistrationAlgorithm.h + algorithms/mitkMultiModalTransDefaultRegistrationAlgorithm.h + algorithms/mitkFastSymmetricForcesDemonsMultiResDefaultRegistrationAlgorithm.h + algorithms/mitkLevelSetMotionMultiResDefaultRegistrationAlgorithm.h + algorithms/mitkRigidClosedFormPointsDefaultRegistrationAlgorithm.h + algorithms/mitkRigidICPDefaultRegistrationAlgorithm.h Helper/mitkUIDHelper.h Helper/mitkAlgorithmHelper.h Helper/mitkMaskedAlgorithmHelper.h Helper/mitkRegistrationHelper.h Helper/mitkImageMappingHelper.h Helper/mitkPointSetMappingHelper.h Helper/mitkResultNodeGenerationHelper.h Helper/mitkTimeFramesRegistrationHelper.h Rendering/mitkRegistrationWrapperMapper2D.h Rendering/mitkRegistrationWrapperMapper3D.h Rendering/mitkRegistrationWrapperMapperBase.h Rendering/mitkRegVisStyleProperty.h Rendering/mitkRegVisDirectionProperty.h Rendering/mitkRegVisColorStyleProperty.h Rendering/mitkRegVisPropertyTags.h Rendering/mitkRegVisHelper.h Rendering/mitkRegEvaluationMapper2D.h Rendering/mitkRegEvalStyleProperty.h Rendering/mitkRegEvalWipeStyleProperty.h ) set(TPP_FILES ) set(MOC_H_FILES )