18 #ifndef itkInvertDisplacementFieldImageFilter_h
19 #define itkInvertDisplacementFieldImageFilter_h
40 template <
typename TInputImage,
typename TOutputImage = TInputImage>
56 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
65 using PixelType =
typename OutputFieldType::PixelType;
78 using RealType =
typename VectorType::ComponentType;
90 itkDebugMacro(
"setting deformation field to " << field );
91 if ( field != this->GetInput( 0 ) )
93 this->SetInput( 0, field );
95 if( ! this->m_Interpolator.IsNull() )
97 this->m_Interpolator->SetInputImage( field );
108 return this->GetInput( 0 );
112 itkSetInputMacro( InverseFieldInitialEstimate, InverseDisplacementFieldType );
113 itkGetInputMacro( InverseFieldInitialEstimate, InverseDisplacementFieldType );
117 virtual void SetInterpolator( InterpolatorType* interpolator );
120 itkSetMacro( MaximumNumberOfIterations,
unsigned int );
121 itkGetConstMacro( MaximumNumberOfIterations,
unsigned int );
124 itkSetMacro( MeanErrorToleranceThreshold, RealType );
125 itkGetConstMacro( MeanErrorToleranceThreshold, RealType );
128 itkSetMacro( MaxErrorToleranceThreshold, RealType );
129 itkGetConstMacro( MaxErrorToleranceThreshold, RealType );
132 itkGetConstMacro( MaxErrorNorm, RealType );
135 itkGetConstMacro( MeanErrorNorm, RealType );
138 itkSetMacro( EnforceBoundaryCondition,
bool );
139 itkGetMacro( EnforceBoundaryCondition,
bool );
150 void PrintSelf( std::ostream& os,
Indent indent )
const override;
153 void GenerateData()
override;
156 void DynamicThreadedGenerateData(
const RegionType & )
override;
162 unsigned int m_MaximumNumberOfIterations{20};
176 bool m_DoThreadedEstimateInverse{
false};
177 bool m_EnforceBoundaryCondition{
true};
184 #ifndef ITK_MANUAL_INSTANTIATION
185 #include "itkInvertDisplacementFieldImageFilter.hxx"
InputFieldType DisplacementFieldType
SpacingType m_DisplacementFieldSpacing
typename OutputFieldType::PointType PointType
InterpolatorType::Pointer m_Interpolator
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
RealType m_MaxErrorToleranceThreshold
TInputImage InputFieldType
Base class for all process objects that output image data.
RealImageType::Pointer m_ScaledNormImage
RealType m_MeanErrorToleranceThreshold
typename OutputFieldType::SpacingType SpacingType
typename OutputFieldType::DirectionType DirectionType
ImageBaseType::SizeType SizeType
ImageBaseType::DirectionType DirectionType
typename OutputFieldType::PointType OriginType
typename OutputFieldType::IndexType IndexType
typename OutputImageType::RegionType OutputImageRegionType
ImageBaseType::IndexType IndexType
typename OutputFieldType::PixelType VectorType
typename OutputFieldType::RegionType RegionType
typename OutputFieldType::PixelType PixelType
typename VectorType::ComponentType RealType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
void SetDisplacementField(const InputFieldType *field)
Base class for all vector image interpolaters.
const InputFieldType * GetDisplacementField() const
typename OutputFieldType::SizeType SizeType
Iteratively estimate the inverse field of a displacement field.
ImageBaseType::RegionType RegionType
DisplacementFieldType::Pointer m_ComposedField
TOutputImage OutputFieldType
Templated n-dimensional image class.
OutputFieldType InverseDisplacementFieldType
Linearly interpolate a vector image at specified positions.