LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
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 () noexcept | |
Construct an empty (identity) AffineTransform. More... | |
AffineTransform (Eigen::Matrix3d const &matrix) noexcept | |
Construct an AffineTransform from a 3x3 matrix. More... | |
AffineTransform (Eigen::Matrix2d const &linear) noexcept | |
Construct an AffineTransform with no translation from a 2x2 matrix. More... | |
AffineTransform (Eigen::Vector2d const &translation) noexcept | |
Construct a translation-only AffineTransform from a vector. More... | |
AffineTransform (Eigen::Matrix2d const &linear, Eigen::Vector2d const &translation) noexcept | |
Construct an AffineTransform from a 2x2 matrix and vector. More... | |
AffineTransform (LinearTransform const &linear) noexcept | |
Construct an AffineTransform from a LinearTransform. More... | |
AffineTransform (Extent2D const &translation) noexcept | |
Construct a translation-only AffineTransform from an Extent2D. More... | |
AffineTransform (LinearTransform const &linear, Extent2D const &translation) noexcept | |
Construct an AffineTransform from a LinearTransform and Extent2D. More... | |
AffineTransform (AffineTransform const &) noexcept=default | |
AffineTransform (AffineTransform &&) noexcept=default | |
~AffineTransform () noexcept=default | |
AffineTransform const | inverted () const |
Return the inverse transform. More... | |
bool | isIdentity () const noexcept |
Whether the transform is a no-op. More... | |
Point2D | operator() (Point2D const &p) const noexcept |
Transform a Point object. More... | |
Extent2D | operator() (Extent2D const &p) const noexcept |
Transform an Extent object. More... | |
double | applyX (double x, double y) const noexcept |
Transform a point given and returned as separate double values. More... | |
double | applyY (double x, double y) const noexcept |
Extent2D const & | getTranslation () const noexcept |
Extent2D & | getTranslation () noexcept |
LinearTransform const & | getLinear () const noexcept |
LinearTransform & | getLinear () noexcept |
Matrix const | getMatrix () const noexcept |
Return the transform as a full 3x3 matrix. More... | |
ParameterVector const | getParameterVector () const noexcept |
Return the transform matrix elements as a parameter vector. More... | |
void | setParameterVector (ParameterVector const &vector) noexcept |
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 noexcept |
Construct a new AffineTransform from two others: (B * A)(p) = B(A(p)) More... | |
AffineTransform & | operator= (AffineTransform const &) noexcept=default |
AffineTransform & | operator= (AffineTransform &&) noexcept=default |
AffineTransform & | operator+= (AffineTransform const &other) noexcept |
AffineTransform | operator+ (AffineTransform const &other) noexcept |
AffineTransform & | operator-= (AffineTransform const &other) noexcept |
AffineTransform | operator- (AffineTransform const &other) noexcept |
TransformDerivativeMatrix | dTransform (Point2D const &input) const noexcept |
Take the derivative of (*this)(input) w.r.t the transform elements. More... | |
TransformDerivativeMatrix | dTransform (Extent2D const &input) const noexcept |
Take the derivative of (*this)(input) w.r.t the transform elements. More... | |
Static Public Member Functions | |
static AffineTransform | makeScaling (double s) noexcept |
Construct a new AffineTransform that represents a uniform scaling. More... | |
static AffineTransform | makeScaling (double s, double t) noexcept |
Construct a new AffineTransform that represents a non-uniform scaling. More... | |
static AffineTransform | makeRotation (Angle t) noexcept |
Construct a new AffineTransform that represents a CCW rotation in radians. More... | |
static AffineTransform | makeTranslation (Extent2D translation) noexcept |
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 75 of file AffineTransform.h.
typedef Eigen::Matrix3d lsst::geom::AffineTransform::Matrix |
Definition at line 79 of file AffineTransform.h.
typedef Eigen::Matrix<double, 6, 1> lsst::geom::AffineTransform::ParameterVector |
Definition at line 80 of file AffineTransform.h.
typedef Eigen::Matrix<double, 2, 6> lsst::geom::AffineTransform::TransformDerivativeMatrix |
Definition at line 81 of file AffineTransform.h.
|
inlinenoexcept |
Construct an empty (identity) AffineTransform.
Definition at line 84 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct an AffineTransform from a 3x3 matrix.
Definition at line 87 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct an AffineTransform with no translation from a 2x2 matrix.
Definition at line 91 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct a translation-only AffineTransform from a vector.
Definition at line 94 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct an AffineTransform from a 2x2 matrix and vector.
Definition at line 98 of file AffineTransform.h.
|
inlinenoexcept |
Construct an AffineTransform from a LinearTransform.
Definition at line 102 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct a translation-only AffineTransform from an Extent2D.
Definition at line 105 of file AffineTransform.h.
|
inlineexplicitnoexcept |
Construct an AffineTransform from a LinearTransform and Extent2D.
Definition at line 108 of file AffineTransform.h.
|
defaultnoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
Transform a point given and returned as separate double values.
This interface is intended primarily for use in Python (where it is vectorized to support NumPy array arguments).
Definition at line 148 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 149 of file AffineTransform.h.
|
noexcept |
Take the derivative of (*this)(input) w.r.t the transform elements.
Definition at line 66 of file AffineTransform.cc.
|
noexcept |
Take the derivative of (*this)(input) w.r.t the transform elements.
Definition at line 58 of file AffineTransform.cc.
|
inlinenoexcept |
Definition at line 155 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 156 of file AffineTransform.h.
|
noexcept |
|
noexcept |
Return the transform matrix elements as a parameter vector.
The elements will be ordered XX, YX, XY, YY, X, Y
Definition at line 32 of file AffineTransform.cc.
|
inlinenoexcept |
Definition at line 152 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 153 of file AffineTransform.h.
AffineTransform const lsst::geom::AffineTransform::inverted | ( | ) | const |
Return the inverse transform.
lsst::geom::SingularTransformException | if not invertible |
Definition at line 53 of file AffineTransform.cc.
|
inlinenoexcept |
Whether the transform is a no-op.
Definition at line 125 of file AffineTransform.h.
|
inlinestaticnoexcept |
Construct a new AffineTransform that represents a CCW rotation in radians.
Definition at line 258 of file AffineTransform.h.
|
inlinestaticnoexcept |
Construct a new AffineTransform that represents a uniform scaling.
Definition at line 226 of file AffineTransform.h.
|
inlinestaticnoexcept |
Construct a new AffineTransform that represents a non-uniform scaling.
Definition at line 243 of file AffineTransform.h.
|
inlinestaticnoexcept |
Construct a new AffineTransform that represents a pure translation.
Definition at line 274 of file AffineTransform.h.
Transform an Extent object.
The result is unaffected by the translation parameters of the transform
Definition at line 139 of file AffineTransform.h.
Transform a Point object.
The result is affected by the translation parameters of the transform
Definition at line 132 of file AffineTransform.h.
|
inlinenoexcept |
Construct a new AffineTransform from two others: (B * A)(p) = B(A(p))
Definition at line 182 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 196 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 190 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 208 of file AffineTransform.h.
|
inlinenoexcept |
Definition at line 202 of file AffineTransform.h.
|
defaultnoexcept |
|
defaultnoexcept |
|
inline |
Definition at line 176 of file AffineTransform.h.
|
inline |
Definition at line 177 of file AffineTransform.h.
|
noexcept |
Set the transform matrix elements from a parameter vector.
The parameter vector is ordered XX, YX, XY, YY, X, Y
Definition at line 38 of file AffineTransform.cc.