Skip to content

Conversation

@N-Dekker
Copy link
Collaborator

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

@N-Dekker
Copy link
Collaborator Author

Follow-up to pull request #58 (which was accidentally closed)

@dzenanz
Copy link
Member

dzenanz commented Sep 11, 2020

I remember there was some discussion about elastix building with ITK_LEGACY_REMOVE ON. Did that happen?

@N-Dekker
Copy link
Collaborator Author

@dzenanz

I remember there was some discussion about elastix building with ITK_LEGACY_REMOVE ON. Did that happen?

Yes, Matt (@thewtex) wanted to be able to build elastix + ITK 5.1 with ITK_LEGACY_REMOVE ON: SuperElastix/elastix#245 and now it does, at least on the elastix CI: -DITK_LEGACY_REMOVE=ON at https://github.com/SuperElastix/elastix/blob/develop/Testing/CI/Azure/ci.yml#L31

@N-Dekker N-Dekker force-pushed the Switch-to-SuperElastix-elastix branch 2 times, most recently from ce90513 to 8f934e9 Compare September 12, 2020 22:34
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
@N-Dekker N-Dekker force-pushed the Switch-to-SuperElastix-elastix branch from 8f934e9 to 2bdca95 Compare September 13, 2020 21:09
@N-Dekker
Copy link
Collaborator Author

N-Dekker commented Sep 14, 2020

It looks like this PR run entirely fine now at GitHub Actions, but I still need to have a look at the OpenCL issue. I did not yet merge SuperElastix/elastix#213 "Khronos OpenCL support" from Matt (@thewtex) because I haven't been able to reproduce the issue so far. Would it be possible to have a test that demonstrates that this change, or thewtex/elastix@9eb50bc + thewtex/elastix@9b86123 are essential?

Update: just opened for review!

Would it be OK to just merge this PR now, and then possibly add Khronos OpenCL support later? For me it takes too much time now to properly test OpenCL support.

@N-Dekker N-Dekker marked this pull request as ready for review September 14, 2020 14:07
@N-Dekker N-Dekker changed the title WIP: Switch to latest version of SuperElastix/elastix (using ITK 5.1.1) ENH: Switch to latest version of SuperElastix/elastix (using ITK 5.1.1) Sep 14, 2020
@dzenanz
Copy link
Member

dzenanz commented Sep 14, 2020

I ran into compile errors in a local build with ITK_LEGACY_REMOVE=ON. I guess I will get around to that again later. We should merge this now, and make additional fixes later.

@dzenanz dzenanz merged commit cfebec7 into InsightSoftwareConsortium:master Sep 14, 2020
@N-Dekker
Copy link
Collaborator Author

Thanks for merging, @dzenanz ! We certainly intended elastix to support ITK_LEGACY_REMOVE=ON with ITK 5.1.1, so please let us know if it still has some errors!

@dzenanz
Copy link
Member

dzenanz commented Sep 14, 2020

Oh, the problem was that ITK_FUTURE_LEGACY_REMOVE was on. Here is the build log:

1>------ Build started: Project: ITKData, Configuration: RelWithDebInfo x64 ------
2>------ Build started: Project: itkBSplineInterpolationDerivativeWeightFunctionTest, Configuration: RelWithDebInfo x64 ------
3>------ Build started: Project: elxImageCompare, Configuration: RelWithDebInfo x64 ------
4>------ Build started: Project: MultiMetricMultiResolutionRegistration, Configuration: RelWithDebInfo x64 ------
5>------ Build started: Project: MultiResolutionRegistrationWithFeatures, Configuration: RelWithDebInfo x64 ------
5>elxMultiResolutionRegistrationWithFeatures.cxx
3>elxImageCompare.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\elxImageCompare.exe
4>elxMultiMetricMultiResolutionRegistration.cxx
6>------ Build started: Project: elxInvertTransform, Configuration: RelWithDebInfo x64 ------
6>elxInvertTransform.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\elxInvertTransform.exe
7>------ Build started: Project: elxTransformParametersCompare, Configuration: RelWithDebInfo x64 ------
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\itkMultiMetricMultiResolutionImageRegistrationMethod.h(213,22): error C3668: 'itk::MultiMetricMultiResolutionImageRegistrationMethod<itk::Image<float,2>,itk::Image<float,2>>::GetInterpolator': method with override specifier 'override' did not override any base class methods
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\elxMultiMetricMultiResolutionRegistration.h(96): message : see reference to class template instantiation 'itk::MultiMetricMultiResolutionImageRegistrationMethod<itk::Image<float,2>,itk::Image<float,2>>' being compiled
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\elxMultiMetricMultiResolutionRegistration.cxx(21): message : see reference to class template instantiation 'elastix::MultiMetricMultiResolutionRegistration<elastix::ElastixTemplate<elastix::ElastixTypedef<1>::FixedImageType,elastix::ElastixTypedef<1>::MovingImageType>>' being compiled
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\elxMultiMetricMultiResolutionRegistration.cxx(21): message : while compiling class template member function 'int MultiMetricMultiResolutionRegistration_install<1>::DO(elastix::ComponentDatabase *)'
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\elxMultiMetricMultiResolutionRegistration.cxx(21): message : see reference to function template instantiation 'int MultiMetricMultiResolutionRegistration_install<1>::DO(elastix::ComponentDatabase *)' being compiled
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\elxMultiMetricMultiResolutionRegistration.cxx(21): message : see reference to class template instantiation 'MultiMetricMultiResolutionRegistration_install<1>' being compiled
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\itkMultiMetricMultiResolutionImageRegistrationMethod.h(224,27): error C3668: 'itk::MultiMetricMultiResolutionImageRegistrationMethod<itk::Image<float,2>,itk::Image<float,2>>::GetFixedImagePyramid': method with override specifier 'override' did not override any base class methods
4>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\itkMultiMetricMultiResolutionImageRegistrationMethod.h(235,28): error C3668: 'itk::MultiMetricMultiResolutionImageRegistrationMethod<itk::Image<float,2>,itk::Image<float,2>>::GetMovingImagePyramid': method with override specifier 'override' did not override any base class methods
2>itkBSplineInterpolationDerivativeWeightFunctionTest.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\itkBSplineInterpolationDerivativeWeightFunctionTest.exe
4>Done building project "MultiMetricMultiResolutionRegistration.vcxproj" -- FAILED.
8>------ Build started: Project: itkAccumulateDerivativesParallellizationTest, Configuration: RelWithDebInfo x64 ------
9>------ Build started: Project: itkAdvanceOneStepParallellizationTest, Configuration: RelWithDebInfo x64 ------
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\itkMultiInputMultiResolutionImageRegistrationMethodBase.h(186,27): error C3668: 'itk::MultiInputMultiResolutionImageRegistrationMethodBase<TFixedImage,TMovingImage>::GetFixedImagePyramid': method with override specifier 'override' did not override any base class methods
5>        with
5>        [
5>            TFixedImage=itk::Image<float,2>,
5>            TMovingImage=itk::Image<float,2>
5>        ]
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\itkMultiResolutionImageRegistrationMethodWithFeatures.h(57): message : see reference to class template instantiation 'itk::MultiInputMultiResolutionImageRegistrationMethodBase<TFixedImage,TMovingImage>' being compiled
5>        with
5>        [
5>            TFixedImage=itk::Image<float,2>,
5>            TMovingImage=itk::Image<float,2>
5>        ]
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\elxMultiResolutionRegistrationWithFeatures.h(53): message : see reference to class template instantiation 'itk::MultiResolutionImageRegistrationMethodWithFeatures<itk::Image<float,2>,itk::Image<float,2>>' being compiled
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\elxMultiResolutionRegistrationWithFeatures.cxx(21): message : see reference to class template instantiation 'elastix::MultiResolutionRegistrationWithFeatures<elastix::ElastixTemplate<elastix::ElastixTypedef<1>::FixedImageType,elastix::ElastixTypedef<1>::MovingImageType>>' being compiled
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\elxMultiResolutionRegistrationWithFeatures.cxx(21): message : while compiling class template member function 'int MultiResolutionRegistrationWithFeatures_install<1>::DO(elastix::ComponentDatabase *)'
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\elxMultiResolutionRegistrationWithFeatures.cxx(21): message : see reference to function template instantiation 'int MultiResolutionRegistrationWithFeatures_install<1>::DO(elastix::ComponentDatabase *)' being compiled
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\elxMultiResolutionRegistrationWithFeatures.cxx(21): message : see reference to class template instantiation 'MultiResolutionRegistrationWithFeatures_install<1>' being compiled
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\itkMultiInputMultiResolutionImageRegistrationMethodBase.h(208,28): error C3668: 'itk::MultiInputMultiResolutionImageRegistrationMethodBase<TFixedImage,TMovingImage>::GetMovingImagePyramid': method with override specifier 'override' did not override any base class methods
5>        with
5>        [
5>            TFixedImage=itk::Image<float,2>,
5>            TMovingImage=itk::Image<float,2>
5>        ]
5>C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-src\Components\Registrations\MultiResolutionRegistrationWithFeatures\itkMultiInputMultiResolutionImageRegistrationMethodBase.h(219,22): error C3668: 'itk::MultiInputMultiResolutionImageRegistrationMethodBase<TFixedImage,TMovingImage>::GetInterpolator': method with override specifier 'override' did not override any base class methods
5>        with
5>        [
5>            TFixedImage=itk::Image<float,2>,
5>            TMovingImage=itk::Image<float,2>
5>        ]
10>------ Build started: Project: itkAdvancedBSplineDeformableTransformTest, Configuration: RelWithDebInfo x64 ------
9>itkAdvanceOneStepParallellizationTest.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\itkAdvanceOneStepParallellizationTest.exe
11>------ Build started: Project: itkAdvancedLinearInterpolatorTest, Configuration: RelWithDebInfo x64 ------
10>itkAdvancedBSplineDeformableTransformTest.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\itkAdvancedBSplineDeformableTransformTest.exe
12>------ Build started: Project: ClangFormat (ExternalProjectTargets\ClangFormat\ClangFormat), Configuration: RelWithDebInfo x64 ------
7>elxTransformParametersCompare.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\elxTransformParametersCompare.exe
13>------ Build started: Project: elxComputeOverlap, Configuration: RelWithDebInfo x64 ------
5>Done building project "MultiResolutionRegistrationWithFeatures.vcxproj" -- FAILED.
14>------ Build started: Project: ElastixTestDriver, Configuration: RelWithDebInfo x64 ------
15>------ Build started: Project: elastix_exe, Configuration: RelWithDebInfo x64 ------
11>itkAdvancedLinearInterpolatorTest.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\itkAdvancedLinearInterpolatorTest.exe
16>------ Build started: Project: transformix_exe, Configuration: RelWithDebInfo x64 ------
13>elxComputeOverlap.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\elxComputeOverlap.exe
14>itkElastixRegistrationMethodTest.cxx
17>------ Build started: Project: ElastixHeaderTestClean, Configuration: RelWithDebInfo x64 ------
18>------ Skipped Build: Project: Continuous, Configuration: RelWithDebInfo x64 ------
18>Project not selected to build for this solution configuration 
19>------ Skipped Build: Project: RUN_TESTS, Configuration: RelWithDebInfo x64 ------
19>Project not selected to build for this solution configuration 
20>------ Skipped Build: Project: ITKHeaderTests, Configuration: RelWithDebInfo x64 ------
20>Project not selected to build for this solution configuration 
21>------ Skipped Build: Project: Experimental, Configuration: RelWithDebInfo x64 ------
21>Project not selected to build for this solution configuration 
22>------ Skipped Build: Project: Nightly, Configuration: RelWithDebInfo x64 ------
22>Project not selected to build for this solution configuration 
23>------ Skipped Build: Project: NightlyMemoryCheck, Configuration: RelWithDebInfo x64 ------
23>Project not selected to build for this solution configuration 
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(276,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::ObjectType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::Object::Self> &itk::SmartPointer<itk::Object::Self>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::Object::Self> &itk::SmartPointer<itk::Object::Self>::operator =(itk::SmartPointer<itk::Object::Self>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(276,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::ElastixMainObjectPointer, const elastix::ElastixMain::ObjectType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(88): message : while compiling class template member function 'void itk::ElastixRegistrationMethod<ImageType,ImageType>::GenerateData(void)'
14>C:\Dev\ITKRemotes\ITKElastix\test\itkElastixRegistrationMethodTest.cxx(77): message : see reference to class template instantiation 'itk::ElastixRegistrationMethod<ImageType,ImageType>' being compiled
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(277,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::DataObjectContainerType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(277,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::DataObjectContainerPointer, const elastix::ElastixMain::DataObjectContainerType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(278,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::DataObjectContainerType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(278,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::DataObjectContainerPointer, const elastix::ElastixMain::DataObjectContainerType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(279,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::DataObjectContainerType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(279,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::DataObjectContainerPointer, const elastix::ElastixMain::DataObjectContainerType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(280,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::DataObjectContainerType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(280,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::DataObjectContainerPointer, const elastix::ElastixMain::DataObjectContainerType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(281,1): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const elastix::ElastixMain::DataObjectContainerType *' (or there is no acceptable conversion)
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(161,18): message : could be 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(std::nullptr_t) noexcept'
14>C:\Dev\ITK-git\Modules\Core\Common\include\itkSmartPointer.h(152,3): message : or       'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>> &itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>::operator =(itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>) noexcept'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkElastixRegistrationMethod.hxx(281,1): message : while trying to match the argument list '(itk::ElastixRegistrationMethod<ImageType,ImageType>::DataObjectContainerPointer, const elastix::ElastixMain::DataObjectContainerType *)'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkTransformixFilter.hxx(225,1): error C2440: 'initializing': cannot convert from 'const elastix::ElastixMain::DataObjectContainerType *' to 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkTransformixFilter.hxx(225,1): message : No constructor could take the source type, or constructor overload resolution was ambiguous
14>C:\Dev\ITKRemotes\ITKElastix\include\itkTransformixFilter.hxx(68): message : while compiling class template member function 'void itk::TransformixFilter<ImageType>::GenerateData(void)'
14>C:\Dev\ITKRemotes\ITKElastix\test\itkElastixRegistrationMethodTest.cxx(110): message : see reference to class template instantiation 'itk::TransformixFilter<ImageType>' being compiled
14>C:\Dev\ITKRemotes\ITKElastix\include\itkTransformixFilter.hxx(232,1): error C2440: 'initializing': cannot convert from 'const elastix::ElastixMain::DataObjectContainerType *' to 'itk::SmartPointer<itk::VectorContainer<unsigned int,elastix::ElastixBase::DataObjectPointer>>'
14>C:\Dev\ITKRemotes\ITKElastix\include\itkTransformixFilter.hxx(232,1): message : No constructor could take the source type, or constructor overload resolution was ambiguous
15>elastix_exe.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\elastix.exe
16>transformix_exe.vcxproj -> C:\Dev\ITKRemotes\ITKElastix-19\_deps\elx-build\bin\RelWithDebInfo\transformix.exe
14>Done building project "ElastixTestDriver.vcxproj" -- FAILED.
24>------ Skipped Build: Project: INSTALL, Configuration: RelWithDebInfo x64 ------
24>Project not selected to build for this solution configuration 
========== Build: 14 succeeded, 3 failed, 77 up-to-date, 7 skipped ==========

@N-Dekker
Copy link
Collaborator Author

@dzenanz Do you really need to support ITK_FUTURE_LEGACY_REMOVE=ON? I looked at it before, and it appeared hard to support both ON and OFF!

For example, the error you got, "method with override specifier 'override' did not override":

C:\Dev\ITKRemotes\ITKElastix-19_deps\elx-src\Components\Registrations\MultiMetricMultiResolutionRegistration\itkMultiMetricMultiResolutionImageRegistrationMethod.h(213,22): error C3668: 'itk::MultiMetricMultiResolutionImageRegistrationMethod<itk::Image<float,2>,itk::Image<float,2>>::GetInterpolator': method with override specifier 'override' did not override any base class methods

The method certainly does override when ITK_FUTURE_LEGACY_REMOVE is OFF! This error may be fixed by adding some #ifdef's to the elastix source file, but I don't think that will look pretty...

@dzenanz
Copy link
Member

dzenanz commented Sep 16, 2020

Elastix does not need to support that. But I usually have it turned on, as I want the code I write to not use old style. That's how I noticed it. I can certainly keep it OFF when working with ITKElastix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants