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>
61 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
72 using PixelType =
typename OutputFieldType::PixelType;
82 using RealType =
typename VectorType::RealValueType;
101 this->SetInput(0, field);
105 const InputFieldType *
108 return this->GetInput(0);
119 this->SetNthInput(1, const_cast<RealImageType *>(image));
124 this->SetConfidenceImage(image);
129 const RealImageType *
139 this->SetNthInput(2, const_cast<InputPointSetType *>(points));
144 this->SetPointSet(points);
149 const InputPointSetType *
157 SetPointSetConfidenceWeights(WeightsContainerType * weights);
160 const DisplacementFieldControlPointLatticeType *
163 return static_cast<const DisplacementFieldControlPointLatticeType *>(this->GetOutput(1));
168 SetBSplineDomainFromImage(RealImageType *);
174 this->SetBSplineDomainFromImage(const_cast<RealImageType *>(image));
179 SetBSplineDomainFromImage(InputFieldType *);
185 this->SetBSplineDomainFromImage(const_cast<InputFieldType *>(field));
192 itkGetConstMacro(BSplineDomainOrigin, OriginType);
195 itkGetConstMacro(BSplineDomainSpacing, SpacingType);
198 itkGetConstMacro(BSplineDomainSize,
SizeType);
204 itkSetMacro(UseInputFieldToDefineTheBSplineDomain,
bool);
205 itkGetConstMacro(UseInputFieldToDefineTheBSplineDomain,
bool);
206 itkBooleanMacro(UseInputFieldToDefineTheBSplineDomain);
211 itkSetMacro(SplineOrder,
unsigned int);
216 itkGetConstMacro(SplineOrder,
unsigned int);
225 itkSetMacro(NumberOfControlPoints, ArrayType);
234 itkGetConstMacro(NumberOfControlPoints, ArrayType);
242 itkSetMacro(NumberOfFittingLevels, ArrayType);
256 this->SetNumberOfFittingLevels(nlevels);
265 itkGetConstMacro(NumberOfFittingLevels, ArrayType);
270 itkBooleanMacro(EstimateInverse);
271 itkSetMacro(EstimateInverse,
bool);
272 itkGetConstMacro(EstimateInverse,
bool);
278 itkBooleanMacro(EnforceStationaryBoundary);
279 itkSetMacro(EnforceStationaryBoundary,
bool);
280 itkGetConstMacro(EnforceStationaryBoundary,
bool);
292 PrintSelf(std::ostream & os,
Indent indent)
const override;
296 GenerateData()
override;
299 bool m_EstimateInverse{
false };
300 bool m_EnforceStationaryBoundary{
true };
301 unsigned int m_SplineOrder{ 3 };
306 bool m_UsePointWeights{
false };
313 bool m_BSplineDomainIsDefined{
true };
314 bool m_UseInputFieldToDefineTheBSplineDomain{
false };
319 #ifndef ITK_MANUAL_INSTANTIATION
320 # include "itkDisplacementFieldToBSplineImageFilter.hxx"