18#ifndef itkInvertDisplacementFieldImageFilter_h
19#define itkInvertDisplacementFieldImageFilter_h
40template <
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);
124 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
125 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
128 itkSetMacro(MeanErrorToleranceThreshold,
RealType);
129 itkGetConstMacro(MeanErrorToleranceThreshold,
RealType);
133 itkGetConstMacro(MaxErrorToleranceThreshold,
RealType);
142 itkSetMacro(EnforceBoundaryCondition,
bool);
143 itkGetMacro(EnforceBoundaryCondition,
bool);
144 itkBooleanMacro(EnforceBoundaryCondition);
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"
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Iteratively estimate the inverse field of a displacement field.
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputFieldType::PointType OriginType
typename OutputFieldType::SizeType SizeType
itkSetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType)
virtual void SetInterpolator(InterpolatorType *interpolator)
TOutputImage OutputFieldType
InvertDisplacementFieldImageFilter()
OutputFieldType InverseDisplacementFieldType
const InputFieldType * GetDisplacementField() const
void SetDisplacementField(const InputFieldType *field)
InputFieldType DisplacementFieldType
typename OutputFieldType::RegionType RegionType
typename OutputFieldType::IndexType IndexType
typename OutputFieldType::PixelType VectorType
itkGetInputMacro(InverseFieldInitialEstimate, InverseDisplacementFieldType)
typename OutputFieldType::DirectionType DirectionType
~InvertDisplacementFieldImageFilter() override=default
void GenerateData() override
typename OutputFieldType::PointType PointType
typename OutputFieldType::SpacingType SpacingType
typename OutputFieldType::PixelType PixelType
typename VectorType::ComponentType RealType
void DynamicThreadedGenerateData(const RegionType &) override
TInputImage InputFieldType
RegionType OutputImageRegionType
Light weight base class for most itk classes.
Base class for all vector image interpolators.
Linearly interpolate a vector image at specified positions.
SmartPointer< Self > Pointer
ImageBaseType::DirectionType DirectionType
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....