18 #ifndef sitkDisplacementFieldTransform_h
19 #define sitkDisplacementFieldTransform_h
66 std::string
GetName()
const override {
return std::string (
"DisplacementFieldTransform"); }
80 SITK_RETURN_SELF_TYPE_HEADER SetDisplacementField(
Image &);
85 Image GetDisplacementField()
const;
90 SITK_RETURN_SELF_TYPE_HEADER SetInverseDisplacementField(
Image &);
95 Image GetInverseDisplacementField()
const;
101 SITK_RETURN_SELF_TYPE_HEADER SetSmoothingOff();
102 SITK_RETURN_SELF_TYPE_HEADER SetSmoothingGaussianOnUpdate(
double varianceForUpdateField=1.75,
double varianceForTotalField=0.5 );
103 SITK_RETURN_SELF_TYPE_HEADER SetSmoothingBSplineOnUpdate(
const std::vector<unsigned int> &numberOfControlPointsForUpdateField = std::vector<unsigned int>(3,4),
104 const std::vector<unsigned int> &numberOfControlPointsForTotalField = std::vector<unsigned int>(3,4),
105 bool enforceStationaryBoundary=
true,
106 unsigned int order=3 );
111 void SetPimpleTransform( PimpleTransformBase *pimpleTransform )
override;
119 template<
typename TransformType >
120 void operator() ( )
const
122 TransformType *t =
dynamic_cast<TransformType*
>(transform);
123 if (t && (
typeid(*t) ==
typeid(TransformType)))
132 template <
typename TransformType>
133 void InternalInitialization(TransformType *transform);
135 template<
typename TDisplacementFieldTransform >
136 static Image InternalGetDisplacementField(
const TDisplacementFieldTransform *itkDisplacementTx );
137 template<
typename TDisplacementFieldTransform >
138 static Image InternalGetInverseDisplacementField(
const TDisplacementFieldTransform *itkDisplacementTx );
140 template<
typename TDisplacementFieldTransform >
141 void InternalSetSmoothingOff(TDisplacementFieldTransform *itkDisplacement);
142 template<
typename TDisplacementFieldTransform >
143 void InternalSetSmoothingGaussianOnUpdate( TDisplacementFieldTransform *itkDisplacement,
144 double varianceForUpdateField,
145 double varianceForTotalField );
146 template<
typename TDisplacementFieldTransform >
147 void InternalSetSmoothingBSplineOnUpdate( TDisplacementFieldTransform *itkDisplacement,
148 const std::vector<unsigned int> &numberOfControlPointsForUpdateField,
149 const std::vector<unsigned int> &numberOfControlPointsForTotalField,
150 bool enforceStationaryBoundary,
151 unsigned int order );
154 static PimpleTransformBase *CreateDisplacementFieldPimpleTransform(
unsigned int dimension);
174 #endif // sitkDisplacementFieldTransform_h