LSSTApplications
12.1-5-gbdcc3ab+2,15.0+13,15.0+26,15.0-1-g19261fa+17,15.0-1-g60afb23+26,15.0-1-g615e0bb+18,15.0-1-g788a293+26,15.0-1-ga91101e+26,15.0-1-gae1598d+12,15.0-1-gd076f1f+24,15.0-1-gdf18595+5,15.0-1-gf4f1c34+12,15.0-11-g7db6e543+4,15.0-12-g3681e7a+4,15.0-15-gc15de322,15.0-16-g83b84f4,15.0-2-g100d730+19,15.0-2-g1f9c9cf+4,15.0-2-g8aea5f4+1,15.0-2-gf38729e+21,15.0-29-ga12a2b06e,15.0-3-g11fe1a0+14,15.0-3-g707930d+3,15.0-3-g9103c06+12,15.0-3-gd3cbb57+3,15.0-4-g2d82b59,15.0-4-g535e784+10,15.0-4-g92ca6c3+4,15.0-4-gf906033+2,15.0-5-g23e394c+14,15.0-5-g4be42a9,15.0-6-g69628aa,15.0-6-g86e3f3d+1,15.0-6-gfa9b38f+4,15.0-7-g949993c+3,15.0-8-g67a62d3+1,15.0-8-gcf05001+1,15.0-9-g1e7c341+1,w.2018.21
LSSTDataManagementBasePackage
|
An affine coordinate transformation consisting of a linear transformation and an offset. More...
#include <AffineTransform.h>
Public Types | |
enum | Parameters { XX = 0, YX = 1, XY = 2, YY = 3, X = 4, Y = 5 } |
typedef Eigen::Matrix3d | Matrix |
typedef Eigen::Matrix< double, 6, 1 > | ParameterVector |
typedef Eigen::Matrix< double, 2, 6 > | TransformDerivativeMatrix |
Public Member Functions | |
AffineTransform () | |
Construct an empty (identity) AffineTransform. More... | |
AffineTransform (Eigen::Matrix3d const &matrix) | |
Construct an AffineTransform from a 3x3 matrix. More... | |
AffineTransform (Eigen::Matrix2d const &linear) | |
Construct an AffineTransform with no translation from a 2x2 matrix. More... | |
AffineTransform (Eigen::Vector2d const &translation) | |
Construct a translation-only AffineTransform from a vector. More... | |
AffineTransform (Eigen::Matrix2d const &linear, Eigen::Vector2d const &translation) | |
Construct an AffineTransform from a 2x2 matrix and vector. More... | |
AffineTransform (LinearTransform const &linear) | |
Construct an AffineTransform from a LinearTransform. More... | |
AffineTransform (Extent2D const &translation) | |
Construct a translation-only AffineTransform from an Extent2D. More... | |
AffineTransform (LinearTransform const &linear, Extent2D const &translation) | |
Construct an AffineTransform from a LinearTransform and Extent2D. More... | |
AffineTransform (AffineTransform const &)=default | |
AffineTransform (AffineTransform &&)=default | |
~AffineTransform ()=default | |
AffineTransform const | invert () const |
Return the inverse transform. More... | |
bool | isIdentity () const |
Whether the transform is a no-op. More... | |
Point2D | operator() (Point2D const &p) const |
Transform a Point object. More... | |
Extent2D | operator() (Extent2D const &p) const |
Transform an Extent object. More... | |
Extent2D const & | getTranslation () const |
Extent2D & | getTranslation () |
LinearTransform const & | getLinear () const |
LinearTransform & | getLinear () |
Matrix const | getMatrix () const |
Return the transform as a full 3x3 matrix. More... | |
ParameterVector const | getParameterVector () const |
Return the transform matrix elements as a parameter vector. More... | |
void | setParameterVector (ParameterVector const &vector) |
Set the transform matrix elements from a parameter vector. More... | |
double & | operator[] (int i) |
double | operator[] (int i) const |
AffineTransform | operator* (AffineTransform const &other) const |
Construct a new AffineTransform from two others: (B * A)(p) = B(A(p)) More... | |
AffineTransform & | operator= (AffineTransform const &)=default |
AffineTransform & | operator= (AffineTransform &&)=default |
AffineTransform & | operator+= (AffineTransform const &other) |
AffineTransform | operator+ (AffineTransform const &other) |
AffineTransform & | operator-= (AffineTransform const &other) |
AffineTransform | operator- (AffineTransform const &other) |
TransformDerivativeMatrix | dTransform (Point2D const &input) const |
Take the derivative of (*this)(input) w.r.t the transform elements. More... | |
TransformDerivativeMatrix | dTransform (Extent2D const &input) const |
Take the derivative of (*this)(input) w.r.t the transform elements. More... | |
Static Public Member Functions | |
static AffineTransform | makeScaling (double s) |
Construct a new AffineTransform that represents a uniform scaling. More... | |
static AffineTransform | makeScaling (double s, double t) |
Construct a new AffineTransform that represents a non-uniform scaling. More... | |
static AffineTransform | makeRotation (Angle t) |
Construct a new AffineTransform that represents a CCW rotation in radians. More... | |
static AffineTransform | makeTranslation (Extent2D translation) |
Construct a new AffineTransform that represents a pure translation. More... | |
An affine coordinate transformation consisting of a linear transformation and an offset.
The transform is represented by a matrix \( \mathbf{M} \) such that
\[ \left[\begin{array}{ c } x_f \\ y_f \\ 1 \end{array}\right] = \mathbf{M} \left[\begin{array}{ c } x_i \\ y_i \\ 1 \end{array}\right] \]
where \((x_i,y_i)\) are the input coordinates and \((x_f,y_f)\) are the output coordinates.
If \( x_f(x_i,y_i) \) and \( y_f(x_i,y_i) \) are continuous differentiable functions, then
\[ \mathbf{M} = \left[\begin{array}{ c c c } \displaystyle\frac{\partial x_f}{\partial x_i} & \displaystyle\frac{\partial x_f}{\partial y_i} & x_f \\ \displaystyle\frac{\partial y_f}{\partial x_i} & \displaystyle\frac{\partial y_f}{\partial y_i} & y_f \\ \displaystyle 0 & \displaystyle 0 & \displaystyle 1 \end{array}\right] \]
evaluated at \((x_i,y_i)\).
The 2x2 upper left corner of \( \mathbf{M} \) is the linear part of the transform is simply the Jacobian of the mapping between \((x_i,y_i)\) and \((x_f,y_f)\).
Definition at line 77 of file AffineTransform.h.
typedef Eigen::Matrix3d lsst::afw::geom::AffineTransform::Matrix |
Definition at line 81 of file AffineTransform.h.
typedef Eigen::Matrix<double, 6, 1> lsst::afw::geom::AffineTransform::ParameterVector |
Definition at line 82 of file AffineTransform.h.
typedef Eigen::Matrix<double, 2, 6> lsst::afw::geom::AffineTransform::TransformDerivativeMatrix |
Definition at line 83 of file AffineTransform.h.
|
inline |
Construct an empty (identity) AffineTransform.
Definition at line 86 of file AffineTransform.h.
|
inlineexplicit |
Construct an AffineTransform from a 3x3 matrix.
Definition at line 89 of file AffineTransform.h.
|
inlineexplicit |
Construct an AffineTransform with no translation from a 2x2 matrix.
Definition at line 93 of file AffineTransform.h.
|
inlineexplicit |
Construct a translation-only AffineTransform from a vector.
Definition at line 96 of file AffineTransform.h.
|
inlineexplicit |
Construct an AffineTransform from a 2x2 matrix and vector.
Definition at line 99 of file AffineTransform.h.
|
inline |
Construct an AffineTransform from a LinearTransform.
Definition at line 103 of file AffineTransform.h.
|
inlineexplicit |
Construct a translation-only AffineTransform from an Extent2D.
Definition at line 106 of file AffineTransform.h.
|
inlineexplicit |
Construct an AffineTransform from a LinearTransform and Extent2D.
Definition at line 109 of file AffineTransform.h.
|
default |
|
default |
|
default |
AffineTransform::TransformDerivativeMatrix lsst::afw::geom::AffineTransform::dTransform | ( | Point2D const & | input | ) | const |
Take the derivative of (*this)(input) w.r.t the transform elements.
Definition at line 60 of file AffineTransform.cc.
AffineTransform::TransformDerivativeMatrix lsst::afw::geom::AffineTransform::dTransform | ( | Extent2D const & | input | ) | const |
Take the derivative of (*this)(input) w.r.t the transform elements.
Definition at line 68 of file AffineTransform.cc.
|
inline |
Definition at line 143 of file AffineTransform.h.
|
inline |
Definition at line 144 of file AffineTransform.h.
AffineTransform::Matrix const lsst::afw::geom::AffineTransform::getMatrix | ( | ) | const |
AffineTransform::ParameterVector const lsst::afw::geom::AffineTransform::getParameterVector | ( | ) | const |
Return the transform matrix elements as a parameter vector.
The elements will be ordered XX, YX, XY, YY, X, Y
Definition at line 34 of file AffineTransform.cc.
|
inline |
Definition at line 140 of file AffineTransform.h.
|
inline |
Definition at line 141 of file AffineTransform.h.
AffineTransform const lsst::afw::geom::AffineTransform::invert | ( | ) | const |
Return the inverse transform.
lsst::afw::geom::SingularTransformException | is not invertible |
Definition at line 55 of file AffineTransform.cc.
|
inline |
Whether the transform is a no-op.
Definition at line 124 of file AffineTransform.h.
|
inlinestatic |
Construct a new AffineTransform that represents a CCW rotation in radians.
Definition at line 244 of file AffineTransform.h.
|
inlinestatic |
Construct a new AffineTransform that represents a uniform scaling.
Definition at line 214 of file AffineTransform.h.
|
inlinestatic |
Construct a new AffineTransform that represents a non-uniform scaling.
Definition at line 229 of file AffineTransform.h.
|
inlinestatic |
Construct a new AffineTransform that represents a pure translation.
Definition at line 258 of file AffineTransform.h.
The result is affected by the translation parameters of the transform
Definition at line 131 of file AffineTransform.h.
The result is unaffected by the translation parameters of the transform
Definition at line 138 of file AffineTransform.h.
|
inline |
Construct a new AffineTransform from two others: (B * A)(p) = B(A(p))
Definition at line 170 of file AffineTransform.h.
|
inline |
Definition at line 184 of file AffineTransform.h.
|
inline |
Definition at line 178 of file AffineTransform.h.
|
inline |
Definition at line 196 of file AffineTransform.h.
|
inline |
Definition at line 190 of file AffineTransform.h.
|
default |
|
default |
|
inline |
Definition at line 164 of file AffineTransform.h.
|
inline |
Definition at line 165 of file AffineTransform.h.
void lsst::afw::geom::AffineTransform::setParameterVector | ( | AffineTransform::ParameterVector const & | vector | ) |
Set the transform matrix elements from a parameter vector.
The parameter vector is ordered XX, YX, XY, YY, X, Y
Definition at line 40 of file AffineTransform.cc.