lsst.afw  14.0-56-gfbf220870
Classes | Public Types | Public Member Functions | List of all members
lsst::afw::geom::ellipses::Ellipse Class Reference

An ellipse defined by an arbitrary BaseCore and a center point. More...

#include <Ellipse.h>

Classes

class  GridTransform
 A temporary-only expression object representing an AffineTransform that maps the Ellipse to a unit circle at the origin. More...
 
class  Transformer
 A temporary-only expression object for ellipse transformations. More...
 

Public Types

enum  ParameterEnum { X = 3, Y = 4 }
 
typedef Eigen::Matrix< double, 5, 1 > ParameterVector
 Proxy return type for Ellipse::convolve(). More...
 

Public Member Functions

Point2D const & getCenter () const
 Return the center point. More...
 
Point2D & getCenter ()
 Return the center point. More...
 
void setCenter (Point2D const &center)
 Set the center point. More...
 
BaseCore const & getCore () const
 Return the ellipse core. More...
 
BaseCore & getCore ()
 Return the ellipse core. More...
 
std::shared_ptr< BaseCore const > getCorePtr () const
 Return the ellipse core. More...
 
std::shared_ptr< BaseCore > getCorePtr ()
 Return the ellipse core. More...
 
void setCore (BaseCore const &core)
 Set the ellipse core; the type of the core is not changed. More...
 
void normalize ()
 Put the parameters in a standard form. More...
 
void grow (double buffer)
 Increase the major and minor radii of the ellipse by the given buffer. More...
 
void scale (double factor)
 Scale the size of the ellipse by the given factor. More...
 
void shift (Extent2D const &offset)
 Move the ellipse center by the given offset. More...
 
ParameterVector const getParameterVector () const
 Return the ellipse parameters as a vector. More...
 
void setParameterVector (ParameterVector const &vector)
 Set the ellipse parameters from a vector. More...
 
void readParameters (double const *iter)
 
void writeParameters (double *iter) const
 
GridTransform const getGridTransform () const
 Return the transform that maps the ellipse to the unit circle. More...
 
Box2D computeBBox () const
 Return the bounding box of the ellipse. More...
 
Ellipse & operator= (Ellipse const &other)
 Set the parameters of this ellipse from another. More...
 
Ellipse & operator= (Ellipse &&other)
 
bool operator== (Ellipse const &other) const
 Compare two ellipses for equality. More...
 
bool operator!= (Ellipse const &other) const
 Compare two ellipses for inequality. More...
 
virtual ~Ellipse ()=default
 
 Ellipse (BaseCore const &core, Point2D const &center=Point2D())
 
 Ellipse (std::shared_ptr< BaseCore const > const &core, Point2D const &center=Point2D())
 
 Ellipse (Transformer const &other)
 
 Ellipse (Convolution const &other)
 
 Ellipse (Ellipse const &other)
 
 Ellipse (Ellipse &&other)
 
Coordinate transforms

These member functions transform the ellipse by the given AffineTransform.

The transform can be done in-place by calling inPlace() on the returned expression object, or returned as a new shared_ptr by calling copy().

Transformer transform (AffineTransform const &transform)
 
Transformer const transform (AffineTransform const &transform) const
 
Convolve two bivariate Gaussians defined by their 1-sigma ellipses.
Convolution convolve (Ellipse const &other)
 
Convolution const convolve (Ellipse const &other) const
 

Detailed Description

An ellipse defined by an arbitrary BaseCore and a center point.

An ellipse is composed of its center coordinate and its Core - a parametrization of the ellipticity and size of the ellipse. Setting the core of an ellipse never changes the type of the contained core, it merely sets the parameters of that core by converting the parameters.

Definition at line 51 of file Ellipse.h.

Member Typedef Documentation

◆ ParameterVector

typedef Eigen::Matrix<double, 5, 1> lsst::afw::geom::ellipses::Ellipse::ParameterVector

Proxy return type for Ellipse::convolve().

Parameter vector type.

Definition at line 55 of file Ellipse.h.

Member Enumeration Documentation

◆ ParameterEnum

Enumerator
X 
Y 

Definition at line 59 of file Ellipse.h.

Constructor & Destructor Documentation

◆ ~Ellipse()

virtual lsst::afw::geom::ellipses::Ellipse::~Ellipse ( )
virtualdefault

◆ Ellipse() [1/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( BaseCore const &  core,
Point2D const &  center = Point2D() 
)
inlineexplicit

Definition at line 164 of file Ellipse.h.

◆ Ellipse() [2/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( std::shared_ptr< BaseCore const > const &  core,
Point2D const &  center = Point2D() 
)
inlineexplicit

Definition at line 167 of file Ellipse.h.

◆ Ellipse() [3/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( Ellipse::Transformer const &  other)
inline

Definition at line 130 of file Transformer.h.

◆ Ellipse() [4/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( Convolution const &  other)

◆ Ellipse() [5/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( Ellipse const &  other)
inline

Definition at line 173 of file Ellipse.h.

◆ Ellipse() [6/6]

lsst::afw::geom::ellipses::Ellipse::Ellipse ( Ellipse &&  other)
inline

Definition at line 175 of file Ellipse.h.

Member Function Documentation

◆ computeBBox()

Box2D lsst::afw::geom::ellipses::Ellipse::computeBBox ( ) const

Return the bounding box of the ellipse.

◆ convolve() [1/2]

Ellipse::Convolution lsst::afw::geom::ellipses::Ellipse::convolve ( Ellipse const &  other)
inline

Definition at line 101 of file Convolution.h.

◆ convolve() [2/2]

Ellipse::Convolution const lsst::afw::geom::ellipses::Ellipse::convolve ( Ellipse const &  other) const
inline

Definition at line 105 of file Convolution.h.

◆ getCenter() [1/2]

Point2D const& lsst::afw::geom::ellipses::Ellipse::getCenter ( ) const
inline

Return the center point.

Definition at line 62 of file Ellipse.h.

◆ getCenter() [2/2]

Point2D& lsst::afw::geom::ellipses::Ellipse::getCenter ( )
inline

Return the center point.

Definition at line 65 of file Ellipse.h.

◆ getCore() [1/2]

BaseCore const& lsst::afw::geom::ellipses::Ellipse::getCore ( ) const
inline

Return the ellipse core.

Definition at line 71 of file Ellipse.h.

◆ getCore() [2/2]

BaseCore& lsst::afw::geom::ellipses::Ellipse::getCore ( )
inline

Return the ellipse core.

Definition at line 74 of file Ellipse.h.

◆ getCorePtr() [1/2]

std::shared_ptr<BaseCore const> lsst::afw::geom::ellipses::Ellipse::getCorePtr ( ) const
inline

Return the ellipse core.

Definition at line 77 of file Ellipse.h.

◆ getCorePtr() [2/2]

std::shared_ptr<BaseCore> lsst::afw::geom::ellipses::Ellipse::getCorePtr ( )
inline

Return the ellipse core.

Definition at line 80 of file Ellipse.h.

◆ getGridTransform()

Ellipse::GridTransform const lsst::afw::geom::ellipses::Ellipse::getGridTransform ( ) const
inline

Return the transform that maps the ellipse to the unit circle.

The returned proxy object is implicitly convertible to AffineTransform and also supports differentiation.

Definition at line 112 of file GridTransform.h.

◆ getParameterVector()

ParameterVector const lsst::afw::geom::ellipses::Ellipse::getParameterVector ( ) const

Return the ellipse parameters as a vector.

◆ grow()

void lsst::afw::geom::ellipses::Ellipse::grow ( double  buffer)
inline

Increase the major and minor radii of the ellipse by the given buffer.

Definition at line 89 of file Ellipse.h.

◆ normalize()

void lsst::afw::geom::ellipses::Ellipse::normalize ( )
inline

Put the parameters in a standard form.

Definition at line 86 of file Ellipse.h.

◆ operator!=()

bool lsst::afw::geom::ellipses::Ellipse::operator!= ( Ellipse const &  other) const
inline

Compare two ellipses for inequality.

Ellipses are only equal if they have the same Core types.

Definition at line 160 of file Ellipse.h.

◆ operator=() [1/2]

Ellipse& lsst::afw::geom::ellipses::Ellipse::operator= ( Ellipse const &  other)

Set the parameters of this ellipse from another.

This does not change the parametrization of the ellipse.

◆ operator=() [2/2]

Ellipse& lsst::afw::geom::ellipses::Ellipse::operator= ( Ellipse &&  other)

◆ operator==()

bool lsst::afw::geom::ellipses::Ellipse::operator== ( Ellipse const &  other) const
inline

Compare two ellipses for equality.

Ellipses are only equal if they have the same Core types.

Definition at line 151 of file Ellipse.h.

◆ readParameters()

void lsst::afw::geom::ellipses::Ellipse::readParameters ( double const *  iter)

◆ scale()

void lsst::afw::geom::ellipses::Ellipse::scale ( double  factor)
inline

Scale the size of the ellipse by the given factor.

Definition at line 92 of file Ellipse.h.

◆ setCenter()

void lsst::afw::geom::ellipses::Ellipse::setCenter ( Point2D const &  center)
inline

Set the center point.

Definition at line 68 of file Ellipse.h.

◆ setCore()

void lsst::afw::geom::ellipses::Ellipse::setCore ( BaseCore const &  core)
inline

Set the ellipse core; the type of the core is not changed.

Definition at line 83 of file Ellipse.h.

◆ setParameterVector()

void lsst::afw::geom::ellipses::Ellipse::setParameterVector ( ParameterVector const &  vector)

Set the ellipse parameters from a vector.

◆ shift()

void lsst::afw::geom::ellipses::Ellipse::shift ( Extent2D const &  offset)
inline

Move the ellipse center by the given offset.

Definition at line 95 of file Ellipse.h.

◆ transform() [1/2]

Ellipse::Transformer lsst::afw::geom::ellipses::Ellipse::transform ( AffineTransform const &  transform)
inline

Definition at line 122 of file Transformer.h.

◆ transform() [2/2]

Ellipse::Transformer const lsst::afw::geom::ellipses::Ellipse::transform ( AffineTransform const &  transform) const
inline

Definition at line 126 of file Transformer.h.

◆ writeParameters()

void lsst::afw::geom::ellipses::Ellipse::writeParameters ( double *  iter) const

The documentation for this class was generated from the following files: