Skip to content

Commit

Permalink
ENH: Switch to latest version of SuperElastix/elastix (using ITK 5.1.1)
Browse files Browse the repository at this point in the history
Removed obsolete `elastix::BaseComponent::InitializeElastixLibrary()`
calls, as Elastix is now initialized as a library by default:
"ENH: Replace InitializeElastixLibrary() by InitializeElastixExecutable()"
SuperElastix/elastix#248
SuperElastix/elastix@ef64fb2

Adjusted CMake `Elastix_LIBRARIES`, as the Elastix library CMake targets
are now named elastix_lib and transformix_lib:
"ENH: Allow building exe and lib of elastix and transformix together"
SuperElastix/elastix#232
SuperElastix/elastix@3944a13
  • Loading branch information
N-Dekker committed Sep 11, 2020
1 parent 0194a64 commit 58b0de1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(DEFINED ENV{ELASTIX_USE_OPENCL})
set(ELASTIX_USE_OPENCL ON CACHE BOOL "Enable OpenCL support in Elastix")
endif()

set(Elastix_LIBRARIES elastix transformix)
set(Elastix_LIBRARIES elastix_lib transformix_lib)
if(ELASTIX_USE_OPENCL)
list(APPEND Elastix_LIBRARIES elxOpenCL)
endif()
Expand Down Expand Up @@ -39,8 +39,9 @@ set(_itk_build_testing ${BUILD_TESTING})
#set(BUILD_TESTING OFF)
set(_itk_build_shared ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
set(elastix_GIT_REPOSITORY "https://github.com/thewtex/elastix.git")
set(elastix_GIT_TAG "a13be5c2daa1d2b8454609366aef3cba194be8c2")
set(elastix_GIT_REPOSITORY "https://github.com/SuperElastix/elastix.git")
# Tag of commit "COMP: Move #include "itkOpenCL..." from elxElastixMain.h to elx*Main.cxx"
set(elastix_GIT_TAG "beda57fd2acd34f117815ae57eec3559617cb60d")
FetchContent_Declare(
elx
GIT_REPOSITORY ${elastix_GIT_REPOSITORY}
Expand Down
1 change: 0 additions & 1 deletion include/itkElastixRegistrationMethod.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace itk
template <typename TFixedImage, typename TMovingImage>
ElastixRegistrationMethod<TFixedImage, TMovingImage>::ElastixRegistrationMethod()
{
elastix::BaseComponent::InitializeElastixLibrary();
this->SetPrimaryInputName("FixedImage");
this->SetNumberOfIndexedOutputs(2);

Expand Down
2 changes: 0 additions & 2 deletions include/itkTransformixFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ namespace itk
template <typename TMovingImage>
TransformixFilter<TMovingImage>::TransformixFilter()
{
elastix::BaseComponent::InitializeElastixLibrary();

this->SetPrimaryInputName("TransformParameterObject");
this->SetPrimaryOutputName("ResultImage");
this->SetOutput("ResultDeformationField", this->MakeOutput("ResultDeformationField"));
Expand Down

0 comments on commit 58b0de1

Please sign in to comment.