18 #ifndef sitkAffineTransform_h
19 #define sitkAffineTransform_h
51 const std::vector< double> &translation,
52 const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0));
58 std::string
GetName()
const {
return std::string (
"AffineTransform"); }
61 std::vector<double> GetTranslation( )
const;
62 SITK_RETURN_SELF_TYPE_HEADER SetTranslation(
const std::vector<double>& translation);
64 SITK_RETURN_SELF_TYPE_HEADER SetMatrix(
const std::vector<double> &matrix);
65 std::vector<double> GetMatrix()
const;
68 SITK_RETURN_SELF_TYPE_HEADER SetCenter(
const std::vector<double> ¶ms);
69 std::vector<double> GetCenter( )
const;
72 SITK_RETURN_SELF_TYPE_HEADER Scale(
const std::vector<double> & factor,
bool pre=
false);
73 SITK_RETURN_SELF_TYPE_HEADER Scale(
double factor,
bool pre=
false);
75 SITK_RETURN_SELF_TYPE_HEADER Shear(
int axis1,
int axis2,
double coef,
bool pre=
false);
77 SITK_RETURN_SELF_TYPE_HEADER Translate(
const std::vector<double> &offset,
bool pre=
false);
79 SITK_RETURN_SELF_TYPE_HEADER Rotate(
int axis1,
int axis2,
double angle,
bool pre=
false);
83 virtual void SetPimpleTransform( PimpleTransformBase *pimpleTransform );
87 using Superclass::AddTransform;
93 template<
typename TransformType >
94 void operator() (
void )
const
96 TransformType *t =
dynamic_cast<TransformType*
>(transform);
97 if (t && (
typeid(*t) ==
typeid(TransformType)))
106 template <
typename TransformType>
107 void InternalInitialization(TransformType *transform);
110 nsstd::function<void(const std::vector<double>&)> m_pfSetCenter;
111 nsstd::function<std::vector<double>()> m_pfGetCenter;
112 nsstd::function<void(const std::vector<double>&)> m_pfSetMatrix;
113 nsstd::function<std::vector<double>()> m_pfGetMatrix;
114 nsstd::function<void(const std::vector<double>&)> m_pfSetTranslation;
115 nsstd::function<std::vector<double>()> m_pfGetTranslation;
117 nsstd::function<void(const std::vector<double> &, bool)> m_pfScale1;
119 nsstd::function<void(int, int, double, bool)>
m_pfShear;
120 nsstd::function<void(const std::vector<double> &, bool)> m_pfTranslate;
128 #endif // sitkAffineTransform_h
#define SITKCommon_EXPORT