18 #ifndef itkBSplineBaseTransform_h
19 #define itkBSplineBaseTransform_h
33 template<
typename TParametersValueType=double,
34 unsigned int NDimensions = 3,
35 unsigned int VSplineOrder = 3>
37 public Transform<TParametersValueType, NDimensions, NDimensions>
50 itkStaticConstMacro( SpaceDimension,
unsigned int, NDimensions );
53 itkStaticConstMacro( SplineOrder,
unsigned int, VSplineOrder );
112 void SetParameters(
const ParametersType & parameters ) ITK_OVERRIDE;
136 virtual void SetFixedParameters(
const FixedParametersType & parameters ) ITK_OVERRIDE = 0;
155 void SetParametersByValue(
const ParametersType & parameters ) ITK_OVERRIDE;
168 virtual const ParametersType & GetParameters() const ITK_OVERRIDE;
175 typedef
Image<ParametersValueType, itkGetStaticConstMacro( SpaceDimension )>
ImageType;
190 virtual
void SetCoefficientImages( const CoefficientImageArray & images ) = 0;
193 const CoefficientImageArray GetCoefficientImages()
const
195 return this->m_CoefficientImages;
210 virtual void UpdateTransformParameters(
const DerivativeType & update, TParametersValueType factor = 1.0 ) ITK_OVERRIDE;
226 itkGetStaticConstMacro( SpaceDimension ),
244 WeightsType & weights, ParameterIndexArrayType & indices,
bool & inside ) const = 0;
247 unsigned long GetNumberOfWeights()
const
249 return m_WeightsFunction->GetNumberOfWeights();
254 using Superclass::TransformVector;
257 itkExceptionMacro( <<
"Method not applicable for deformable transform." );
265 itkExceptionMacro( <<
"Method not applicable for deformable transform. " );
270 using Superclass::TransformCovariantVector;
274 itkExceptionMacro( <<
"Method not applicable for deformable transform. " );
279 void ComputeJacobianFromBSplineWeightsWithRespectToPosition(
280 const InputPointType &, WeightsType &, ParameterIndexArrayType & )
const;
282 virtual void ComputeJacobianWithRespectToParameters(
const InputPointType &, JacobianType & ) const ITK_OVERRIDE = 0;
286 itkExceptionMacro( <<
"ComputeJacobianWithRespectToPosition not yet implemented "
287 "for " << this->GetNameOfClass() );
291 virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE = 0;
294 virtual NumberOfParametersType GetNumberOfParametersPerDimension() const = 0;
298 return Self::BSpline;
301 unsigned int GetNumberOfAffectedWeights()
const;
311 return this->GetNumberOfParameters();
316 void PrintSelf( std::ostream & os,
Indent indent )
const ITK_OVERRIDE;
322 itkSetObjectMacro( WeightsFunction, WeightsFunctionType );
323 itkGetModifiableObjectMacro(WeightsFunction, WeightsFunctionType );
331 void SetFixedParametersFromTransformDomainInformation() const;
334 virtual
void SetFixedParametersGridSizeFromTransformDomainInformation() const = 0;
337 virtual
void SetFixedParametersGridOriginFromTransformDomainInformation() const = 0;
340 virtual
void SetFixedParametersGridSpacingFromTransformDomainInformation() const = 0;
343 virtual
void SetFixedParametersGridDirectionFromTransformDomainInformation() const = 0;
346 virtual
void SetCoefficientImageInformationFromFixedParameters() =0;
349 virtual
bool InsideValidRegion( ContinuousIndexType & ) const = 0;
371 typename WeightsFunctionType::
Pointer m_WeightsFunction;
380 #ifndef ITK_MANUAL_INSTANTIATION
381 #include "itkBSplineBaseTransform.hxx"
Light weight base class for most itk classes.
An image region represents a structured region of data.
Simulate a standard C array with copy semnatics.
A templated class holding a n-Dimensional vector.
ImageBaseType::PointType PointType
A templated class holding a point in n-Dimensional image space.
Control indentation during Print() invocation.
A templated class holding a geometric point in n-Dimensional space.
Returns the weights over the support region used for B-spline interpolation/reconstruction.
A templated class holding a n-Dimensional covariant vector.
Templated n-dimensional image class.