lsst.afw
tickets.DM-23835-g31c64b24f1
|
Go to the documentation of this file.
25 #ifndef LSST_AFW_GEOM_ELLIPSES_BaseCore_h_INCLUDED
26 #define LSST_AFW_GEOM_ELLIPSES_BaseCore_h_INCLUDED
60 template <
typename Output>
91 void grow(
double buffer);
94 void scale(
double factor);
183 template <
typename Output>
184 Converter<Output>
as()
const;
195 template <
typename T>
217 virtual void _assignToAxes(
double&
a,
double&
b,
double& theta)
const = 0;
227 template <
typename Output>
228 struct BaseCore::Converter {
233 operator Output()
const {
return Output(
input); }
237 template <
typename Output>
246 #endif // !LSST_AFW_GEOM_ELLIPSES_BaseCore_h_INCLUDED
Converter< Output > as() const
Convert this to the core type specified as a template parameter.
virtual void _assignToQuadrupole(double &ixx, double &iyy, double &ixy) const =0
Return the size of the bounding box for the ellipse core.
const GridTransform getGridTransform() const
Return the transform that maps the ellipse to the unit circle.
std::shared_ptr< Output > copy() const
BaseCore()=default
Return the size of the bounding box for the ellipse core.
virtual void writeParameters(double *iter) const =0
Return the size of the bounding box for the ellipse core.
double getArea() const
Return the area of the ellipse core.
static Jacobian _dAssignAxesToQuadrupole(double a, double b, double theta, double &ixx, double &iyy, double &ixy)
Return the size of the bounding box for the ellipse core.
static std::shared_ptr< BaseCore > make(std::string const &name)
void grow(double buffer)
Increase the major and minor radii of the ellipse core by the given buffer.
lsst::geom::Extent2D computeDimensions() const
Return the size of the bounding box for the ellipse core.
const ParameterVector getParameterVector() const
Return the core parameters as a vector.
double getDeterminantRadius() const
Return the radius defined as the 4th root of the determinant of the quadrupole matrix.
virtual std::shared_ptr< BaseCore > _clone() const =0
Return the size of the bounding box for the ellipse core.
virtual void normalize()=0
Put the parameters into a "standard form", and throw InvalidParameterError if they cannot be normaliz...
bool operator==(BaseCore const &other) const
Compare two ellipse cores for equality.
virtual void _assignToAxes(double &a, double &b, double &theta) const =0
Return the size of the bounding box for the ellipse core.
void setParameterVector(ParameterVector const &vector)
Set the core parameters from a vector.
virtual ~BaseCore()=default
Return the size of the bounding box for the ellipse core.
A base class for parametrizations of the "core" of an ellipse - the ellipticity and size.
static Jacobian _dAssignQuadrupoleToAxes(double ixx, double iyy, double ixy, double &a, double &b, double &theta)
Return the size of the bounding box for the ellipse core.
virtual void readParameters(double const *iter)=0
Return the size of the bounding box for the ellipse core.
virtual void _assignFromQuadrupole(double ixx, double iyy, double ixy)=0
Return the size of the bounding box for the ellipse core.
Eigen::Vector3d ParameterVector
Parameter vector type.
Convolution convolve(BaseCore const &other)
Return the size of the bounding box for the ellipse core.
virtual Jacobian _dAssignToQuadrupole(double &ixx, double &iyy, double &ixy) const =0
Return the size of the bounding box for the ellipse core.
Jacobian dAssign(BaseCore const &other)
Assign other to this and return the derivative of the conversion, d(this)/d(other).
double getTraceRadius() const
Return the radius defined as the square root of one half the trace of the quadrupole matrix.
A functor that returns points on the boundary of the ellipse as a function of a parameter that runs b...
static void registerSubclass(std::shared_ptr< BaseCore > const &example)
Return the size of the bounding box for the ellipse core.
A base class for image defects.
virtual Jacobian _dAssignFromQuadrupole(double ixx, double iyy, double ixy)=0
Return the size of the bounding box for the ellipse core.
Eigen::Matrix3d Jacobian
Parameter Jacobian matrix type.
Converter(BaseCore const &input_)
virtual Jacobian _dAssignToAxes(double &a, double &b, double &theta) const =0
Return the size of the bounding box for the ellipse core.
static void _assignAxesToQuadrupole(double a, double b, double theta, double &ixx, double &iyy, double &ixy)
Return the size of the bounding box for the ellipse core.
virtual std::string getName() const =0
Return a string that identifies this parametrization.
Transformer transform(lsst::geom::LinearTransform const &transform)
Return the transform that maps the ellipse to the unit circle.
const ItemVariant * other
bool operator!=(BaseCore const &other) const
Compare two ellipse cores for inequality.
BaseCore & operator=(BaseCore const &other)
Set the parameters of this ellipse core from another.
std::shared_ptr< BaseCore > clone() const
Deep-copy the Core.
virtual Jacobian _dAssignFromAxes(double a, double b, double theta)=0
Return the size of the bounding box for the ellipse core.
virtual void _assignFromAxes(double a, double b, double theta)=0
Return the size of the bounding box for the ellipse core.
void scale(double factor)
Scale the size of the ellipse core by the given factor.
static void _assignQuadrupoleToAxes(double ixx, double iyy, double ixy, double &a, double &b, double &theta)
Return the size of the bounding box for the ellipse core.
A temporary-only expression object for ellipse core convolution.