===================================================*/
#include "itkVectorResampleImageFilter.h"
-#include "clitkCoeffsToDVF.h"
+#include "clitkConvertBLUTCoeffsToVFFilter.h"
namespace clitk
{
typename DeformationFieldType::Pointer deformationField;
if (m_ArgsInfo.coeff_given) {
- deformationField = BLUTCoeffsToDVF<DeformationFieldType>(m_ArgsInfo.coeff_arg, m_InputFileName, m_Verbose);
+ typedef ConvertBLUTCoeffsToVFFilter<DeformationFieldType> FilterType;
+ typename FilterType::Pointer filter = FilterType::New();
+ filter->SetInputFileName(m_ArgsInfo.coeff_arg);
+ filter->SetLikeFileName(m_InputFileName);
+ filter->SetVerbose(m_Verbose);
+ filter->Update();
+ deformationField = filter->GetOutput();
}
else {
//Read the deformation field
//Backward mapping
typedef itk::WarpImageFilter<InputImageType, InputImageType, DeformationFieldType> BackwardWarpFilterType;
typename BackwardWarpFilterType::Pointer backwardWarpFilter= BackwardWarpFilterType::New();
-#if ITK_VERSION_MAJOR >= 4
backwardWarpFilter->SetDisplacementField( deformationField );
-#else
- backwardWarpFilter->SetDeformationField( deformationField );
-#endif
backwardWarpFilter->SetEdgePaddingValue( static_cast<PixelType>(m_ArgsInfo.pad_arg) );
backwardWarpFilter->SetOutputSpacing( deformationField->GetSpacing() );
backwardWarpFilter->SetOutputOrigin( input->GetOrigin() );