27 namespace cameraGeom {
31 : _fpPosition(fpPosition), _refPoint(refPoint), _yaw(yaw), _pitch(pitch), _roll(roll), _rotMat() {
44 _rotMat << cosYaw * cosPitch, cosYaw * sinPitch * sinRoll - cosRoll * sinYaw, cosPitch * sinYaw,
45 cosYaw * cosRoll + sinYaw * sinPitch * sinRoll;
66 Eigen::Matrix2d jacobian =
67 _rotMat.array() * (Eigen::Vector2d::Ones() * pixelSizeMm.
asEigen().transpose()).array();
69 Eigen::Vector2d refMm = pixelSizeMm.
asEigen().array() * _refPoint.
asEigen().array();
70 Eigen::Vector2d translation = _fpPosition.
asEigen() - (_rotMat * refMm);
Orientation(geom::Point2D const fpPosition=geom::Point2D(0, 0), geom::Point2D const refPoint=geom::Point2D(-0.5, -0.5), geom::Angle const yaw=geom::Angle(0), geom::Angle const pitch=geom::Angle(0), geom::Angle const roll=geom::Angle(0))
std::shared_ptr< geom::TransformPoint2ToPoint2 > makeFpPixelTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from focal plane to pixel coordinates.
Describe a detector's orientation in the focal plane.
int getNQuarter() const
Return the number of quarter turns (rounded to the closest quarter)
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
A class representing an angle.
A base class for image defects.
std::shared_ptr< geom::TransformPoint2ToPoint2 > makePixelFpTransform(geom::Extent2D const pixelSizeMm) const
Generate a Transform from pixel to focal plane coordinates.
std::shared_ptr< TransformPoint2ToPoint2 > makeTransform(AffineTransform const &affine)
Wrap an AffineTransform as a Transform.
Orientation & operator=(Orientation const &)
constexpr double asDegrees() const noexcept
Return an Angle's value in degrees.