lsst.afw  14.0-69-ge506bfb5f
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lsst::afw::image::Filter Class Reference

Holds an integer identifier for an LSST filter. More...

#include <Filter.h>

Public Member Functions

 Filter (std::string const &name, bool const force=false)
 Creates a Filter with the given name. More...
 
 Filter (int id=UNKNOWN)
 Creates a Filter with the given identifier. More...
 
 Filter (std::shared_ptr< lsst::daf::base::PropertySet const > metadata, bool const force=false)
 Create a Filter from a PropertySet (e.g. More...
 
 Filter (Filter const &)=default
 
 Filter (Filter &&)=default
 
Filter & operator= (Filter const &)=default
 
Filter & operator= (Filter &&)=default
 
 ~Filter ()=default
 
bool operator== (Filter const &rhs) const
 Are two filters identical? More...
 
bool operator!= (Filter const &rhs) const
 
int getId () const
 Return a Filter's integral id. More...
 
std::string const & getName () const
 Return a Filter's name. More...
 
std::string const & getCanonicalName () const
 Return a filter's canonical name. More...
 
std::vector< std::string > getAliases () const
 Return all aliases by which this filter is known. More...
 
FilterProperty const & getFilterProperty () const
 Return a Filter's FilterProperty. More...
 

Static Public Member Functions

static void reset ()
 Clear all definitions. More...
 
static int define (FilterProperty const &filterProperty, int id=AUTO, bool force=false)
 Define a filter name to have the specified id. More...
 
static int defineAlias (std::string const &oldName, std::string const &newName, bool force=false)
 Define an alias for a filter. More...
 
static std::vector< std::string > getNames ()
 Return a list of known filters. More...
 

Static Public Attributes

static int const AUTO
 
static int const UNKNOWN
 

Detailed Description

Holds an integer identifier for an LSST filter.

Definition at line 153 of file Filter.h.

Constructor & Destructor Documentation

◆ Filter() [1/5]

lsst::afw::image::Filter::Filter ( std::string const &  name,
bool const  force = false 
)
inlineexplicit

Creates a Filter with the given name.

Parameters
nameName of filter
forceAllow us to construct an unknown Filter

Definition at line 161 of file Filter.h.

◆ Filter() [2/5]

lsst::afw::image::Filter::Filter ( int  id = UNKNOWN)
inlineexplicit

Creates a Filter with the given identifier.

Parameters
idId number of desired filter

Definition at line 168 of file Filter.h.

◆ Filter() [3/5]

lsst::afw::image::Filter::Filter ( std::shared_ptr< lsst::daf::base::PropertySet const >  metadata,
bool const  force = false 
)
explicit

Create a Filter from a PropertySet (e.g.

a FITS header)

Parameters
metadataMetadata to process (e.g. a IFITS header)
forceAllow us to construct an unknown Filter

◆ Filter() [4/5]

lsst::afw::image::Filter::Filter ( Filter const &  )
default

◆ Filter() [5/5]

lsst::afw::image::Filter::Filter ( Filter &&  )
default

◆ ~Filter()

lsst::afw::image::Filter::~Filter ( )
default

Member Function Documentation

◆ define()

static int lsst::afw::image::Filter::define ( FilterProperty const &  filterProperty,
int  id = AUTO,
bool  force = false 
)
static

Define a filter name to have the specified id.

If id == Filter::AUTO a value will be chosen for you.

It is an error to attempt to change a name's id (unless you specify force)

◆ defineAlias()

static int lsst::afw::image::Filter::defineAlias ( std::string const &  oldName,
std::string const &  newName,
bool  force = false 
)
static

Define an alias for a filter.

Parameters
oldNameold name for Filter
newNamenew name for Filter
forceforce an alias even if newName is already in use

◆ getAliases()

std::vector<std::string> lsst::afw::image::Filter::getAliases ( ) const

Return all aliases by which this filter is known.

The list excludes the canonical name

◆ getCanonicalName()

std::string const& lsst::afw::image::Filter::getCanonicalName ( ) const
inline

Return a filter's canonical name.

I.e. if this filter's an alias, return the name of the aliased Filter

Definition at line 204 of file Filter.h.

◆ getFilterProperty()

FilterProperty const& lsst::afw::image::Filter::getFilterProperty ( ) const

Return a Filter's FilterProperty.

◆ getId()

int lsst::afw::image::Filter::getId ( ) const
inline

Return a Filter's integral id.

Definition at line 194 of file Filter.h.

◆ getName()

std::string const& lsst::afw::image::Filter::getName ( ) const
inline

Return a Filter's name.

Definition at line 198 of file Filter.h.

◆ getNames()

static std::vector<std::string> lsst::afw::image::Filter::getNames ( )
static

Return a list of known filters.

◆ operator!=()

bool lsst::afw::image::Filter::operator!= ( Filter const &  rhs) const
inline

Definition at line 189 of file Filter.h.

◆ operator=() [1/2]

Filter& lsst::afw::image::Filter::operator= ( Filter const &  )
default

◆ operator=() [2/2]

Filter& lsst::afw::image::Filter::operator= ( Filter &&  )
default

◆ operator==()

bool lsst::afw::image::Filter::operator== ( Filter const &  rhs) const

Are two filters identical?

◆ reset()

static void lsst::afw::image::Filter::reset ( )
inlinestatic

Clear all definitions.

Definition at line 219 of file Filter.h.

Member Data Documentation

◆ AUTO

int const lsst::afw::image::Filter::AUTO
static

Definition at line 155 of file Filter.h.

◆ UNKNOWN

int const lsst::afw::image::Filter::UNKNOWN
static

Definition at line 156 of file Filter.h.


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