diff --git a/ReadMe.txt b/ReadMe.txt index be3746f..e93b588 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,177 +1,177 @@ RTToolbox - Read Me ---------------------------- ---------------------------- Compiler tests ---------------------------- RTToolbox is currently tested with the following compilers (only x64): - Visual Studio 2010 - Visual Studio 2012 (soon) - GCC 4.6 RTToolbox should compile with all compilers recognizing the C++11 keywords 'override', 'auto' and 'nullptr'. Needed Third Party Libraries ---------------------------- Please load and compile the following third party libraries/tools: Required: 1. CMake (version 2.8.3 or higher) 2. boost (version 1.56.0 or higher) Optional: [3. Litmus (in this distribution; see \utilities\Litmus; if you want tests)] [4. dcmtk (with RT support - 3.6.1 or newer; if you want DICOM support)] -[5. ITK (version 4.0 or higher; if you want DoseInterpolation support with itk::Transform or ITK File IO support)] -[6. MatchPoint (version 0.9 or higher, see http://sourceforge.net/projects/matchpoint/; if you want DoseInterpolation support with MatchPoint Registration objects)] +[5. ITK (version 4.4 or higher; if you want DoseInterpolation support with itk::Transform or ITK File IO support)] +[6. MatchPoint (version 0.11 or higher, see http://sourceforge.net/projects/matchpoint/; if you want DoseInterpolation support with MatchPoint Registration objects)] [7. doxygen (if you want to generate a source code documentation)] Installation Instruction ------------------------ Remark: To make sure everything runs smoothly, please make sure that all libraries and the RTToolbox are either compiled with \MD or \MT flags. If third party library packages cannot be found automatically, cmake will ask for them. Please give the location of the root folder, where the libraries where built for dcmtk, and Litmus. [A. If you build tests - Litmus] A.1. Configure Litmus with CMake (separated binary folder recommended) A.2. Build Litmus [B. If you build Helax support - Boost] B.1. Build (using the same compiler options as RTToolbox, usually STATIC LINKING and x64 architecture). For all other modules, only the headers are required. [C. If you want DICOM support - DCMTK] For Windows: To compile DCMTK with \MD flags (standard for all other libs), you need to patch the CMAKE options of DCMTK (\\DCMTK\CMake\dcmtkPrepare.cmake), either by replacing "/MT" with "/MD" or by explicitly replacing lines 135 to 171 with the following lines: IF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) # settings for Microsoft Visual Studio IF(CMAKE_GENERATOR MATCHES "Visual Studio .*") # get Visual Studio Version STRING(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" VS_VERSION "${CMAKE_GENERATOR}") # these settings never change even for C or C++ SET(CMAKE_C_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_C_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_DEBUG "/MDd /Z7 /Od") SET(CMAKE_CXX_FLAGS_RELEASE "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_MINSIZEREL "/DNDEBUG /MD /O2") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/DNDEBUG /MDd /Z7 /Od") # specific settings for the various Visual Studio versions IF(VS_VERSION EQUAL 6) SET(CMAKE_C_FLAGS "/nologo /W3 /GX /Gy /YX") SET(CMAKE_CXX_FLAGS "/nologo /W3 /GX /Gy /YX /Zm500") # /Zm500 increments heap size which is needed on some system to compile templates in dcmimgle ENDIF(VS_VERSION EQUAL 6) IF(VS_VERSION EQUAL 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy") ENDIF(VS_VERSION EQUAL 7) IF(VS_VERSION GREATER 7) SET(CMAKE_C_FLAGS "/nologo /W3 /Gy /EHsc") SET(CMAKE_CXX_FLAGS "/nologo /W3 /Gy /EHsc") ENDIF(VS_VERSION GREATER 7) ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio .*") # settings for Borland C++ IF(CMAKE_GENERATOR MATCHES "Borland Makefiles") # further settings required? not tested for a very long time! SET(CMAKE_STANDARD_LIBRARIES "import32.lib cw32md.lib") ENDIF(CMAKE_GENERATOR MATCHES "Borland Makefiles") ENDIF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS AND NOT BUILD_SHARED_LIBS) C.1. Configure DCMTK with CMake For unix-like systems: Set the CMake parameter DCMTK_FORCE_FPIC_ON_UNIX to true (It is an advanced parameter) C.2. Build DCMTK [D. If you want ITKIO or DoseInterpolation support with itk::Transform - ITK] D.1. Build ITK. [E. If you want support of DoseInterpolation with MatchPoint Registration objects - MatchPoint] E.1. Build MatchPoint. [F. Configure/Build RTToolbox] F.1 Configure with CMake F.1.1 Set BOOST_INCLUDE_DIR to the main boost directory (where "boost_build.jam" is located) REMARK: For the current version of the RTToolbox you do need to build boost only if you want to use the provided Helax-Dicom data support. Otherwise you can use headers only. F.2 Select all packages you like to build (Parameters "BUILD_*"; e.g. BUILD_IO_Dicom) F.2.1 If you select BUILD_IO_DICOM the configuration will ask you for the DCMTK main directory (parameter DCMTK_DIR; where you have built DCMTK). REMARK: If you have built DCMTK as out source build you have to also set the CMake parameter DCMTK_SOURCE_DIR to the root directory of the DCMTK source. F.2.3 If you select BUILD_ITKBinding or BUILD_IO_ITK, set ITK_DIR to the binary directory of ITK F.2.3 If you select BUILD_MatchPointBinding, set MatchPoint_DIR to the binary directory of MatchPoint F.3 Generate CMake configuration F.4 Build RTToolbox and have fun! [G. Documentation] G.1 Generate the documentation using doxygen and the configuration found in "RTTB_binary_dir/documentation/doxygen.config". Remarks ------- R.1 Virtuos Support: Virtuos is a proprietary data format and therefore not included in the RTToolbox. The Virtuos support (wrapper) for the RTToolbox is currently being restructured and will be included in the near future. R.2 Database support: The database support for the RTToolbox is currently being restructured and will be included in the near future. R.3 ITK Version: Only use one ITK version consistently throughout all libraries and RTToolbox! Otherwise, this will lead to linker errors. diff --git a/cmake/PackageDepends/RTTB_Boost_Config.cmake b/cmake/PackageDepends/RTTB_Boost_Config.cmake index a24115f..19684ab 100644 --- a/cmake/PackageDepends/RTTB_Boost_Config.cmake +++ b/cmake/PackageDepends/RTTB_Boost_Config.cmake @@ -1,19 +1,21 @@ IF(NOT Boost_FOUND) IF(DEFINED Boost_INCLUDE_DIR) IF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) SET(Boost_INCLUDE_DIR "${RTToolbox_BINARY_DIR}/${Boost_INCLUDE_DIR}") ENDIF(NOT IS_ABSOLUTE ${Boost_INCLUDE_DIR}) ENDIF(DEFINED Boost_INCLUDE_DIR) - FIND_PACKAGE(Boost REQUIRED) + SET(BOOST_MIN_VERSION "1.56.0") + + FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED) LIST(APPEND ALL_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) # this is only necessary if we use more than just the headers LIST(APPEND ALL_LIBRARIES ${Boost_LIBRARIES}) link_directories(${Boost_LIBRARY_DIRS}) MARK_AS_ADVANCED(CLEAR Boost_INCLUDE_DIR) ENDIF(NOT Boost_FOUND) diff --git a/cmake/PackageDepends/RTTB_DCMTK_Config.cmake b/cmake/PackageDepends/RTTB_DCMTK_Config.cmake index ad40ba0..f947d74 100644 --- a/cmake/PackageDepends/RTTB_DCMTK_Config.cmake +++ b/cmake/PackageDepends/RTTB_DCMTK_Config.cmake @@ -1,216 +1,216 @@ #----------------------------------------------------------------------------- # Find DCMTK #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # This part is based on the findDCMTK of CMake 2.8.8 # it was patched because: -# 1. the find_library statment had an incomplet set +# 1. the find_library statement had an incomplete set # of search paths. If building DCMTK with Visual # Studio the libs are to be found in /lib/release # or /lib/debug # 2. the module DCMRT was not included (but needed by RTToolbox) # IF(DEFINED DCMTK_DIR) IF(NOT IS_ABSOLUTE ${DCMTK_DIR}) SET(DCMTK_DIR "${RTToolbox_BINARY_DIR}/${DCMTK_DIR}") ENDIF(NOT IS_ABSOLUTE ${DCMTK_DIR}) ENDIF(DEFINED DCMTK_DIR) if(NOT DCMTK_FOUND AND NOT DCMTK_DIR) set(DCMTK_DIR "/usr/include/dcmtk/") endif() -#ensure that we always have the variable as cache, undependent from -#setting it via gui or commandline +#ensure that we always have the variable as cache, independent from +#setting it via gui or command line set(DCMTK_DIR ${DCMTK_DIR} CACHE PATH "Root of DCMTK tree.") IF(DEFINED DCMTK_SOURCE_DIR) IF(NOT IS_ABSOLUTE ${DCMTK_SOURCE_DIR}) SET(DCMTK_SOURCE_DIR "${RTToolbox_BINARY_DIR}/${DCMTK_SOURCE_DIR}") ENDIF(NOT IS_ABSOLUTE ${DCMTK_SOURCE_DIR}) ENDIF(DEFINED DCMTK_SOURCE_DIR) if(NOT DCMTK_FOUND AND NOT DCMTK_SOURCE_DIR) set(DCMTK_SOURCE_DIR ${DCMTK_DIR}) endif() -#ensure that we always have the variable as cache, undependet from -#setting it via gui or commandline +#ensure that we always have the variable as cache, independent from +#setting it via gui or command line set(DCMTK_SOURCE_DIR ${DCMTK_SOURCE_DIR} CACHE PATH "Root of DCMTK tree.") OPTION(RTTB_USE_ML_DCMTK "RTTB should use a DCMTK which is available in the MeVisLab package structure." OFF) MARK_AS_ADVANCED(RTTB_USE_ML_DCMTK) if(NOT DCMTK_FOUND) set(DCMTK_FOUND True) set(DCMTK_DEBUG_LIB_SEARCH_PATH ${DCMTK_DIR}/${lib}/libsrc/Debug ${DCMTK_DIR}/${lib}/Debug ${DCMTK_DIR}/lib/Debug ) set(DCMTK_LIB_SEARCH_PATH ${DCMTK_DIR}/${lib}/libsrc ${DCMTK_DIR}/${lib}/libsrc/Release ${DCMTK_DIR}/${lib}/Release ${DCMTK_DIR}/lib/Release ${DCMTK_DIR}/lib ) set(DCMTK_LIB_SEARCH_NAMES dcmdata dcmimage dcmimgle dcmjpeg dcmnet dcmpstat dcmqrdb dcmdsig dcmsr dcmtls dcmrt ijg12 ijg16 ijg8 ofstd oflog ) if(${RTTB_USE_ML_DCMTK}) set(DCMTK_DEBUG_LIB_SEARCH_PATH ${DCMTK_DIR}/lib ) set(DCMTK_LIB_SEARCH_PATH ${DCMTK_DIR}/lib ) set(DCMTK_LIB_SEARCH_NAMES ${DCMTK_LIB_SEARCH_NAMES} zlib) endif(${RTTB_USE_ML_DCMTK}) foreach(lib ${DCMTK_LIB_SEARCH_NAMES}) if(${RTTB_USE_ML_DCMTK}) find_library(DCMTK_${lib}_DEBUG_LIBRARY ${lib}_d PATHS ${DCMTK_DEBUG_LIB_SEARCH_PATH}) else(${RTTB_USE_ML_DCMTK}) find_library(DCMTK_${lib}_DEBUG_LIBRARY ${lib} PATHS ${DCMTK_DEBUG_LIB_SEARCH_PATH}) endif(${RTTB_USE_ML_DCMTK}) find_library(DCMTK_${lib}_LIBRARY ${lib} PATHS ${DCMTK_LIB_SEARCH_PATH}) if((${UNIX}) AND (NOT DCMTK_${lib}_DEBUG_LIBRARY)) set(DCMTK_${lib}_DEBUG_LIBRARY ${DCMTK_${lib}_LIBRARY} CACHE PATH "Path to a library" FORCE) endif((${UNIX}) AND (NOT DCMTK_${lib}_DEBUG_LIBRARY)) mark_as_advanced(DCMTK_${lib}_LIBRARY) mark_as_advanced(DCMTK_${lib}_DEBUG_LIBRARY) add_library(${lib} STATIC IMPORTED) set_target_properties(${lib} PROPERTIES IMPORTED_LOCATION ${DCMTK_${lib}_LIBRARY} IMPORTED_LOCATION_DEBUG ${DCMTK_${lib}_DEBUG_LIBRARY}) if(DCMTK_${lib}_LIBRARY) list(APPEND DCMTK_LIBRARIES ${lib}) endif() if(NOT DCMTK_${lib}_LIBRARY) message(WARNING "Cannot find library DCMTK_${lib}_LIBRARY") endif() if(NOT DCMTK_${lib}_DEBUG_LIBRARY) message(WARNING "Cannot find library DCMTK_${lib}_DEBUG_LIBRARY") endif() endforeach() set(DCMTK_config_TEST_HEADER osconfig.h) set(DCMTK_dcmdata_TEST_HEADER dctypes.h) set(DCMTK_dcmimage_TEST_HEADER dicoimg.h) set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h) set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h) set(DCMTK_dcmnet_TEST_HEADER assoc.h) set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h) set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h) set(DCMTK_dcmrt_TEST_HEADER drmdose.h) set(DCMTK_dcmsign_TEST_HEADER sicert.h) set(DCMTK_dcmsr_TEST_HEADER dsrtree.h) set(DCMTK_dcmtls_TEST_HEADER tlslayer.h) set(DCMTK_ofstd_TEST_HEADER ofstdinc.h) set(DCMTK_oflog_TEST_HEADER oflog.h) foreach(dir config dcmdata dcmimage dcmimgle dcmjpeg dcmnet dcmpstat dcmqrdb dcmrt dcmsign dcmsr dcmtls ofstd oflog) find_path(DCMTK_${dir}_INCLUDE_DIR ${DCMTK_${dir}_TEST_HEADER} PATHS ${DCMTK_DIR}/${dir}/include ${DCMTK_DIR}/${dir} ${DCMTK_DIR}/include/${dir} ${DCMTK_DIR}/include/dcmtk/${dir} ${DCMTK_DIR}/${dir}/include/dcmtk/${dir} ${DCMTK_SOURCE_DIR}/${dir}/include ${DCMTK_SOURCE_DIR}/${dir} ${DCMTK_SOURCE_DIR}/include/${dir} ${DCMTK_SOURCE_DIR}/include/dcmtk/${dir} ${DCMTK_SOURCE_DIR}/${dir}/include/dcmtk/${dir} ) mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR) if(DCMTK_${dir}_INCLUDE_DIR) list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_${dir}_INCLUDE_DIR} ${DCMTK_SOURCE_DIR}/${dir}/include ${DCMTK_DIR}/${dir}/include) endif() endforeach() if(WIN32) list(APPEND DCMTK_LIBRARIES netapi32 wsock32) endif() if(UNIX) list(APPEND DCMTK_LIBRARIES pthread) endif() if(DCMTK_ofstd_INCLUDE_DIR) get_filename_component(DCMTK_dcmtk_INCLUDE_DIR ${DCMTK_ofstd_INCLUDE_DIR} PATH CACHE) list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_dcmtk_INCLUDE_DIR}) mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR) endif() endif() #----------------------------------------------------------------------------- # RTTB part to use the found DCMTK # IF(NOT DCMTK_FOUND) MESSAGE(SEND_ERROR "DCMTK development files not found.\n Please check variables (e.g. DCMTK_DIR) for include directories and libraries.\nYou may set environment variable DCMTK_DIR before pressing 'configure'") ENDIF(NOT DCMTK_FOUND) IF( NOT WIN32 ) SET(MISSING_LIBS_REQUIRED_BY_DCMTK wrap tiff) ENDIF( NOT WIN32 ) LIST(APPEND ALL_INCLUDE_DIRECTORIES ${DCMTK_INCLUDE_DIRS} ${DCMTK_DIR}/include) LIST(APPEND ALL_LIBRARIES ${DCMTK_LIBRARIES} ${MISSING_LIBS_REQUIRED_BY_DCMTK}) diff --git a/cmake/PackageDepends/RTTB_ITK_Config.cmake b/cmake/PackageDepends/RTTB_ITK_Config.cmake index a524635..b5cbbd4 100644 --- a/cmake/PackageDepends/RTTB_ITK_Config.cmake +++ b/cmake/PackageDepends/RTTB_ITK_Config.cmake @@ -1,25 +1,25 @@ #----------------------------------------------------------------------------- # Find ITK. #----------------------------------------------------------------------------- FIND_PACKAGE(ITK) IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE}) ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.") ENDIF(ITK_FOUND) -IF(${ITK_VERSION_MAJOR} LESS 4 OR (${ITK_VERSION_MAJOR} EQUAL 4 AND ${ITK_VERSION_MINOR} LESS 0)) +IF(${ITK_VERSION_MAJOR} LESS 4 OR (${ITK_VERSION_MAJOR} EQUAL 4 AND ${ITK_VERSION_MINOR} LESS 4)) MESSAGE(FATAL_ERROR - "Outdated ITK version. Cannot build MatchPoint without sufficient ITK version. ITK 4.0 or above is needed.") -ENDIF(${ITK_VERSION_MAJOR} LESS 4 OR (${ITK_VERSION_MAJOR} EQUAL 4 AND ${ITK_VERSION_MINOR} LESS 0)) + "Outdated ITK version. Cannot build RTToolbox without sufficient ITK version. ITK 4.4 or above is needed.") +ENDIF(${ITK_VERSION_MAJOR} LESS 4 OR (${ITK_VERSION_MAJOR} EQUAL 4 AND ${ITK_VERSION_MINOR} LESS 4)) #LIST(APPEND ALL_INCLUDE_DIRECTORIES ${ITK_INCLUDE_DIRS}) #LIST(APPEND ALL_LIBRARIES ${ITK_LIBRARIES}) #LINK_DIRECTORIES(${ITK_LIBRARY_DIRS}) CONFIGURE_FILE(${RTToolbox_SOURCE_DIR}/CMake/ITKConfig.cmake.in ${RTTB_MODULES_CONF_DIR}/ITKConfig.cmake @ONLY) diff --git a/cmake/PackageDepends/RTTB_MatchPoint_Config.cmake b/cmake/PackageDepends/RTTB_MatchPoint_Config.cmake index 68464aa..4281283 100644 --- a/cmake/PackageDepends/RTTB_MatchPoint_Config.cmake +++ b/cmake/PackageDepends/RTTB_MatchPoint_Config.cmake @@ -1,15 +1,20 @@ #----------------------------------------------------------------------------- # Find MatchPoint #----------------------------------------------------------------------------- FIND_PACKAGE(MatchPoint) IF(MatchPoint_FOUND) INCLUDE(${MatchPoint_USE_FILE}) ELSE(MatchPoint_FOUND) MESSAGE(FATAL_ERROR "Cannot build without MATCHPOINT. Please set MATCHPOINT_DIR.") ENDIF(MatchPoint_FOUND) +IF(${MatchPoint_VERSION_MAJOR} EQUAL 0 AND ${MatchPoint_VERSION_MINOR} LESS 11) + MESSAGE(FATAL_ERROR + "Outdated MatchPoint version. Cannot build RTToolbox without sufficient MatchPoint version. MatchPoint 0.11 or above is needed.") +ENDIF(${MatchPoint_VERSION_MAJOR} EQUAL 0 AND ${MatchPoint_VERSION_MINOR} LESS 11) + LIST(APPEND ALL_INCLUDE_DIRECTORIES ${MatchPoint_INCLUDE_DIRS} ${MatchPoint_ITK_INCLUDE_DIRS}) LIST(APPEND ALL_LIBRARIES MAPCore MAPAlgorithms MAPAlgorithmsITK MAPDeployment MAPIO ${MatchPoint_ITK_LIBRARIES}) LINK_DIRECTORIES(${MatchPoint_LIBRARY_DIRS} ${ITK_LIBRARY_DIRS}) \ No newline at end of file diff --git a/testing/interpolation/MatchPointBinding/simpleRegistrationWorkflow.cpp b/testing/interpolation/MatchPointBinding/simpleRegistrationWorkflow.cpp index 9ea6c4a..b8810f4 100644 --- a/testing/interpolation/MatchPointBinding/simpleRegistrationWorkflow.cpp +++ b/testing/interpolation/MatchPointBinding/simpleRegistrationWorkflow.cpp @@ -1,113 +1,113 @@ // ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright.txt or // http://www.dkfz.de/en/sidt/projects/rttb/copyright.html [^] // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notices for more information. // //------------------------------------------------------------------------ /*! // @file // @version $Revision: 741 $ (last changed revision) // @date $Date: 2014-09-16 16:34:22 +0200 (Di, 16 Sep 2014) $ (last change date) // @author $Author: hentsch $ (last changed by) */ #undef MAP_SEAL_ALGORITHMS #include "simpleRegistrationWorkflow.h" #include "registrationHelper.h" simpleRegistrationWorkflow::simpleRegistrationWorkflow(std::string targetFilename, std::string movingFilename, bool isDirectory) { _targetFilename = targetFilename; _movingFilename = movingFilename; setImageFileNames(_targetFilename, _movingFilename, isDirectory, globals); loadData(globals); _spAlgorithmEuler = NULL; } vnl_vector simpleRegistrationWorkflow::getRegistrationParameters( Registration3D3DPointer reg) { typedef map::core::ModelBasedRegistrationKernel<3, 3> ModelBasedRegistrationKernel3D3D; const ModelBasedRegistrationKernel3D3D* pModelBasedDirectKernel3D3D = dynamic_cast(&(reg->getDirectMapping())); if (pModelBasedDirectKernel3D3D) { ModelBasedRegistrationKernel3D3D::ParametersType params = - pModelBasedDirectKernel3D3D->getTransformModel()->getTransform()->GetParameters(); + pModelBasedDirectKernel3D3D->getTransformModel()->GetParameters(); return params; } else { return vnl_vector(); } } void simpleRegistrationWorkflow::initializeAndPerformRegistration() { _spAlgorithmEuler = AlgorithmTypeEuler::New(); _spAlgorithmEuler->setProperty("PreinitTransform", map::core::MetaProperty::New(true)); _spAlgorithmEuler->setMovingImage(globals.spMovingImage); _spAlgorithmEuler->setTargetImage(globals.spTargetImage); AlgorithmTypeEuler::RegistrationType::Pointer spRegistration; try { spRegistration = _spAlgorithmEuler->getRegistration(); } catch (const map::core::ExceptionObject& e) { std::cerr << "caught an MatchPoint exception:\n"; e.Print(std::cerr); std::cerr << "\n"; } catch (const itk::ExceptionObject& e) { std::cerr << "caught an ITK exception:\n"; std::cerr << e.GetFile() << ":" << e.GetLine() << ":\n" << e.GetDescription() << "\n"; } catch (const std::exception& e) { std::cerr << "caught an exception:\n"; std::cerr << e.what() << "\n"; } catch (...) { std::cerr << "caught an unknown exception!!!\n"; } } map::core::Registration<3, 3>::Pointer simpleRegistrationWorkflow::getRegistration() { if (_spAlgorithmEuler.IsNull()) { initializeAndPerformRegistration(); } return _spAlgorithmEuler->getRegistration(); }; const itk::Image* simpleRegistrationWorkflow::getTargetImage() { if (_spAlgorithmEuler.IsNull()) { initializeAndPerformRegistration(); } return _spAlgorithmEuler->getTargetImage(); };