LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Represent a 2-dimensional array of bitmask pixels. More...
#include <Mask.h>
Classes | |
struct | ImageTypeFactory |
A templated class to return this classes' type (present in Image/Mask/MaskedImage) More... | |
Public Types | |
typedef boost::shared_ptr< Mask > | Ptr |
typedef boost::shared_ptr < const Mask > | ConstPtr |
typedef detail::MaskPlaneDict | MaskPlaneDict |
typedef detail::Mask_tag | image_category |
Public Types inherited from lsst.afw.image::ImageBase< MaskPixelT > | |
typedef boost::shared_ptr < ImageBase< MaskPixelT > > | Ptr |
A shared_ptr to an ImageBase. More... | |
typedef boost::shared_ptr < const ImageBase< MaskPixelT > > | ConstPtr |
A shared_ptr to a const ImageBase. More... | |
typedef detail::basic_tag | image_category |
trait class to identify type of image More... | |
typedef MaskPixelT | SinglePixel |
A single Pixel of the same type as those in the ImageBase. More... | |
typedef MaskPixelT | Pixel |
A pixel in this ImageBase. More... | |
typedef Reference< MaskPixelT > ::type | PixelReference |
A Reference to a PixelT. More... | |
typedef ConstReference < MaskPixelT >::type | PixelConstReference |
A ConstReference to a PixelT. More... | |
typedef _view_t::xy_locator | xy_locator |
An xy_locator. More... | |
typedef _view_t::xy_locator::const_t | const_xy_locator |
A const_xy_locator. More... | |
typedef _view_t::iterator | iterator |
An STL compliant iterator. More... | |
typedef _const_view_t::iterator | const_iterator |
An STL compliant const iterator. More... | |
typedef _view_t::reverse_iterator | reverse_iterator |
An STL compliant reverse iterator. More... | |
typedef _const_view_t::reverse_iterator | const_reverse_iterator |
An STL compliant const reverse iterator. More... | |
typedef _view_t::x_iterator | x_iterator |
An iterator for traversing the pixels in a row. More... | |
typedef x_iterator | fast_iterator |
typedef _view_t::x_iterator | xy_x_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. More... | |
typedef _const_view_t::x_iterator | const_x_iterator |
A const iterator for traversing the pixels in a row. More... | |
typedef _view_t::y_iterator | y_iterator |
An iterator for traversing the pixels in a column. More... | |
typedef _view_t::y_iterator | xy_y_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. More... | |
typedef _const_view_t::y_iterator | const_y_iterator |
A const iterator for traversing the pixels in a column. More... | |
typedef ndarray::Array < MaskPixelT, 2, 1 > | Array |
A mutable ndarray representation of the image. More... | |
typedef ndarray::Array < MaskPixelTconst, 2, 1 > | ConstArray |
An immutable ndarray representation of the image. More... | |
Public Types inherited from lsst::daf::base::Persistable | |
typedef boost::shared_ptr < Persistable > | Ptr |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Public Member Functions | |
Mask (unsigned int width, unsigned int height, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. More... | |
Mask (unsigned int width, unsigned int height, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. More... | |
Mask (geom::Extent2I const &dimensions=geom::Extent2I(), MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. More... | |
Mask (geom::Extent2I const &dimensions, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. More... | |
Mask (geom::Box2I const &bbox, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. More... | |
Mask (geom::Box2I const &bbox, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. More... | |
Mask (std::string const &fileName, int hdu=0, boost::shared_ptr< lsst::daf::base::PropertySet > metadata=boost::shared_ptr< lsst::daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false) | |
Construct a Mask by reading a regular FITS file. More... | |
Mask (fits::MemFileManager &manager, int hdu=0, boost::shared_ptr< lsst::daf::base::PropertySet > metadata=boost::shared_ptr< lsst::daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false) | |
Construct a Mask by reading a FITS image in memory. More... | |
Mask (fits::Fits &fitsfile, boost::shared_ptr< lsst::daf::base::PropertySet > metadata=boost::shared_ptr< lsst::daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false) | |
Construct a Mask from an already-open FITS object. More... | |
template<typename OtherPixelT > | |
Mask (Mask< OtherPixelT > const &rhs, const bool deep) | |
Mask (const Mask &src, const bool deep=false) | |
Construct a Mask from another Mask. More... | |
Mask (const Mask &src, const geom::Box2I &bbox, ImageOrigin const origin=PARENT, const bool deep=false) | |
Construct a Mask from a subregion of another Mask. More... | |
Mask (ndarray::Array< MaskPixelT, 2, 1 > const &array, bool deep=false, geom::Point2I const &xy0=geom::Point2I()) | |
void | swap (Mask &rhs) |
Mask & | operator= (MaskPixelT const rhs) |
Mask & | operator= (const Mask &rhs) |
void | operator|= (Mask const &rhs) |
OR a Mask into a Mask. More... | |
void | operator|= (MaskPixelT const rhs) |
OR a bitmask into a Mask. More... | |
void | operator&= (Mask const &rhs) |
AND a Mask into a Mask. More... | |
void | operator&= (MaskPixelT const rhs) |
AND a bitmask into a Mask. More... | |
void | operator^= (Mask const &rhs) |
XOR a Mask into a Mask. More... | |
void | operator^= (MaskPixelT const rhs) |
XOR a bitmask into a Mask. More... | |
ImageBase< MaskPixelT > ::PixelReference | operator() (int x, int y) |
get a reference to the specified pixel More... | |
ImageBase< MaskPixelT > ::PixelConstReference | operator() (int x, int y) const |
get the specified pixel (const version) More... | |
bool | operator() (int x, int y, int plane) const |
is the specified mask plane set in the specified pixel? More... | |
ImageBase< MaskPixelT > ::PixelReference | operator() (int x, int y, CheckIndices const &) |
get a reference to the specified pixel checking array bounds More... | |
ImageBase< MaskPixelT > ::PixelConstReference | operator() (int x, int y, CheckIndices const &) const |
get the specified pixel with array checking (const version) More... | |
bool | operator() (int x, int y, int plane, CheckIndices const &) const |
is the specified mask plane set in the specified pixel, checking array bounds? More... | |
void | writeFits (std::string const &fileName, boost::shared_ptr< lsst::daf::base::PropertySet const > metadata=boost::shared_ptr< lsst::daf::base::PropertySet >(), std::string const &mode="w") const |
Write a mask to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, boost::shared_ptr< lsst::daf::base::PropertySet const > metadata=boost::shared_ptr< lsst::daf::base::PropertySet >(), std::string const &mode="w") const |
Write a mask to a FITS RAM file. More... | |
void | writeFits (fits::Fits &fitsfile, boost::shared_ptr< lsst::daf::base::PropertySet const > metadata=boost::shared_ptr< lsst::daf::base::PropertySet const >()) const |
Write a mask to an open FITS file object. More... | |
std::string | getAsString (int x, int y) |
void | clearAllMaskPlanes () |
Clear all the pixels. More... | |
void | clearMaskPlane (int plane) |
Clear the specified bit in all pixels. More... | |
void | setMaskPlaneValues (const int plane, const int x0, const int x1, const int y) |
Set the bit specified by "planeId" for pixels (x0, y) ... (x1, y) More... | |
void | removeAndClearMaskPlane (const std::string &name, bool const removeFromDefault=false) |
Clear all pixels of the specified mask and remove the plane from the mask plane dictionary; optionally remove the plane from the default dictionary too. More... | |
MaskPlaneDict const & | getMaskPlaneDict () const |
void | printMaskPlanes () const |
print the mask plane dictionary to std::cout More... | |
void | conformMaskPlanes (const MaskPlaneDict &masterPlaneDict) |
Adjust this mask to conform to the standard Mask class's mask plane dictionary, adding any new mask planes to the standard. More... | |
Public Member Functions inherited from lsst.afw.image::ImageBase< MaskPixelT > | |
ImageBase (const geom::Extent2I &dimensions=geom::Extent2I()) | |
ImageBase (const geom::Box2I &bbox) | |
ImageBase (const ImageBase &src, const bool deep=false) | |
ImageBase (const ImageBase &src, const geom::Box2I &bbox, const ImageOrigin origin=PARENT, const bool deep=false) | |
ImageBase (const ImageBase< OtherPixelT > &rhs, const bool deep) | |
ImageBase (Array const &array, bool deep=false, geom::Point2I const &xy0=geom::Point2I()) | |
virtual | ~ImageBase () |
ImageBase & | operator= (const ImageBase &rhs) |
ImageBase & | operator= (const MaskPixelTrhs) |
void | operator<<= (const ImageBase &rhs) |
PixelReference | operator() (int x, int y) |
PixelReference | operator() (int x, int y, CheckIndices const &) |
PixelConstReference | operator() (int x, int y) const |
PixelConstReference | operator() (int x, int y, CheckIndices const &) const |
PixelConstReference | get0 (int x, int y) const |
PixelConstReference | get0 (int x, int y, CheckIndices const &check) const |
void | set0 (int x, int y, const MaskPixelTv) |
void | set0 (int x, int y, const MaskPixelTv, CheckIndices const &check) |
int | getWidth () const |
Return the number of columns in the image. More... | |
int | getHeight () const |
Return the number of rows in the image. More... | |
int | getX0 () const |
int | getY0 () const |
geom::Point2I | getXY0 () const |
std::pair< int, double > | positionToIndex (double const pos, lsst::afw::image::xOrY const xy) const |
Convert image position to index (nearest integer and fractional parts) More... | |
double | indexToPosition (double ind, lsst::afw::image::xOrY const xy) const |
Convert image index to image position. More... | |
geom::Extent2I | getDimensions () const |
Return the image's size; useful for passing to constructors. More... | |
void | swap (ImageBase &rhs) |
Array | getArray () |
ConstArray | getArray () const |
iterator | begin () const |
fast_iterator | begin (bool) const |
iterator | end () const |
fast_iterator | end (bool) const |
reverse_iterator | rbegin () const |
reverse_iterator | rend () const |
iterator | at (int x, int y) const |
x_iterator | row_begin (int y) const |
x_iterator | row_end (int y) const |
Return an x_iterator to the end of the y'th row. More... | |
x_iterator | x_at (int x, int y) const |
Return an x_iterator to the point (x, y) in the image. More... | |
y_iterator | col_begin (int x) const |
y_iterator | col_end (int x) const |
Return an y_iterator to the end of the y'th row. More... | |
y_iterator | y_at (int x, int y) const |
Return an y_iterator to the point (x, y) in the image. More... | |
xy_locator | xy_at (int x, int y) const |
void | setXY0 (geom::Point2I const origin) |
void | setXY0 (int const x0, int const y0) |
geom::Box2I | getBBox (ImageOrigin origin=PARENT) const |
Public Member Functions inherited from lsst::daf::base::Persistable | |
Persistable (void) | |
virtual | ~Persistable (void) |
template<class Archive > | |
void | serialize (Archive &, unsigned int const) |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Static Public Member Functions | |
static MaskPixelT | getPlaneBitMask (const std::vector< std::string > &names) |
Return the bitmask corresponding to a vector of plane names OR'd together. More... | |
static Mask | readFits (std::string const &filename, int hdu=0) |
Read a Mask from a regular FITS file. More... | |
static Mask | readFits (fits::MemFileManager &manager, int hdu=0) |
Read a Mask from a FITS RAM file. More... | |
static std::string | interpret (MaskPixelT value) |
Interpret a mask value as a comma-separated list of mask plane names. More... | |
static MaskPlaneDict | parseMaskPlaneMetadata (boost::shared_ptr< lsst::daf::base::PropertySet const >) |
Given a PropertySet that contains the MaskPlane assignments, setup the MaskPlanes. More... | |
static void | clearMaskPlaneDict () |
Reset the maskPlane dictionary. More... | |
static int | addMaskPlane (const std::string &name) |
static void | removeMaskPlane (const std::string &name) |
static int | getMaskPlane (const std::string &name) |
Return the mask plane number corresponding to a plane name. More... | |
static MaskPixelT | getPlaneBitMask (const std::string &name) |
Return the bitmask corresponding to a plane name. More... | |
static int | getNumPlanesMax () |
static int | getNumPlanesUsed () |
Reset the maskPlane dictionary. More... | |
static void | addMaskPlanesToMetadata (boost::shared_ptr< lsst::daf::base::PropertySet >) |
Given a PropertySet, replace any existing MaskPlane assignments with the current ones. More... | |
Static Public Member Functions inherited from lsst.afw.image::ImageBase< MaskPixelT > | |
static SinglePixel | PixelCast (SinglePixelT rhs) |
Convert a type to our SinglePixel type. More... | |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Private Member Functions | |
void | _initializePlanes (MaskPlaneDict const &planeDefs) |
Initialise mask planes; called by constructors. More... | |
void | checkMaskDictionaries (Mask const &other) |
Static Private Member Functions | |
static boost::shared_ptr < detail::MaskDict > | _maskPlaneDict () |
static int | _setMaskPlaneDict (MaskPlaneDict const &mpd) |
static int | addMaskPlane (std::string name, int plane) |
set the name of a mask plane, with minimal checking. More... | |
static int | getMaskPlaneNoThrow (const std::string &name) |
Return the mask plane number corresponding to a plane name, or -1 if not found. More... | |
static MaskPixelT | getBitMaskNoThrow (int plane) |
Return the bitmask corresponding to a plane ID, or 0 if invalid. More... | |
static MaskPixelT | getBitMask (int plane) |
Return the bitmask corresponding to plane ID. More... | |
Private Attributes | |
boost::shared_ptr < detail::MaskDict > | _maskDict |
Static Private Attributes | |
static const std::string | maskPlanePrefix |
Additional Inherited Members | |
Protected Member Functions inherited from lsst.afw.image::ImageBase< MaskPixelT > | |
_view_t | _getRawView () const |
bool | isContiguous () const |
Static Protected Member Functions inherited from lsst.afw.image::ImageBase< MaskPixelT > | |
static _view_t | _allocateView (geom::Extent2I const &dimensions, Manager::Ptr &manager) |
static _view_t | _makeSubView (geom::Extent2I const &dimensions, geom::Extent2I const &offset, const _view_t &view) |
Represent a 2-dimensional array of bitmask pixels.
Some mask planes are always defined (although you can add more with Mask::addMaskPlane):
BAD
This pixel is known to be bad (e.g. the amplifier is not working)
CR
This pixel is contaminated by a cosmic ray
DETECTED
This pixel lies within an object's Footprint
DETECTED_NEGATIVE
This pixel lies within an object's Footprint, and the detection was looking for pixels below a specified level
EDGE
This pixel is too close to the edge to be processed properly
INTRP
This pixel has been interpolated over INTERPOLATED
SAT
This pixel is saturated and has bloomed SATURATED
SUSPECT
This pixel is untrustworthy, and you may wish to discard any Source containing it typedef boost::shared_ptr<const Mask> lsst.afw.image::Mask< MaskPixelT >::ConstPtr |
typedef detail::Mask_tag lsst.afw.image::Mask< MaskPixelT >::image_category |
typedef detail::MaskPlaneDict lsst.afw.image::Mask< MaskPixelT >::MaskPlaneDict |
typedef boost::shared_ptr<Mask> lsst.afw.image::Mask< MaskPixelT >::Ptr |
|
explicit |
Construct a Mask initialized to 0x0.
width | number of columns |
height | number of rows |
planeDefs | desired mask planes |
Definition at line 404 of file Mask.cc.
|
explicit |
Construct a Mask initialized to a specified value.
width | number of columns |
height | number of rows |
initialValue | Initial value |
planeDefs | desired mask planes |
Definition at line 418 of file Mask.cc.
|
explicit |
Construct a Mask initialized to 0x0.
dimensions | Number of columns, rows |
planeDefs | desired mask planes |
Definition at line 433 of file Mask.cc.
|
explicit |
Construct a Mask initialized to a specified value.
dimensions | Number of columns, rows |
initialValue | Initial value |
planeDefs | desired mask planes |
Definition at line 446 of file Mask.cc.
|
explicit |
Construct a Mask initialized to 0x0.
bbox | Desired number of columns/rows and origin |
planeDefs | desired mask planes |
Definition at line 460 of file Mask.cc.
|
explicit |
Construct a Mask initialized to a specified value.
bbox | Desired number of columns/rows and origin |
initialValue | Initial value |
planeDefs | desired mask planes |
Definition at line 473 of file Mask.cc.
|
explicit |
Construct a Mask by reading a regular FITS file.
[in] | fileName | File to read. |
[in] | hdu | HDU to read, 1-indexed (i.e. 1=Primary HDU). The special value of 0 reads the Primary HDU unless it is empty, in which case it reads the first extension HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[in] | bbox | If non-empty, read only the pixels within the bounding box. |
[in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
[in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
The meaning of the bitplanes is given in the header. If conformMasks is false (default), the bitvalues will be changed to match those in Mask's plane dictionary. If it's true, the bitvalues will be left alone, but Mask's dictionary will be modified to match the on-disk version.
|
explicit |
Construct a Mask by reading a FITS image in memory.
[in] | manager | An object that manages the memory buffer to read. |
[in] | hdu | HDU to read, 1-indexed (i.e. 1=Primary HDU). The special value of 0 reads the Primary HDU unless it is empty, in which case it reads the first extension HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[in] | bbox | If non-empty, read only the pixels within the bounding box. |
[in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
[in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
The meaning of the bitplanes is given in the header. If conformMasks is false (default), the bitvalues will be changed to match those in Mask's plane dictionary. If it's true, the bitvalues will be left alone, but Mask's dictionary will be modified to match the on-disk version.
|
explicit |
Construct a Mask from an already-open FITS object.
[in] | fitsfile | A FITS object to read from, already at the desired HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[in] | bbox | If non-empty, read only the pixels within the bounding box. |
[in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
[in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
The meaning of the bitplanes is given in the header. If conformMasks is false (default), the bitvalues will be changed to match those in Mask's plane dictionary. If it's true, the bitvalues will be left alone, but Mask's dictionary will be modified to match the on-disk version.
|
inline |
Definition at line 211 of file Mask.h.
lsst.afw.image::Mask< MaskPixelT >::Mask | ( | const Mask< MaskPixelT > & | src, |
const bool | deep = false |
||
) |
Construct a Mask from another Mask.
src | mask to copy |
deep | deep copy? (construct a view with shared pixels if false) |
Definition at line 500 of file Mask.cc.
lsst.afw.image::Mask< MaskPixelT >::Mask | ( | const Mask< MaskPixelT > & | src, |
const geom::Box2I & | bbox, | ||
ImageOrigin const | origin = PARENT , |
||
const bool | deep = false |
||
) |
Construct a Mask from a subregion of another Mask.
src | mask to copy |
bbox | subregion to copy |
origin | coordinate system of the bbox |
deep | deep copy? (construct a view with shared pixels if false) |
Definition at line 487 of file Mask.cc.
|
explicit |
Definition at line 508 of file Mask.cc.
|
private |
Initialise mask planes; called by constructors.
Definition at line 394 of file Mask.cc.
|
staticprivate |
Definition at line 1246 of file Mask.cc.
|
staticprivate |
|
static |
Definition at line 700 of file Mask.cc.
|
staticprivate |
set the name of a mask plane, with minimal checking.
This is a private function and is mainly used by setMaskPlaneMetadata
name | new name of mask plane |
planeId | ID of mask plane to be (re)named |
Definition at line 726 of file Mask.cc.
|
static |
Given a PropertySet, replace any existing MaskPlane assignments with the current ones.
Definition at line 1155 of file Mask.cc.
|
private |
Definition at line 1053 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::clearAllMaskPlanes | ( | ) |
void lsst.afw.image::Mask< MaskPixelT >::clearMaskPlane | ( | int | plane | ) |
Clear the specified bit in all pixels.
Definition at line 897 of file Mask.cc.
|
static |
Reset the maskPlane dictionary.
Definition at line 881 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::conformMaskPlanes | ( | const MaskPlaneDict & | masterPlaneDict | ) |
Adjust this mask to conform to the standard Mask class's mask plane dictionary, adding any new mask planes to the standard.
Ensures that this mask (presumably from some external source) has the same plane assignments as the Mask class. If a change in plane assignments is needed, the bits within each pixel are permuted as required. The provided currentPlaneDict describes the true state of the bits in this Mask's pixels and overrides its current MaskDict
Any new mask planes found in this mask are added to unused slots in the Mask class's mask plane dictionary.
masterPlaneDict | mask plane dictionary currently in use for this mask |
Definition at line 913 of file Mask.cc.
|
inline |
Definition at line 311 of file Mask.h.
|
staticprivate |
Return the bitmask corresponding to plane ID.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 803 of file Mask.cc.
|
staticprivate |
|
static |
Return the mask plane number corresponding to a plane name.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 825 of file Mask.cc.
detail::MaskPlaneDict const & lsst.afw.image::Mask< MaskPixelT >::getMaskPlaneDict | ( | ) | const |
Return the Mask's maskPlaneDict
Definition at line 745 of file Mask.cc.
|
staticprivate |
Return the mask plane number corresponding to a plane name, or -1 if not found.
Definition at line 840 of file Mask.cc.
|
inlinestatic |
|
static |
Reset the maskPlane dictionary.
Definition at line 872 of file Mask.cc.
|
static |
Return the bitmask corresponding to a vector of plane names OR'd together.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 860 of file Mask.cc.
|
static |
Return the bitmask corresponding to a plane name.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 850 of file Mask.cc.
|
static |
Interpret a mask value as a comma-separated list of mask plane names.
Definition at line 684 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::operator&= | ( | Mask< MaskPixelT > const & | rhs | ) |
AND a Mask into a Mask.
Definition at line 1104 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::operator&= | ( | MaskPixelT const | rhs | ) |
AND a bitmask into a Mask.
Definition at line 1096 of file Mask.cc.
ImageBase< MaskPixelT >::PixelReference lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y | ||
) |
get a reference to the specified pixel
x | x index |
y | y index |
Definition at line 977 of file Mask.cc.
ImageBase< MaskPixelT >::PixelConstReference lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y | ||
) | const |
get the specified pixel (const version)
x | x index |
y | y index |
Definition at line 1000 of file Mask.cc.
bool lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
int | planeId | ||
) | const |
is the specified mask plane set in the specified pixel?
x | x index |
y | y index |
planeId | plane ID |
Definition at line 1023 of file Mask.cc.
ImageBase< MaskPixelT >::PixelReference lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
CheckIndices const & | check | ||
) |
get a reference to the specified pixel checking array bounds
x | x index |
y | y index |
check | Check array bounds? |
Definition at line 988 of file Mask.cc.
ImageBase< MaskPixelT >::PixelConstReference lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
CheckIndices const & | check | ||
) | const |
get the specified pixel with array checking (const version)
x | x index |
y | y index |
check | Check array bounds? |
Definition at line 1011 of file Mask.cc.
bool lsst.afw.image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
int | planeId, | ||
CheckIndices const & | check | ||
) | const |
is the specified mask plane set in the specified pixel, checking array bounds?
x | x index |
y | y index |
planeId | plane ID |
check | Check array bounds? |
Definition at line 1036 of file Mask.cc.
Mask< MaskPixelT > & lsst.afw.image::Mask< MaskPixelT >::operator= | ( | MaskPixelT const | rhs | ) |
Definition at line 538 of file Mask.cc.
Mask& lsst.afw.image::Mask< MaskPixelT >::operator= | ( | const Mask< MaskPixelT > & | rhs | ) |
void lsst.afw.image::Mask< MaskPixelT >::operator^= | ( | Mask< MaskPixelT > const & | rhs | ) |
XOR a Mask into a Mask.
Definition at line 1127 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::operator^= | ( | MaskPixelT const | rhs | ) |
XOR a bitmask into a Mask.
Definition at line 1119 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::operator|= | ( | Mask< MaskPixelT > const & | rhs | ) |
OR a Mask into a Mask.
Definition at line 1081 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::operator|= | ( | MaskPixelT const | rhs | ) |
OR a bitmask into a Mask.
Definition at line 1073 of file Mask.cc.
|
static |
void lsst.afw.image::Mask< MaskPixelT >::printMaskPlanes | ( | ) | const |
print the mask plane dictionary to std::cout
Definition at line 1234 of file Mask.cc.
|
inlinestatic |
Read a Mask from a regular FITS file.
[in] | filename | Name of the file to read. |
[in] | hdu | Number of the "header-data unit" to read (where 1 is the Primary HDU). The default value of 0 is interpreted as "the first HDU with NAXIS != 0". |
|
inlinestatic |
Read a Mask from a FITS RAM file.
[in] | manager | Object that manages the memory to be read. |
[in] | hdu | Number of the "header-data unit" to read (where 1 is the Primary HDU). The default value of 0 is interpreted as "the first HDU with NAXIS != 0". |
void lsst.afw.image::Mask< MaskPixelT >::removeAndClearMaskPlane | ( | const std::string & | name, |
bool const | removeFromDefault = false |
||
) |
Clear all pixels of the specified mask and remove the plane from the mask plane dictionary; optionally remove the plane from the default dictionary too.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
name | name of maskplane |
removeFromDefault | remove from default mask plane dictionary too |
Definition at line 769 of file Mask.cc.
|
static |
Definition at line 751 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::setMaskPlaneValues | ( | const int | plane, |
const int | x0, | ||
const int | x1, | ||
const int | y | ||
) |
Set the bit specified by "planeId" for pixels (x0, y) ... (x1, y)
Definition at line 1142 of file Mask.cc.
void lsst.afw.image::Mask< PixelT >::swap | ( | Mask< MaskPixelT > & | rhs | ) |
Definition at line 517 of file Mask.cc.
void lsst.afw.image::Mask< MaskPixelT >::writeFits | ( | std::string const & | fileName, |
boost::shared_ptr< lsst::daf::base::PropertySet const > | metadata = boost::shared_ptr< lsst::daf::base::PropertySet >() , |
||
std::string const & | mode = "w" |
||
) | const |
Write a mask to a regular FITS file.
[in] | fileName | Name of the file to write. |
[in] | metadata | Additional values to write to the header (may be null). |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
void lsst.afw.image::Mask< MaskPixelT >::writeFits | ( | fits::MemFileManager & | manager, |
boost::shared_ptr< lsst::daf::base::PropertySet const > | metadata = boost::shared_ptr< lsst::daf::base::PropertySet >() , |
||
std::string const & | mode = "w" |
||
) | const |
Write a mask to a FITS RAM file.
[in] | manager | Manager object for the memory block to write to. |
[in] | metadata | Additional values to write to the header (may be null). |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
void lsst.afw.image::Mask< MaskPixelT >::writeFits | ( | fits::Fits & | fitsfile, |
boost::shared_ptr< lsst::daf::base::PropertySet const > | metadata = boost::shared_ptr< lsst::daf::base::PropertySet const >() |
||
) | const |
Write a mask to an open FITS file object.
[in] | fitsfile | A FITS file already open to the desired HDU. |
[in] | metadata | Additional values to write to the header (may be null). |
|
private |
|
staticprivate |