24 #ifndef LSST_AFW_GEOM_ENDPOINT_H 25 #define LSST_AFW_GEOM_ENDPOINT_H 66 template <
typename Po
intT,
typename ArrayT>
177 int _getNAxes(ndarray::Array<double, 2, 2>
const &data)
const {
return data.getSize<0>(); }
179 int _getNAxes(ndarray::Array<double, 1, 1>
const &data)
const {
return data.getSize<0>(); }
183 int _getNPoints(ndarray::Array<double, 2, 2>
const &data)
const {
return data.getSize<1>(); }
194 template <
typename Po
intT>
virtual bool operator==(BaseEndpoint const &other) const noexcept
Determine whether two endpoints represent the same conversion.
static std::string getClassPrefix()
Get the class name prefix, e.g. "Point2" for "Point2Endpoint".
int _getNPoints(ndarray::Array< double, 2, 2 > const &data) const
Point2Endpoint()
Construct a Point2Endpoint.
virtual void normalizeFrame(std::shared_ptr< ast::Frame > framePtr) const
Adjust and check the frame as needed.
std::ostream & operator<<(std::ostream &os, GenericEndpoint const &endpoint)
Print "GenericEndpoint(_n_)" to the ostream where _n_ is the number of axes, e.g. "GenericAxes(4)"...
Base class for endpoints with Array = std::vector<Point> where Point has 2 dimensions.
virtual Point pointFromData(std::vector< double > const &data) const =0
Get a single point from raw data.
ItemVariant const * other
virtual Array arrayFromData(ndarray::Array< double, 2, 2 > const &data) const =0
Get an array of points from raw data.
void _assertNAxes(int nAxes) const
BaseVectorEndpoint(int nAxes)
Construct a BaseVectorEndpoint.
int _getNAxes(ndarray::Array< double, 1, 1 > const &data) const
virtual int getNPoints(Array const &arr) const =0
Return the number of points in an array.
virtual std::vector< double > dataFromPoint(Point const &point) const =0
Get raw data from a single point.
A base class for image defects.
static std::string getClassPrefix()
Get the class name prefix, e.g. "Point2" for "Point2Endpoint".
A generic endpoint for data in the format used by ast::Mapping.
virtual ~BaseEndpoint()=default
int getNPoints(Array const &arr) const override
Return the number of points in an array.
An endpoint for lsst::geom::SpherePoint.
virtual ndarray::Array< double, 2, 2 > dataFromArray(Array const &arr) const =0
Get raw data from an array of points.
SpherePointEndpoint()
Construct a SpherePointEndpoint.
bool operator!=(BaseEndpoint const &other) const noexcept
Determine whether two endpoints do not represent the same conversion.
int _getNAxes(ndarray::Array< double, 2, 2 > const &data) const
virtual std::shared_ptr< ast::Frame > makeFrame() const
Create a Frame that can be used with this end point in a Transform.
Point in an unspecified spherical coordinate system.
static std::string getClassPrefix()
Get the class name prefix, e.g. "Point2" for "Point2Endpoint".
An endpoint for lsst::geom::Point2D.
int _getNAxes(std::vector< double > const &data) const
BaseEndpoint(BaseEndpoint const &)=default
GenericEndpoint(int nAxes)
Construct a GenericEndpoint with the specified number of axes.
Virtual base class for endpoints, which are helper classes for Transform.
BaseEndpoint & operator=(BaseEndpoint const &)=delete