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);
253 auto nlevels = MakeFilled<ArrayType>(n);
254 this->SetNumberOfFittingLevels(nlevels);
264 itkGetConstMacro(NumberOfFittingLevels, ArrayType);
269 itkBooleanMacro(EstimateInverse);
270 itkSetMacro(EstimateInverse,
bool);
271 itkGetConstMacro(EstimateInverse,
bool);
277 itkBooleanMacro(EnforceStationaryBoundary);
278 itkSetMacro(EnforceStationaryBoundary,
bool);
279 itkGetConstMacro(EnforceStationaryBoundary,
bool);
291 PrintSelf(std::ostream & os,
Indent indent)
const override;
295 GenerateData()
override;
298 bool m_EstimateInverse{
false };
299 bool m_EnforceStationaryBoundary{
true };
300 unsigned int m_SplineOrder{ 3 };
305 bool m_UsePointWeights{
false };
312 bool m_BSplineDomainIsDefined{
true };
313 bool m_UseInputFieldToDefineTheBSplineDomain{
false };
318 #ifndef ITK_MANUAL_INSTANTIATION
319 # include "itkDisplacementFieldToBSplineImageFilter.hxx"