18 #ifndef itkInvertDisplacementFieldImageFilter_h
19 #define itkInvertDisplacementFieldImageFilter_h
40 template <
typename TInputImage,
typename TOutputImage = TInputImage>
58 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
67 using PixelType =
typename OutputFieldType::PixelType;
80 using RealType =
typename VectorType::ComponentType;
92 itkDebugMacro(
"setting deformation field to " << field);
93 if (field != this->GetInput(0))
95 this->SetInput(0, field);
97 if (!this->m_Interpolator.IsNull())
99 this->m_Interpolator->SetInputImage(field);
108 const InputFieldType *
111 return this->GetInput(0);
115 itkSetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType);
116 itkGetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType);
121 SetInterpolator(InterpolatorType * interpolator);
124 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
125 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
128 itkSetMacro(MeanErrorToleranceThreshold, RealType);
129 itkGetConstMacro(MeanErrorToleranceThreshold, RealType);
132 itkSetMacro(MaxErrorToleranceThreshold, RealType);
133 itkGetConstMacro(MaxErrorToleranceThreshold, RealType);
136 itkGetConstMacro(MaxErrorNorm, RealType);
139 itkGetConstMacro(MeanErrorNorm, RealType);
142 itkSetMacro(EnforceBoundaryCondition,
bool);
143 itkGetMacro(EnforceBoundaryCondition,
bool);
144 itkBooleanMacro(EnforceBoundaryCondition);
155 PrintSelf(std::ostream & os,
Indent indent)
const override;
159 GenerateData()
override;
163 DynamicThreadedGenerateData(
const RegionType &)
override;
169 unsigned int m_MaximumNumberOfIterations{ 20 };
183 bool m_DoThreadedEstimateInverse{
false };
184 bool m_EnforceBoundaryCondition{
true };
185 std::mutex m_Mutex{};
190 #ifndef ITK_MANUAL_INSTANTIATION
191 # include "itkInvertDisplacementFieldImageFilter.hxx"