|
lsst.afw
15.0-25-gacd707fca
|
A registry of 2-dimensional coordinate transforms for a specific camera. More...
#include <TransformMap.h>
Public Types | |
| using | Transforms = std::unordered_map< CameraSys, std::shared_ptr< geom::TransformPoint2ToPoint2 > > |
| using | CameraSysFrameIdMap = std::unordered_map< CameraSys, int > |
| using | CameraSysIterator = boost::transform_iterator< GetKey, CameraSysFrameIdMap::const_iterator > |
Public Member Functions | |
| TransformMap (CameraSys const &reference, std::unordered_map< CameraSys, std::shared_ptr< geom::TransformPoint2ToPoint2 >> const &transforms) | |
| Define a set of camera transforms. More... | |
| TransformMap (TransformMap const &other) | |
| Create a TransformMap supporting the same Transforms. More... | |
| TransformMap (TransformMap const &&other) | |
| Create a TransformMap supporting the same Transforms using move semantics. More... | |
| ~TransformMap () | |
| geom::Point2D | transform (geom::Point2D const &point, CameraSys const &fromSys, CameraSys const &toSys) const |
| Convert a point from one camera coordinate system to another. More... | |
| std::vector< geom::Point2D > | transform (std::vector< geom::Point2D > const &pointList, CameraSys const &fromSys, CameraSys const &toSys) const |
| Convert a list of points from one coordinate system to another. More... | |
| CameraSysIterator | begin () const |
| CameraSysIterator | end () const |
| bool | contains (CameraSys const &system) const noexcept |
| Can this transform to and from the specified coordinate system? More... | |
| std::shared_ptr< geom::TransformPoint2ToPoint2 > | getTransform (CameraSys const &fromSys, CameraSys const &toSys) const |
| Get a Transform from one camera coordinate system to another. More... | |
| size_t | size () const noexcept |
| Get the number of supported coordinate systems. More... | |
| TransformMap & | operator= (TransformMap const &)=delete |
| TransformMap & | operator= (TransformMap &&)=delete |
A registry of 2-dimensional coordinate transforms for a specific camera.
Represents the interrelationships between camera coordinate systems for a particular camera. It can be seen as a mapping between a pair of CameraSys and a Transform between them (though it does not conform to either the C++ map or Python dictionary APIs).
TransformMap supports:
Definition at line 57 of file TransformMap.h.
Definition at line 66 of file TransformMap.h.
| using lsst::afw::cameraGeom::TransformMap::CameraSysIterator = boost::transform_iterator<GetKey, CameraSysFrameIdMap::const_iterator> |
Definition at line 67 of file TransformMap.h.
| using lsst::afw::cameraGeom::TransformMap::Transforms = std::unordered_map<CameraSys, std::shared_ptr<geom::TransformPoint2ToPoint2> > |
Definition at line 65 of file TransformMap.h.
| lsst::afw::cameraGeom::TransformMap::TransformMap | ( | CameraSys const & | reference, |
| std::unordered_map< CameraSys, std::shared_ptr< geom::TransformPoint2ToPoint2 >> const & | transforms | ||
| ) |
Define a set of camera transforms.
| reference | Coordinate system from which each Transform in transforms converts. |
| transforms | A map whose keys are camera coordinate systems, and whose values point to Transforms that convert from reference to the corresponding key. All Transforms must be invertible. |
| lsst::pex::exceptions::InvalidParameterError | Thrown if transforms contains the reference camera system as a key, or if any Transform is not invertible. |
Definition at line 115 of file TransformMap.cc.
|
default |
Create a TransformMap supporting the same Transforms.
| other | The map to copy. |
| lsst::afw::cameraGeom::TransformMap::TransformMap | ( | TransformMap const && | other | ) |
Create a TransformMap supporting the same Transforms using move semantics.
| other | The map to move from. It shall be left unchanged, as required by immutability. |
Definition at line 124 of file TransformMap.cc.
|
default |
|
inline |
Definition at line 128 of file TransformMap.h.
|
noexcept |
Can this transform to and from the specified coordinate system?
| system | The coordinate system to search for |
true if system is supported, false otherwiseDefinition at line 141 of file TransformMap.cc.
|
inline |
Definition at line 130 of file TransformMap.h.
| std::shared_ptr< geom::TransformPoint2ToPoint2 > lsst::afw::cameraGeom::TransformMap::getTransform | ( | CameraSys const & | fromSys, |
| CameraSys const & | toSys | ||
| ) | const |
Get a Transform from one camera coordinate system to another.
| fromSys,toSys | Camera coordinate systems between which to transform |
fromSys to toSys in the forward direction. The Transform will be invertible.| lsst::pex::exceptions::InvalidParameterError | Thrown if either fromSys or toSys is not supported. |
Definition at line 143 of file TransformMap.cc.
|
delete |
TransformMap is immutable.
|
delete |
TransformMap is immutable.
|
noexcept |
Get the number of supported coordinate systems.
Definition at line 163 of file TransformMap.cc.
| geom::Point2D lsst::afw::cameraGeom::TransformMap::transform | ( | geom::Point2D const & | point, |
| CameraSys const & | fromSys, | ||
| CameraSys const & | toSys | ||
| ) | const |
Convert a point from one camera coordinate system to another.
| point | Point from which to transform |
| fromSys,toSys | Camera coordinate systems between which to transform |
getTransform(fromSys, toSys).applyForward(point).| lsst::pex::exceptions::InvalidParameterError | Thrown if either fromSys or toSys is not supported. |
Definition at line 129 of file TransformMap.cc.
| std::vector< geom::Point2D > lsst::afw::cameraGeom::TransformMap::transform | ( | std::vector< geom::Point2D > const & | pointList, |
| CameraSys const & | fromSys, | ||
| CameraSys const & | toSys | ||
| ) | const |
Convert a list of points from one coordinate system to another.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 135 of file TransformMap.cc.
1.8.13