18 #ifndef sitkAffineTransform_h
19 #define sitkAffineTransform_h
47 const std::vector< double> &translation,
48 const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0));
54 std::string
GetName()
const {
return std::string (
"AffineTransform"); }
57 std::vector<double> GetTranslation( )
const;
58 SITK_RETURN_SELF_TYPE_HEADER SetTranslation(
const std::vector<double>& translation);
60 SITK_RETURN_SELF_TYPE_HEADER SetMatrix(
const std::vector<double> &matrix);
61 std::vector<double> GetMatrix()
const;
64 SITK_RETURN_SELF_TYPE_HEADER SetCenter(
const std::vector<double> ¶ms);
65 std::vector<double> GetCenter( )
const;
68 SITK_RETURN_SELF_TYPE_HEADER Scale(
const std::vector<double> & factor,
bool pre=
false);
69 SITK_RETURN_SELF_TYPE_HEADER Scale(
double factor,
bool pre=
false);
71 SITK_RETURN_SELF_TYPE_HEADER Shear(
int axis1,
int axis2,
double coef,
bool pre=
false);
73 SITK_RETURN_SELF_TYPE_HEADER Translate(
const std::vector<double> &offset,
bool pre=
false);
75 SITK_RETURN_SELF_TYPE_HEADER Rotate(
int axis1,
int axis2,
double angle,
bool pre=
false);
79 virtual void SetPimpleTransform( PimpleTransformBase *pimpleTransform );
83 using Superclass::AddTransform;
89 template<
typename TransformType >
90 void operator() (
void )
const
92 TransformType *t =
dynamic_cast<TransformType*
>(transform);
93 if (t && (
typeid(*t)==
typeid(TransformType)))
102 template <
typename TransformType>
103 void InternalInitialization(TransformType *transform);
106 nsstd::function<void(const std::vector<double>&)> m_pfSetCenter;
107 nsstd::function<std::vector<double>()> m_pfGetCenter;
108 nsstd::function<void(const std::vector<double>&)> m_pfSetMatrix;
109 nsstd::function<std::vector<double>()> m_pfGetMatrix;
110 nsstd::function<void(const std::vector<double>&)> m_pfSetTranslation;
111 nsstd::function<std::vector<double>()> m_pfGetTranslation;
113 nsstd::function<void(const std::vector<double> &, bool)> m_pfScale1;
115 nsstd::function<void(int, int, double, bool)>
m_pfShear;
116 nsstd::function<void(const std::vector<double> &, bool)> m_pfTranslate;
124 #endif // sitkAffineTransform_h
#define SITKCommon_EXPORT