18 #ifndef __itkScaleTransform_h
19 #define __itkScaleTransform_h
42 class TScalarType = float,
44 unsigned int NDimensions = 3>
65 itkStaticConstMacro(SpaceDimension,
unsigned int, NDimensions);
66 itkStaticConstMacro(ParametersDimension,
unsigned int, NDimensions);
124 virtual const ParametersType & GetFixedParameters(
void)
const;
127 virtual void ComputeJacobianWithRespectToParameters(
const InputPointType & point, JacobianType & j)
const;
133 virtual void ComputeJacobianWithRespectToPosition(
const InputPointType & x, JacobianType & jac)
const;
145 m_Scale = scale; this->ComputeMatrix(); this->Modified();
148 virtual void ComputeMatrix(
void);
151 void Compose(
const Self *other,
bool pre =
false);
156 void Scale(
const ScaleType & scale,
bool pre =
false);
162 OutputPointType TransformPoint(
const InputPointType & point)
const;
164 using Superclass::TransformVector;
165 OutputVectorType TransformVector(
const InputVectorType & vector)
const;
167 OutputVnlVectorType TransformVector(
const InputVnlVectorType & vector)
const;
169 using Superclass::TransformCovariantVector;
170 OutputCovariantVectorType TransformCovariantVector(
const InputCovariantVectorType & vector)
const;
176 inline InputPointType BackTransform(
const OutputPointType & point)
const;
178 inline InputVectorType BackTransform(
const OutputVectorType & vector)
const;
180 inline InputVnlVectorType BackTransform(
const OutputVnlVectorType & vector)
const;
182 inline InputCovariantVectorType BackTransform(
const OutputCovariantVectorType & vector)
const;
188 bool GetInverse(Self *inverse)
const;
191 virtual InverseTransformBasePointer GetInverseTransform()
const;
196 void SetIdentity(
void)
202 itkSetMacro(Center, InputPointType);
203 itkGetConstReferenceMacro(Center, InputPointType);
207 itkGetConstReferenceMacro(Scale, ScaleType);
214 virtual bool IsLinear()
const
227 void PrintSelf(std::ostream & os,
Indent indent)
const;
231 const Self & operator=(
const Self &);
240 template <
class ScalarType,
unsigned int NDimensions>
247 for(
unsigned int i = 0; i < SpaceDimension; i++ )
249 result[i] = ( point[i] + m_Center[i] ) / m_Scale[i] - m_Center[i];
255 template <
class ScalarType,
unsigned int NDimensions>
262 for(
unsigned int i = 0; i < SpaceDimension; i++ )
264 result[i] = vect[i] / m_Scale[i];
270 template <
class ScalarType,
unsigned int NDimensions>
277 for(
unsigned int i = 0; i < SpaceDimension; i++ )
279 result[i] = vect[i] / m_Scale[i];
285 template <
class ScalarType,
unsigned int NDimensions>
293 for(
unsigned int i = 0; i < SpaceDimension; i++ )
295 result[i] = vect[i] * m_Scale[i];
302 #ifndef ITK_MANUAL_INSTANTIATION
303 #include "itkScaleTransform.hxx"