X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkDemonsDeformableRegistrationGenericFilter.txx;h=6132dc5897ae115d57fd9117e93cfd954a024307;hb=265fe0b1cf2d218f079ca8a5e85d2cbfcec42d9e;hp=ac95ce1579d931819ee912fb2171661fea1848f2;hpb=940010a60d70573254f7a68697f81e0ebc8548f7;p=clitk.git diff --git a/registration/clitkDemonsDeformableRegistrationGenericFilter.txx b/registration/clitkDemonsDeformableRegistrationGenericFilter.txx old mode 100755 new mode 100644 index ac95ce1..6132dc5 --- a/registration/clitkDemonsDeformableRegistrationGenericFilter.txx +++ b/registration/clitkDemonsDeformableRegistrationGenericFilter.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef __clitkDemonsDeformableRegistrationGenericFilter_txx #define __clitkDemonsDeformableRegistrationGenericFilter_txx #include "clitkDemonsDeformableRegistrationGenericFilter.h" @@ -151,8 +151,12 @@ namespace clitk //find the multiresolution filter // typedef typename RegistrationFilterType::FixedImageType InternalImageType; // typedef typename RegistrationFilterType::MovingImageType MovingImageType; - typedef typename RegistrationFilterType::DeformationFieldType DeformationFieldType; - typedef clitk::MultiResolutionPDEDeformableRegistration MultiResolutionRegistrationType; +#if ITK_VERSION_MAJOR >= 4 + typedef typename RegistrationFilterType::DisplacementFieldType DisplacementFieldType; +#else + typedef typename RegistrationFilterType::DeformationFieldType DisplacementFieldType; +#endif + typedef clitk::MultiResolutionPDEDeformableRegistration MultiResolutionRegistrationType; typedef CommandResolutionLevelUpdate LevelObserver; protected: @@ -533,7 +537,11 @@ namespace clitk //JV TODO // pdeFilter->SetMaximumError(m_ArgsInfo.maxError_arg); // pdeFilter->SetMaximumKernelWidth(m_ArgsInfo.maxError_arg); +#if ITK_VERSION_MAJOR >= 4 + pdeFilter->SetSmoothDisplacementField(!m_ArgsInfo.fluid_flag); +#else pdeFilter->SetSmoothDeformationField(!m_ArgsInfo.fluid_flag); +#endif pdeFilter->SetSmoothUpdateField(m_ArgsInfo.fluid_flag); pdeFilter->SetUseImageSpacing( m_ArgsInfo.spacing_flag ); @@ -599,7 +607,11 @@ namespace clitk typedef itk::WarpImageFilter< MovingImageType, FixedImageType, DeformationFieldType > WarpFilterType; typename WarpFilterType::Pointer warp = WarpFilterType::New(); +#if ITK_VERSION_MAJOR >= 4 + warp->SetDisplacementField( deformationField ); +#else warp->SetDeformationField( deformationField ); +#endif warp->SetInput( movingImageReader->GetOutput() ); warp->SetOutputOrigin( fixedImage->GetOrigin() ); warp->SetOutputSpacing( fixedImage->GetSpacing() );