18 #ifndef itkDisplacementFieldToBSplineImageFilter_h
19 #define itkDisplacementFieldToBSplineImageFilter_h
41 template <
typename TInputImage,
42 typename TInputPointSet = PointSet<typename TInputImage::PixelType, TInputImage::ImageDimension>,
43 typename TOutputImage = TInputImage>
59 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
70 using PixelType =
typename OutputFieldType::PixelType;
80 using RealType =
typename VectorType::RealValueType;
99 this->SetInput( 0, field );
105 return this->GetInput( 0 );
115 this->SetNthInput( 1, const_cast<RealImageType *>( image ) );
129 this->SetNthInput( 2, const_cast<InputPointSetType *>( points ) );
141 void SetPointSetConfidenceWeights( WeightsContainerType *weights );
150 void SetBSplineDomainFromImage( RealImageType * );
154 { this->SetBSplineDomainFromImage( const_cast<RealImageType *>( image ) ); }
157 void SetBSplineDomainFromImage( InputFieldType * );
161 { this->SetBSplineDomainFromImage( const_cast<InputFieldType *>( field ) ); }
167 itkGetConstMacro( BSplineDomainOrigin, OriginType );
170 itkGetConstMacro( BSplineDomainSpacing, SpacingType );
173 itkGetConstMacro( BSplineDomainSize,
SizeType );
179 itkSetMacro( UseInputFieldToDefineTheBSplineDomain,
bool );
180 itkGetConstMacro( UseInputFieldToDefineTheBSplineDomain,
bool )
181 itkBooleanMacro( UseInputFieldToDefineTheBSplineDomain );
186 itkSetMacro( SplineOrder,
unsigned int );
191 itkGetConstMacro( SplineOrder,
unsigned int );
200 itkSetMacro( NumberOfControlPoints, ArrayType );
209 itkGetConstMacro( NumberOfControlPoints, ArrayType );
217 itkSetMacro( NumberOfFittingLevels, ArrayType );
225 void SetNumberOfFittingLevels(
unsigned int n )
230 this->SetNumberOfFittingLevels( nlevels );
239 itkGetConstMacro( NumberOfFittingLevels, ArrayType );
244 itkBooleanMacro( EstimateInverse );
245 itkSetMacro( EstimateInverse,
bool );
246 itkGetConstMacro( EstimateInverse,
bool );
252 itkBooleanMacro( EnforceStationaryBoundary );
253 itkSetMacro( EnforceStationaryBoundary,
bool );
254 itkGetConstMacro( EnforceStationaryBoundary,
bool );
266 void PrintSelf( std::ostream& os,
Indent indent )
const override;
269 void GenerateData()
override;
272 bool m_EstimateInverse{
false };
273 bool m_EnforceStationaryBoundary{
true };
274 unsigned int m_SplineOrder{ 3 };
279 bool m_UsePointWeights{
false };
286 bool m_BSplineDomainIsDefined{
true };
287 bool m_UseInputFieldToDefineTheBSplineDomain{
false };
292 #ifndef ITK_MANUAL_INSTANTIATION
293 #include "itkDisplacementFieldToBSplineImageFilter.hxx"
const InputPointSetType * GetPointSet() const
TInputImage InputFieldType
typename InputFieldType::PointType InputFieldPointType
typename InputPointSetType::PointDataContainer PointDataContainerType
void SetConfidenceImage(const RealImageType *image)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
TInputPointSet InputPointSetType
const DisplacementFieldControlPointLatticeType * GetDisplacementFieldControlPointLattice() const
Base class for all process objects that output image data.
typename VectorType::RealValueType RealType
typename BSplineFilterType::WeightsContainerType WeightsContainerType
TOutputImage OutputFieldType
ArrayType m_NumberOfControlPoints
void SetDisplacementField(const InputFieldType *field)
const RealImageType * GetConfidenceImage() const
SpacingType m_BSplineDomainSpacing
ImageBaseType::SizeType SizeType
typename BSplineFilterType::ArrayType ArrayType
ImageBaseType::DirectionType DirectionType
ImageBaseType::IndexType IndexType
typename InputPointSetType::PointType PointType
void SetBSplineDomainFromImage(const InputFieldType *field)
typename OutputFieldType::RegionType RegionType
typename OutputFieldType::PixelType VectorType
typename OutputFieldType::PointType OriginType
typename OutputFieldType::SpacingType SpacingType
Image filter which provides a B-spline output approximation.
typename OutputFieldType::PixelType PixelType
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
void SetBSplineDomainFromImage(const RealImageType *image)
typename OutputFieldType::SizeType SizeType
InputFieldType DisplacementFieldType
typename BSplineFilterType::PointDataImageType DisplacementFieldControlPointLatticeType
typename InputPointSetType::PointsContainer PointsContainerType
OriginType m_BSplineDomainOrigin
void SetInput2(const InputPointSetType *points)
SizeType m_BSplineDomainSize
OutputFieldType InverseDisplacementFieldType
Base class for filters that take an image as input and produce an image as output.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
void SetInput1(const RealImageType *image)
Control indentation during Print() invocation.
ImageBaseType::PointType PointType
ArrayType m_NumberOfFittingLevels
Class which takes a dense displacement field image and/or a set of points with associated displacemen...
const InputFieldType * GetDisplacementField() const
ImageBaseType::RegionType RegionType
typename OutputFieldType::IndexType IndexType
DirectionType m_BSplineDomainDirection
typename OutputFieldType::DirectionType DirectionType
typename InputPointSetType::PixelType PointDataType
Templated n-dimensional image class.
void SetPointSet(const InputPointSetType *points)
WeightsContainerType::Pointer m_PointWeights