Commit 5561e5c0 authored by Kasper Marstal's avatar Kasper Marstal
Browse files

Merge branch 'ELASTIX-37-elastix-superbuild' into develop

parents d40ea44c 19e0bc8a
sudo: false
sudo: required
dist: trusty
language: cpp
......
......@@ -32,7 +32,7 @@ find_package( Boost )
include_directories( ${Boost_INCLUDE_DIRS} )
# ---------------------------------------------------------------------
# Build Elastix
# Build SuperElastix
# For now we just enable all modules
include( elxModules )
elxmodule_enable( elxModuleCore )
......@@ -42,13 +42,13 @@ elxmodule_enable( elxModuleCore )
# Testing requires CMake version 2.8.11 to download test data
if( CMAKE_VERSION VERSION_LESS 2.8.11 )
set( ELASTIX_BUILD_TESTING_DEFAULT OFF )
set( SUPERELASTIX_BUILD_TESTING_DEFAULT OFF )
message( STATUS "ELASTIX_BUILD_TESTING is set to OFF because CMake version is less than 2.8.11" )
else()
set( ELASTIX BUILD_TESTING_DEFAULT ON )
set( SUPERELASTIX_BUILD_TESTING_DEFAULT ON )
endif()
option( ELASTIX_BUILD_TESTING "Enable building tests." ${ELASTIX_BUILD_TESTING_DEFAULT} )
option( SUPERELASTIX_BUILD_TESTING "Enable building tests." ${ELASTIX_BUILD_TESTING_DEFAULT} )
if( ${ELASTIX_BUILD_TESTING} )
enable_testing()
add_subdirectory( Testing )
......@@ -57,9 +57,9 @@ endif()
# ---------------------------------------------------------------------
# Build Documentation
mark_as_advanced( ELASTIX_BUILD_DOXYGEN )
option( ELASTIX_BUILD_DOXYGEN "Enable building Doxygen documentation." OFF )
mark_as_advanced( SUPERELASTIX_BUILD_DOXYGEN )
option( SUPERELASTIX_BUILD_DOXYGEN "Enable building Doxygen documentation." OFF )
mark_as_advanced( ELASTIX_BUILD_READTHEDOCS )
option( ELASTIX_BUILD_READTHEDOCS "Enable building readthedocs.org documentation." OFF )
mark_as_advanced( SUPERELASTIX_BUILD_READTHEDOCS )
option( SUPERELASTIX_BUILD_READTHEDOCS "Enable building readthedocs.org documentation." OFF )
cmake_minimum_required( VERSION 2.8 )
# ---------------------------------------------------------------------
project( ElastixSuperBuild )
project( SuperElastixSuperBuild )
find_package( Git REQUIRED )
......@@ -25,24 +25,24 @@ endif()
# Build examples by default
# Examples will be build as an external project to verify the installation of elastix
option( ELASTIX_BUILD_EXAMPLES "Enable building examples." ON )
option( SUPERELASTIX_BUILD_EXAMPLES "Enable building examples." ON )
# Build tests by default
option( ELASTIX_BUILD_TESTING "Enable building tests." ON )
if( ELASTIX_BUILD_TESTING )
option( ELASTIX_BUILD_BENCHMARKING "Enable building benchmarks." ON )
option( ELASTIX_BUILD_DASHBOARD "Enable building benchmarks." ON )
option( SUPERELASTIX_BUILD_TESTING "Enable building tests." ON )
if( SUPERELASTIX_BUILD_TESTING )
option( SUPERELASTIX_BUILD_BENCHMARKING "Enable building benchmarks." ON )
option( SUPERELASTIX_BUILD_DASHBOARD "Enable building benchmarks." ON )
endif()
# Do not build dashboard by default
option( ELASTIX_BUILD_DASHBOARD "Enable building dashboard." OFF )
option( SUPERELASTIX_BUILD_DASHBOARD "Enable building dashboard." OFF )
# ---------------------------------------------------------------------
# Build ITK
set( ITK_VERSION_MAJOR "4" )
set( ITK_VERSION_MINOR "7" )
set( ITK_VERSION_MINOR "8" )
set( ITK_VERSION_PATCH "1" )
set( ITK_VERSION_STRING "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}" )
......@@ -51,7 +51,7 @@ option( USE_SYSTEM_ITK "Use an installed version of ITK" OFF )
if( USE_SYSTEM_ITK )
find_package( ITK ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR} REQUIRED )
include( "${CMAKE_CURRENT_SOURCE_DIR}/../CMake/elxRequiredITKModules.cmake" )
include( elxRequiredITKModules )
else()
include( ExternalITK )
endif()
......@@ -83,7 +83,17 @@ endif()
# ---------------------------------------------------------------------
# Build Elastix
include( Elastix )
# TODO: Add USE_SYSTEM_ELASTICLEGACY option
mark_as_advanced( SUPERELASTIX_BUILD_ELASTIX )
option( SUPERELASTIX_BUILD_ELASTIX ON )
if( SUPERELASTIX_BUILD_ELASTIX )
include( ExternalElastix )
endif()
# ---------------------------------------------------------------------
# Build SuperElastix
include( SuperElastix )
set( proj Elastix )
set( ELASTIX_REPOSITORY git://github.com/mstaring/elastix.git )
set( ELASTIX_TAG 6eb6fc7e0d86bafdfdffb1b8bbd125f2a56a486e )
ExternalProject_Add( ${proj}
GIT_REPOSITORY ${ELASTIX_REPOSITORY}
GIT_TAG ${ELASTIX_TAG}
UPDATE_COMMAND ""
SOURCE_DIR ${proj}
BINARY_DIR ${proj}-build
CMAKE_GENERATOR ${gen}
CMAKE_ARGS
--no-warn-unused-cli
-DELASTIX_BUILD_TESTING:BOOL=OFF
-DELASTIX_BUILD_EXECUTABLE:BOOL=OFF
-DELASTIX_BUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DITK_DIR:PATH=${ITK_DIR}
# Elastix components configuration
-DUSE_AdaptiveStochasticGradientDescent:BOOL=ON
-DUSE_AdvancedAffineTransformElastix:BOOL=ON
-DUSE_AdvancedBSplineTransform:BOOL=ON
-DUSE_AdvancedKappaStatisticMetric:BOOL=ON
-DUSE_AdvancedMattesMutualInformationMetric:BOOL=ON
-DUSE_AdvancedMeanSquaresMetric:BOOL=ON
-DUSE_AdvancedNormalizedCorrelationMetric:BOOL=ON
-DUSE_AffineDTITransformElastix:BOOL=ON
-DUSE_BSplineInterpolator:BOOL=ON
-DUSE_BSplineInterpolatorFloat:BOOL=ON
-DUSE_BSplineResampleInterpolator:BOOL=ON
-DUSE_BSplineResampleInterpolatorFloat:BOOL=ON
-DUSE_BSplineStackTransform:BOOL=ON
-DUSE_BSplineTransformWithDiffusion:BOOL=ON
-DUSE_CMAEvolutionStrategy:BOOL=ON
-DUSE_CUDAResampler:BOOL=OFF
-DUSE_ConjugateGradient:BOOL=ON
-DUSE_ConjugateGradientFRPR:BOOL=ON
-DUSE_CorrespondingPointsEuclideanDistanceMetric:BOOL=ON
-DUSE_DeformationFieldTransform:BOOL=ON
-DUSE_DisplacementMagnitudePenalty:BOOL=ON
-DUSE_DistancePreservingRigidityPenalty:BOOL=ON
-DUSE_EulerTransformElastix:BOOL=ON
-DUSE_FiniteDifferenceGradientDescent:BOOL=ON
-DUSE_FixedGenericPyramid:BOOL=ON
-DUSE_FixedRecursivePyramid:BOOL=ON
-DUSE_FixedShrinkingPyramid:BOOL=ON
-DUSE_FixedSmoothingPyramid:BOOL=ON
-DUSE_FullSampler:BOOL=ON
-DUSE_FullSearch:BOOL=ON
-DUSE_GradientDifferenceMetric:BOOL=ON
-DUSE_GridSampler:BOOL=ON
-DUSE_KNNGraphAlphaMutualInformationMetric:BOOL=OFF
-DUSE_LinearInterpolator:BOOL=ON
-DUSE_LinearResampleInterpolator:BOOL=ON
-DUSE_MissingStructurePenalty:BOOL=ON
-DUSE_MovingRecursivePyramid:BOOL=ON
-DUSE_MovingShrinkingPyramid:BOOL=ON
-DUSE_MovingSmoothingPyramid:BOOL=ON
-DUSE_MultiBSplineTransformWithNormal:BOOL=ON
-DUSE_MultiInputRandomCoordinateSampler:BOOL=ON
-DUSE_MultiMetricMultiResolutionRegistration:BOOL=ON
-DUSE_MultiResolutionRegistration:BOOL=ON
-DUSE_MultiResolutionRegistrationWithFeatures:BOOL=ON
-DUSE_MutualInformationHistogramMetric:BOOL=ON
-DUSE_MyStandardResampler:BOOL=ON
-DUSE_NearestNeighborInterpolator:BOOL=ON
-DUSE_NearestNeighborResampleInterpolator:BOOL=ON
-DUSE_NormalizedGradientCorrelationMetric:BOOL=ON
-DUSE_NormalizedMutualInformationMetric:BOOL=ON
-DUSE_PatternIntensityMetric:BOOL=ON
-DUSE_PolydataDummyPenalty:BOOL=ON
-DUSE_Powell:BOOL=ON
-DUSE_QuasiNewtonLBFGS:BOOL=ON
-DUSE_RSGDEachParameterApart:BOOL=ON
-DUSE_RandomCoordinateSampler:BOOL=ON
-DUSE_RandomSampler:BOOL=ON
-DUSE_RandomSamplerSparseMask:BOOL=ON
-DUSE_RayCastInterpolator:BOOL=ON
-DUSE_RayCastResampleInterpolator:BOOL=ON
-DUSE_ReducedDimensionBSplineInterpolator:BOOL=ON
-DUSE_ReducedDimensionBSplineResampleInterpolator:BOOL=ON
-DUSE_RegularStepGradientDescent:BOOL=ON
-DUSE_SimilarityTransformElastix:BOOL=ON
-DUSE_Simplex:BOOL=ON
-DUSE_SimultaneousPerturbation:BOOL=ON
-DUSE_SplineKernelTransform:BOOL=ON
-DUSE_StandardGradientDescent:BOOL=ON
-DUSE_StatisticalShapePenalty:BOOL=ON
-DUSE_TransformBendingEnergyPenanalty:BOOL=ON
-DUSE_TransformRigidityPenalty:BOOL=ON
-DUSE_TranslationTransformElastix:BOOL=ON
-DUSE_VarianceOverLastDimensionMetric:BOOL=ON
-DUSE_ViolaWellsMutualInformationMetric:BOOL=ON
-DUSE_WeightedCombinationTransformElastix:BOOL=ON
DEPENDS ITK
)
ExternalProject_Get_Property( Elastix binary_dir )
set( ELASTIX_USE_FILE "${binary_dir}/src/UseElastix.cmake" )
list( APPEND ELASTIX_DEPENDENCIES ${proj} )
set( proj Elastix )
set( proj SuperElastix )
ExternalProject_Add( ${proj}
DOWNLOAD_COMMAND ""
......@@ -6,13 +6,14 @@ ExternalProject_Add( ${proj}
BINARY_DIR ${proj}-build
CMAKE_ARGS
--no-warn-unused-cli
-DELASTIX_BUILD_EXAMPLES:BOOL=${ELASTIX_BUILD_EXAMPLES}
-DELASTIX_BUILD_TESTING:BOOL=${ELASTIX_BUILD_TESTING}
-DELASTIX_BUILD_BENCHMARKING:BOOL=${ELASTIX_BUILD_BENCHMARKING}
-DELASTIX_BUILD_DASHBOARD:BOOL=${ELASTIX_BUILD_DASHBOARD}
-DSUPERELASTIX_BUILD_EXAMPLES:BOOL=${SUPERELASTIX_BUILD_EXAMPLES}
-DSUPERELASTIX_BUILD_TESTING:BOOL=${SUPERELASTIX_BUILD_TESTING}
-DSUPERELASTIX_BUILD_BENCHMARKING:BOOL=${SUPERELASTIX_BUILD_BENCHMARKING}
-DSUPERELASTIX_BUILD_DASHBOARD:BOOL=${SUPERELASTIX_BUILD_DASHBOARD}
-DITK_DIR:PATH=${ITK_DIR}
-DBOOST_ROOT:PATH=${BOOST_ROOT}
-DGTEST_ROOT:PATH=${GTEST_ROOT}
-DELASTIX_USE_FILE:PATH=${ELASTIX_USE_FILE}
DEPENDS ${ELASTIX_DEPENDENCIES}
INSTALL_COMMAND ""
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment