LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Attributes | Static Private Attributes | List of all members
lsst::afw::math::SpatialCellCandidate Class Referenceabstract

#include <SpatialCell.h>

Inheritance diagram for lsst::afw::math::SpatialCellCandidate:
lsst::afw::math::SpatialCellImageCandidate< PixelT > lsst::afw::math::SpatialCellMaskedImageCandidate< PixelT > lsst::meas::algorithms::ShapeletPsfCandidate lsst::afw::math::SpatialCellImageCandidate< afw::math::Kernel::Pixel > lsst::meas::algorithms::PsfCandidate< PixelT > lsst::ip::diffim::KernelCandidate< _PixelT >

Public Types

enum  Status { BAD = 0, GOOD = 1, UNKNOWN = 2 }
 
typedef boost::shared_ptr
< SpatialCellCandidate
Ptr
 
typedef boost::shared_ptr
< const SpatialCellCandidate
ConstPtr
 

Public Member Functions

 SpatialCellCandidate (float const xCenter, float const yCenter)
 
virtual ~SpatialCellCandidate ()
 
float getXCenter () const
 Return the object's column-centre. More...
 
float getYCenter () const
 Return the object's row-centre. More...
 
virtual bool instantiate ()
 Do anything needed to make this candidate usable. More...
 
virtual double getCandidateRating () const =0
 Return candidate's rating. More...
 
virtual void setCandidateRating (double)
 Set the candidate's rating. More...
 
int getId () const
 Return the candidate's unique ID. More...
 
Status getStatus () const
 Return the candidate's status. More...
 
void setStatus (Status status)
 Set the candidate's status. More...
 
virtual bool isBad () const
 Is this candidate unacceptable? More...
 

Private Attributes

int _id
 
Status _status
 
float const _xCenter
 
float const _yCenter
 

Static Private Attributes

static int _CandidateId = 0
 Unique identifier for candidates; useful for preserving current candidate following insertion. More...
 

Detailed Description

Base class for candidate objects in a SpatialCell

Examples:
testSpatialCell.h.

Definition at line 74 of file SpatialCell.h.

Member Typedef Documentation

Definition at line 77 of file SpatialCell.h.

Definition at line 76 of file SpatialCell.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

lsst::afw::math::SpatialCellCandidate::SpatialCellCandidate ( float const  xCenter,
float const  yCenter 
)
inline
Parameters
xCenterThe object's column-centre
yCenterThe object's row-centre

Definition at line 81 of file SpatialCell.h.

83  :
84  _id(++_CandidateId),
86  _xCenter(xCenter), _yCenter(yCenter) {
87  }
static int _CandidateId
Unique identifier for candidates; useful for preserving current candidate following insertion...
Definition: SpatialCell.h:123
virtual lsst::afw::math::SpatialCellCandidate::~SpatialCellCandidate ( )
inlinevirtual

(virtual) destructor – this is a base class you know

Definition at line 92 of file SpatialCell.h.

92 {}

Member Function Documentation

virtual double lsst::afw::math::SpatialCellCandidate::getCandidateRating ( ) const
pure virtual
int lsst::afw::math::SpatialCellCandidate::getId ( ) const
inline

Return the candidate's unique ID.

Definition at line 109 of file SpatialCell.h.

Status lsst::afw::math::SpatialCellCandidate::getStatus ( ) const
inline

Return the candidate's status.

Definition at line 111 of file SpatialCell.h.

float lsst::afw::math::SpatialCellCandidate::getXCenter ( ) const
inline

Return the object's column-centre.

Definition at line 95 of file SpatialCell.h.

95 { return _xCenter; }
float lsst::afw::math::SpatialCellCandidate::getYCenter ( ) const
inline

Return the object's row-centre.

Definition at line 98 of file SpatialCell.h.

98 { return _yCenter; }
virtual bool lsst::afw::math::SpatialCellCandidate::instantiate ( )
inlinevirtual

Do anything needed to make this candidate usable.

Definition at line 101 of file SpatialCell.h.

101 { return true; }
virtual bool lsst::afw::math::SpatialCellCandidate::isBad ( ) const
inlinevirtual

Is this candidate unacceptable?

Definition at line 114 of file SpatialCell.h.

virtual void lsst::afw::math::SpatialCellCandidate::setCandidateRating ( double  )
inlinevirtual

Set the candidate's rating.

Definition at line 106 of file SpatialCell.h.

106 {}
void lsst::afw::math::SpatialCellCandidate::setStatus ( Status  status)

Set the candidate's status.

Definition at line 61 of file SpatialCell.cc.

61  {
62  switch (status) {
63  case GOOD:
64  case UNKNOWN:
65  _status = status;
66  return;
67  case BAD:
68  _status = status;
69  return;
70  }
71 
72  throw LSST_EXCEPT(lsst::pex::exceptions::InvalidParameterError,
73  (boost::format("Saw unknown status %d") % status).str());
74 }
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
int status

Member Data Documentation

int lsst::afw::math::SpatialCellCandidate::_CandidateId = 0
staticprivate

Unique identifier for candidates; useful for preserving current candidate following insertion.

Definition at line 123 of file SpatialCell.h.

int lsst::afw::math::SpatialCellCandidate::_id
private

Definition at line 118 of file SpatialCell.h.

Status lsst::afw::math::SpatialCellCandidate::_status
private

Definition at line 119 of file SpatialCell.h.

float const lsst::afw::math::SpatialCellCandidate::_xCenter
private

Definition at line 120 of file SpatialCell.h.

float const lsst::afw::math::SpatialCellCandidate::_yCenter
private

Definition at line 121 of file SpatialCell.h.


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