18 #ifndef itkInvertDisplacementFieldImageFilter_h
19 #define itkInvertDisplacementFieldImageFilter_h
40 template <
typename TInputImage,
typename TOutputImage = TInputImage>
55 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
64 using PixelType =
typename OutputFieldType::PixelType;
77 using RealType =
typename VectorType::ComponentType;
89 itkDebugMacro(
"setting deformation field to " << field);
90 if (field != this->GetInput(0))
92 this->SetInput(0, field);
94 if (!this->m_Interpolator.IsNull())
96 this->m_Interpolator->SetInputImage(field);
105 const InputFieldType *
108 return this->GetInput(0);
112 itkSetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType);
113 itkGetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType);
118 SetInterpolator(InterpolatorType * interpolator);
121 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
122 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
125 itkSetMacro(MeanErrorToleranceThreshold, RealType);
126 itkGetConstMacro(MeanErrorToleranceThreshold, RealType);
129 itkSetMacro(MaxErrorToleranceThreshold, RealType);
130 itkGetConstMacro(MaxErrorToleranceThreshold, RealType);
133 itkGetConstMacro(MaxErrorNorm, RealType);
136 itkGetConstMacro(MeanErrorNorm, RealType);
139 itkSetMacro(EnforceBoundaryCondition,
bool);
140 itkGetMacro(EnforceBoundaryCondition,
bool);
151 PrintSelf(std::ostream & os,
Indent indent)
const override;
155 GenerateData()
override;
159 DynamicThreadedGenerateData(
const RegionType &)
override;
165 unsigned int m_MaximumNumberOfIterations{ 20 };
179 bool m_DoThreadedEstimateInverse{
false };
180 bool m_EnforceBoundaryCondition{
true };
186 #ifndef ITK_MANUAL_INSTANTIATION
187 # include "itkInvertDisplacementFieldImageFilter.hxx"