LSST Applications g1653933729+a8ce1bb630,g171997e3ee+76e92115be,g1a997c3884+a8ce1bb630,g28da252d5a+4013ff5194,g2bbee38e9b+d6d0f9f6ae,g2bc492864f+d6d0f9f6ae,g2cdde0e794+ccb74358b7,g3156d2b45e+07302053f8,g347aa1857d+d6d0f9f6ae,g35bb328faa+a8ce1bb630,g3a166c0a6a+d6d0f9f6ae,g3e281a1b8c+130fae20e3,g4005a62e65+17cd334064,g414038480c+c9f68e2a12,g41af890bb2+3e1f62f438,g4e1a3235cc+9db7d56ad0,g7b55021d1b+7b623691d5,g80478fca09+334cc8d2bd,g82479be7b0+b568f6b267,g858d7b2824+37b39d8760,g9125e01d80+a8ce1bb630,ga5288a1d22+11cb34fefe,gae0086650b+a8ce1bb630,gb4ec7eb0ab+37b39d8760,gb58c049af0+d64f4d3760,gc081298178+284e133171,gc28159a63d+d6d0f9f6ae,gcf0d15dbbd+00fe2e0b07,gd6b7c0dfd1+8b62435e69,gda3e153d99+37b39d8760,gda6a2b7d83+00fe2e0b07,gdaeeff99f8+1711a396fd,gdd5a9049c5+23f3b3239a,ge2409df99d+5d9f551a54,ge33fd446bb+37b39d8760,ge79ae78c31+d6d0f9f6ae,gf0baf85859+2dea8344a2,gf5289d68f6+3777f3df5e,w.2024.41
LSST Data Management Base Package
|
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 | |
using | MaskPlaneDict = detail::MaskPlaneDict |
using | image_category = detail::Mask_tag |
using | SinglePixel = PixelT |
A single Pixel of the same type as those in the ImageBase. | |
using | Pixel = PixelT |
A pixel in this ImageBase. | |
using | PixelReference = typename Reference<PixelT>::type |
A Reference to a PixelT. | |
using | PixelConstReference = typename ConstReference<PixelT>::type |
A ConstReference to a PixelT. | |
using | xy_locator = typename _view_t::xy_locator |
An xy_locator. | |
using | const_xy_locator = typename _view_t::xy_locator::const_t |
A const_xy_locator. | |
using | iterator = typename _view_t::iterator |
An STL compliant iterator. | |
using | const_iterator = typename _const_view_t::iterator |
An STL compliant const iterator. | |
using | reverse_iterator = typename _view_t::reverse_iterator |
An STL compliant reverse iterator. | |
using | const_reverse_iterator = typename _const_view_t::reverse_iterator |
An STL compliant const reverse iterator. | |
using | x_iterator = typename _view_t::x_iterator |
An iterator for traversing the pixels in a row. | |
using | fast_iterator = x_iterator |
A fast STL compliant iterator for contiguous images N.b. | |
using | xy_x_iterator = typename _view_t::x_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. | |
using | const_x_iterator = typename _const_view_t::x_iterator |
A const iterator for traversing the pixels in a row. | |
using | y_iterator = typename _view_t::y_iterator |
An iterator for traversing the pixels in a column. | |
using | xy_y_iterator = typename _view_t::y_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. | |
using | const_y_iterator = typename _const_view_t::y_iterator |
A const iterator for traversing the pixels in a column. | |
using | Array = typename ndarray::Array<PixelT, 2, 1> |
A mutable ndarray representation of the image. | |
using | ConstArray = typename ndarray::Array<const PixelT, 2, 1> |
An immutable ndarray representation of the image. | |
Public Member Functions | |
Mask (unsigned int width, unsigned int height, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. | |
Mask (unsigned int width, unsigned int height, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. | |
Mask (lsst::geom::Extent2I const &dimensions=lsst::geom::Extent2I(), MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. | |
Mask (lsst::geom::Extent2I const &dimensions, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. | |
Mask (lsst::geom::Box2I const &bbox, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to 0x0. | |
Mask (lsst::geom::Box2I const &bbox, MaskPixelT initialValue, MaskPlaneDict const &planeDefs=MaskPlaneDict()) | |
Construct a Mask initialized to a specified value. | |
Mask (std::string const &fileName, int hdu=fits::DEFAULT_HDU, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false) | |
Construct a Mask by reading a regular FITS file. | |
Mask (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false) | |
Construct a Mask by reading a FITS image in memory. | |
Mask (fits::Fits &fitsfile, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool allowUnsafe=false) | |
Construct a Mask from an already-open FITS object. | |
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. | |
Mask (Mask &&src) | |
~Mask () override | |
Mask (const Mask &src, const lsst::geom::Box2I &bbox, ImageOrigin const origin=PARENT, const bool deep=false) | |
Construct a Mask from a subregion of another Mask. | |
Mask (ndarray::Array< MaskPixelT, 2, 1 > const &array, bool deep=false, lsst::geom::Point2I const &xy0=lsst::geom::Point2I()) | |
void | swap (Mask &rhs) |
Mask & | operator= (MaskPixelT const rhs) |
Mask & | operator= (const Mask &rhs) |
Mask & | operator= (Mask &&rhs) |
Mask & | operator|= (Mask const &rhs) |
OR a Mask into a Mask. | |
Mask & | operator|= (MaskPixelT const rhs) |
OR a bitmask into a Mask. | |
Mask & | operator&= (Mask const &rhs) |
AND a Mask into a Mask. | |
Mask & | operator&= (MaskPixelT const rhs) |
AND a bitmask into a Mask. | |
Mask | subset (lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const |
Return a subimage corresponding to the given box. | |
Mask | operator[] (lsst::geom::Box2I const &bbox) const |
Return a subimage corresponding to the given box (interpreted as PARENT coordinates). | |
Mask & | operator^= (Mask const &rhs) |
XOR a Mask into a Mask. | |
Mask & | operator^= (MaskPixelT const rhs) |
XOR a bitmask into a Mask. | |
ImageBase< MaskPixelT >::PixelReference | operator() (int x, int y) |
get a reference to the specified pixel | |
ImageBase< MaskPixelT >::PixelConstReference | operator() (int x, int y) const |
get the specified pixel (const version) | |
bool | operator() (int x, int y, int plane) const |
is the specified mask plane set in the specified pixel? | |
ImageBase< MaskPixelT >::PixelReference | operator() (int x, int y, CheckIndices const &check) |
get a reference to the specified pixel checking array bounds | |
ImageBase< MaskPixelT >::PixelConstReference | operator() (int x, int y, CheckIndices const &check) const |
get the specified pixel with array checking (const version) | |
bool | operator() (int x, int y, int plane, CheckIndices const &check) const |
is the specified mask plane set in the specified pixel, checking array bounds? | |
void | writeFits (std::string const &fileName, daf::base::PropertySet const *metadata=nullptr, std::string const &mode="w") const |
Write a mask to a regular FITS file. | |
void | writeFits (fits::MemFileManager &manager, daf::base::PropertySet const *metadata=nullptr, std::string const &mode="w") const |
Write a mask to a FITS RAM file. | |
void | writeFits (fits::Fits &fitsfile, daf::base::PropertySet const *metadata=nullptr) const |
Write a mask to an open FITS file object. | |
void | writeFits (std::string const &filename, fits::ImageWriteOptions const &options, std::string const &mode="w", daf::base::PropertySet const *header=nullptr) const |
Write a mask to a regular FITS file. | |
void | writeFits (fits::MemFileManager &manager, fits::ImageWriteOptions const &options, std::string const &mode="w", daf::base::PropertySet const *header=nullptr) const |
Write a mask to a FITS RAM file. | |
void | writeFits (fits::Fits &fitsfile, fits::ImageWriteOptions const &options, daf::base::PropertySet const *header=nullptr) const |
Write a mask to an open FITS file object. | |
std::string | getAsString (int x, int y) |
void | clearAllMaskPlanes () |
Clear all the pixels. | |
void | clearMaskPlane (int plane) |
Clear the specified bit in all pixels. | |
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) | |
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. | |
MaskPlaneDict const & | getMaskPlaneDict () const |
Return the Mask's maskPlaneDict. | |
void | printMaskPlanes () const |
print the mask plane dictionary to std::cout | |
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. | |
void | assign (ImageBase const &rhs, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT) |
Copy pixels from another image to a specified subregion of this image. | |
PixelReference | get (lsst::geom::Point2I const &index, ImageOrigin origin) |
Return a reference to a single pixel (with no bounds check). | |
PixelConstReference | get (lsst::geom::Point2I const &index, ImageOrigin origin) const |
Return a const reference to a single pixel (with no bounds check). | |
PixelReference | operator[] (lsst::geom::Point2I const &index) |
Return a reference to a single pixel in PARENT coordinates (with no bounds check). | |
PixelConstReference | operator[] (lsst::geom::Point2I const &index) const |
Return a reference to a single pixel in PARENT coordinates (with no bounds check). | |
int | getWidth () const |
Return the number of columns in the image. | |
int | getHeight () const |
Return the number of rows in the image. | |
int | getArea () const |
Return the area of the image. | |
int | getX0 () const |
Return the image's column-origin. | |
int | getY0 () const |
Return the image's row-origin. | |
lsst::geom::Point2I | getXY0 () const |
Return the image's origin. | |
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) | |
double | indexToPosition (double ind, lsst::afw::image::xOrY const xy) const |
Convert image index to image position. | |
lsst::geom::Extent2I | getDimensions () const |
Return the image's size; useful for passing to constructors. | |
void | swap (ImageBase &rhs) |
Array | getArray () |
ConstArray | getArray () const |
iterator | begin () const |
Return an STL compliant iterator to the start of the image. | |
fast_iterator | begin (bool contiguous) const |
Return a fast STL compliant iterator to the start of the image which must be contiguous. | |
iterator | end () const |
Return an STL compliant iterator to the end of the image. | |
fast_iterator | end (bool contiguous) const |
Return a fast STL compliant iterator to the end of the image which must be contiguous. | |
reverse_iterator | rbegin () const |
Return an STL compliant reverse iterator to the start of the image. | |
reverse_iterator | rend () const |
Return an STL compliant reverse iterator to the end of the image. | |
iterator | at (int x, int y) const |
Return an STL compliant iterator at the point (x, y) | |
x_iterator | row_begin (int y) const |
Return an x_iterator to the start of the y 'th row. | |
x_iterator | row_end (int y) const |
Return an x_iterator to the end of the y 'th row. | |
x_iterator | x_at (int x, int y) const |
Return an x_iterator to the point (x, y) in the image. | |
y_iterator | col_begin (int x) const |
Return an y_iterator to the start of the y 'th row. | |
y_iterator | col_end (int x) const |
Return an y_iterator to the start of the y 'th row. | |
y_iterator | y_at (int x, int y) const |
Return an y_iterator to the point (x, y) in the image. | |
xy_locator | xy_at (int x, int y) const |
Return an xy_locator at the point (x, y) in the image. | |
void | setXY0 (lsst::geom::Point2I const origin) |
Set the ImageBase's origin. | |
void | setXY0 (int const x0, int const y0) |
Set the ImageBase's origin. | |
lsst::geom::Box2I | getBBox (ImageOrigin origin=PARENT) const |
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. | |
static Mask | readFits (std::string const &filename, int hdu=fits::DEFAULT_HDU) |
Read a Mask from a regular FITS file. | |
static Mask | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read a Mask from a FITS RAM file. | |
static std::string | interpret (MaskPixelT value) |
Interpret a mask value as a comma-separated list of mask plane names. | |
static MaskPlaneDict | parseMaskPlaneMetadata (std::shared_ptr< lsst::daf::base::PropertySet const > metadata) |
Given a PropertySet that contains the MaskPlane assignments, setup the MaskPlanes. | |
static void | clearMaskPlaneDict () |
Reset the maskPlane dictionary. | |
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. | |
static MaskPixelT | getPlaneBitMask (const std::string &name) |
Return the bitmask corresponding to a plane name. | |
static int | getNumPlanesMax () |
static int | getNumPlanesUsed () |
static void | addMaskPlanesToMetadata (std::shared_ptr< lsst::daf::base::PropertySet >) |
Given a PropertySet, replace any existing MaskPlane assignments with the current ones. | |
template<typename SinglePixelT > | |
static SinglePixel | PixelCast (SinglePixelT rhs) |
Convert a type to our SinglePixel type. | |
Protected Member Functions | |
_view_t | _getRawView () const |
bool | isContiguous () const |
Static Protected Member Functions | |
static _view_t | _allocateView (lsst::geom::Extent2I const &dimensions, Manager::Ptr &manager) |
static _view_t | _makeSubView (lsst::geom::Extent2I const &dimensions, lsst::geom::Extent2I const &offset, const _view_t &view) |
Friends | |
class | MaskFitsReader |
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 rayDETECTED
This pixel lies within an object's FootprintDETECTED_NEGATIVE
This pixel lies within an object's Footprint, and the detection was looking for pixels below a specified levelEDGE
This pixel is too close to the edge to be processed properlyINTRP
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
|
inherited |
A mutable ndarray representation of the image.
Definition at line 149 of file ImageBase.h.
|
inherited |
An STL compliant const iterator.
Definition at line 127 of file ImageBase.h.
|
inherited |
An STL compliant const reverse iterator.
Definition at line 131 of file ImageBase.h.
|
inherited |
A const iterator for traversing the pixels in a row.
Definition at line 141 of file ImageBase.h.
|
inherited |
A const_xy_locator.
Definition at line 123 of file ImageBase.h.
|
inherited |
A const iterator for traversing the pixels in a column.
Definition at line 147 of file ImageBase.h.
|
inherited |
An immutable ndarray representation of the image.
Definition at line 151 of file ImageBase.h.
|
inherited |
A fast STL compliant iterator for contiguous images N.b.
The order of pixel access is undefined
Definition at line 137 of file ImageBase.h.
using lsst::afw::image::Mask< MaskPixelT >::image_category = detail::Mask_tag |
|
inherited |
An STL compliant iterator.
Definition at line 125 of file ImageBase.h.
using lsst::afw::image::Mask< MaskPixelT >::MaskPlaneDict = detail::MaskPlaneDict |
|
inherited |
A pixel in this ImageBase.
Definition at line 115 of file ImageBase.h.
|
inherited |
A ConstReference to a PixelT.
Definition at line 119 of file ImageBase.h.
|
inherited |
A Reference to a PixelT.
Definition at line 117 of file ImageBase.h.
|
inherited |
An STL compliant reverse iterator.
Definition at line 129 of file ImageBase.h.
|
inherited |
A single Pixel of the same type as those in the ImageBase.
Definition at line 113 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row.
Definition at line 133 of file ImageBase.h.
|
inherited |
An xy_locator.
Definition at line 121 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row, created from an xy_locator.
Definition at line 139 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row, created from an xy_locator.
Definition at line 145 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a column.
Definition at line 143 of file ImageBase.h.
|
explicit |
Construct a Mask initialized to 0x0.
width | number of columns |
height | number of rows |
planeDefs | desired mask planes |
Definition at line 62 of file Mask.cc.
|
explicit |
|
explicit |
Construct a Mask initialized to 0x0.
dimensions | Number of columns, rows |
planeDefs | desired mask planes |
|
explicit |
Construct a Mask initialized to a specified value.
dimensions | Number of columns, rows |
initialValue | Initial value |
planeDefs | desired mask planes |
|
explicit |
|
explicit |
|
explicit |
Construct a Mask by reading a regular FITS file.
[in] | fileName | File to read. |
[in] | hdu | HDU to read, 0-indexed (i.e. 0=Primary HDU). The special value of afw::fits::DEFAULT_HDU 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. |
[in] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
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, 0-indexed (i.e. 0=Primary HDU). The special value of afw::fits::DEFAULT_HDU 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. |
[in] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
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. |
[in] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
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 220 of file Mask.h.
lsst::afw::image::Mask< MaskPixelT >::Mask | ( | Mask< MaskPixelT > && | src | ) |
|
overridedefault |
lsst::afw::image::Mask< MaskPixelT >::Mask | ( | const Mask< MaskPixelT > & | src, |
const lsst::geom::Box2I & | bbox, | ||
ImageOrigin const | origin = PARENT, | ||
const bool | deep = false ) |
|
explicit |
Definition at line 121 of file Mask.cc.
|
staticprotectedinherited |
Definition at line 45 of file Image.cc.
|
inlineprotectedinherited |
Definition at line 465 of file ImageBase.h.
|
staticprotectedinherited |
Definition at line 65 of file Image.cc.
|
static |
Definition at line 264 of file Mask.cc.
|
static |
Given a PropertySet, replace any existing MaskPlane assignments with the current ones.
Definition at line 573 of file Mask.cc.
|
inherited |
Copy pixels from another image to a specified subregion of this image.
[in] | rhs | source image whose pixels are to be copied into this image (the destination) |
[in] | bbox | subregion of this image to set; if empty (the default) then all pixels are set |
[in] | origin | origin of bbox: if PARENT then the lower left pixel of this image is at xy0 if LOCAL then the lower left pixel of this image is at 0,0 |
lsst::pex::exceptions::LengthError | if the dimensions of rhs and the specified subregion of this image do not match. |
Definition at line 153 of file Image.cc.
|
inherited |
|
inherited |
Return an STL compliant iterator to the start of the image.
Note that this isn't especially efficient; see Image Iterators for a discussion
Definition at line 250 of file Image.cc.
|
inherited |
Return a fast STL compliant iterator to the start of the image which must be contiguous.
contiguous | Pixels are contiguous (must be true) |
lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 275 of file Image.cc.
void lsst::afw::image::Mask< MaskPixelT >::clearAllMaskPlanes | ( | ) |
void lsst::afw::image::Mask< MaskPixelT >::clearMaskPlane | ( | int | plane | ) |
Clear the specified bit in all pixels.
|
static |
|
inlineinherited |
Return an y_iterator
to the start of the y
'th row.
Incrementing an y_iterator
moves it up the column
Definition at line 413 of file ImageBase.h.
|
inlineinherited |
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 masterPlaneDict
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 405 of file Mask.cc.
|
inherited |
|
inherited |
Return a fast STL compliant iterator to the end of the image which must be contiguous.
contiguous | Pixels are contiguous (must be true) |
lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 287 of file Image.cc.
|
inherited |
Return a reference to a single pixel (with no bounds check).
Definition at line 209 of file Image.cc.
|
inherited |
|
inlineinherited |
Return the area of the image.
Definition at line 298 of file ImageBase.h.
|
inherited |
Definition at line 476 of file ImageBase.h.
|
inherited |
Definition at line 491 of file ImageBase.h.
|
inline |
Definition at line 448 of file Mask.h.
|
inlineinherited |
Definition at line 445 of file ImageBase.h.
|
inlineinherited |
Return the image's size; useful for passing to constructors.
Definition at line 356 of file ImageBase.h.
|
inlineinherited |
Return the number of rows in the image.
Definition at line 296 of file ImageBase.h.
|
static |
Return the mask plane number corresponding to a plane name.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 354 of file Mask.cc.
detail::MaskPlaneDict const & lsst::afw::image::Mask< MaskPixelT >::getMaskPlaneDict | ( | ) | const |
|
inlinestatic |
|
static |
|
static |
Return the bitmask corresponding to a plane name.
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 371 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 |
|
inlineinherited |
Return the number of columns in the image.
Definition at line 294 of file ImageBase.h.
|
inlineinherited |
Return the image's column-origin.
This will usually be 0 except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 306 of file ImageBase.h.
|
inlineinherited |
Return the image's origin.
This will usually be (0, 0) except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 323 of file ImageBase.h.
|
inlineinherited |
Return the image's row-origin.
This will usually be 0 except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 314 of file ImageBase.h.
|
inlineinherited |
Convert image index to image position.
The LSST indexing convention is:
ind | image index |
xy | Is this a column or row coordinate? |
Definition at line 349 of file ImageBase.h.
|
static |
|
inlineprotectedinherited |
Definition at line 467 of file ImageBase.h.
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator&= | ( | Mask< MaskPixelT > const & | rhs | ) |
Definition at line 529 of file Mask.cc.
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator&= | ( | MaskPixelT const | rhs | ) |
AND a bitmask into a Mask.
Definition at line 523 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 461 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 |
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? |
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? |
bool lsst::afw::image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
int | plane ) const |
bool lsst::afw::image::Mask< MaskPixelT >::operator() | ( | int | x, |
int | y, | ||
int | plane, | ||
CheckIndices const & | check ) const |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator= | ( | const Mask< MaskPixelT > & | rhs | ) |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator= | ( | Mask< MaskPixelT > && | rhs | ) |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator= | ( | MaskPixelT const | rhs | ) |
|
inline |
Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
Definition at line 281 of file Mask.h.
|
inlineinherited |
Return a reference to a single pixel in PARENT coordinates (with no bounds check).
Definition at line 288 of file ImageBase.h.
|
inlineinherited |
Return a reference to a single pixel in PARENT coordinates (with no bounds check).
Definition at line 291 of file ImageBase.h.
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator^= | ( | Mask< MaskPixelT > const & | rhs | ) |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator^= | ( | MaskPixelT const | rhs | ) |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator|= | ( | Mask< MaskPixelT > const & | rhs | ) |
Mask< MaskPixelT > & lsst::afw::image::Mask< MaskPixelT >::operator|= | ( | MaskPixelT const | rhs | ) |
|
static |
Given a PropertySet that contains the MaskPlane assignments, setup the MaskPlanes.
metadata | metadata from a Mask |
Definition at line 601 of file Mask.cc.
|
inlinestaticinherited |
Convert a type to our SinglePixel type.
Definition at line 158 of file ImageBase.h.
|
inlineinherited |
Convert image position to index (nearest integer and fractional parts)
pos | image position |
xy | Is this a column or row coordinate? |
Definition at line 330 of file ImageBase.h.
void lsst::afw::image::Mask< MaskPixelT >::printMaskPlanes | ( | ) | const |
|
inherited |
|
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 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU is interpreted as "the first HDU with NAXIS != 0". |
|
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 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU 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.
name | of maskplane |
removeFromDefault | remove from default mask plane dictionary too |
lsst::pex::exceptions::InvalidParameterError | if plane is invalid |
Definition at line 313 of file Mask.cc.
|
static |
Definition at line 302 of file Mask.cc.
|
inherited |
|
inlineinherited |
Return an x_iterator
to the start of the y
'th row.
Incrementing an x_iterator
moves it across the row
Definition at line 401 of file ImageBase.h.
|
inlineinherited |
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 564 of file Mask.cc.
|
inlineinherited |
Set the ImageBase's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 443 of file ImageBase.h.
|
inlineinherited |
Set the ImageBase's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 434 of file ImageBase.h.
|
inline |
Return a subimage corresponding to the given box.
bbox | Bounding box of the subimage returned. |
origin | Origin bbox is rleative to; PARENT accounts for xy0, LOCAL does not. |
This method is wrapped as getitem in Python.
|
inherited |
void lsst::afw::image::Mask< PixelT >::swap | ( | Mask< MaskPixelT > & | rhs | ) |
void lsst::afw::image::Mask< MaskPixelT >::writeFits | ( | fits::Fits & | fitsfile, |
daf::base::PropertySet const * | metadata = nullptr ) 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). |
void lsst::afw::image::Mask< MaskPixelT >::writeFits | ( | fits::Fits & | fitsfile, |
fits::ImageWriteOptions const & | options, | ||
daf::base::PropertySet const * | header = nullptr ) const |
Write a mask to an open FITS file object.
[in] | fitsfile | A FITS file already open to the desired HDU. |
[in] | options | Options controlling writing of FITS image. |
[in] | header | Additional values to write to the header (may be null). |
void lsst::afw::image::Mask< MaskPixelT >::writeFits | ( | fits::MemFileManager & | manager, |
daf::base::PropertySet const * | metadata = nullptr, | ||
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::MemFileManager & | manager, |
fits::ImageWriteOptions const & | options, | ||
std::string const & | mode = "w", | ||
daf::base::PropertySet const * | header = nullptr ) const |
Write a mask to a FITS RAM file.
[in] | manager | Manager object for the memory block to write to. |
[in] | options | Options controlling writing of FITS image. |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
[in] | header | Additional values to write to the header (may be null). |
void lsst::afw::image::Mask< MaskPixelT >::writeFits | ( | std::string const & | fileName, |
daf::base::PropertySet const * | metadata = nullptr, | ||
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 | ( | std::string const & | filename, |
fits::ImageWriteOptions const & | options, | ||
std::string const & | mode = "w", | ||
daf::base::PropertySet const * | header = nullptr ) const |
Write a mask to a regular FITS file.
[in] | filename | Name of the file to write. |
[in] | options | Options controlling writing of FITS image. |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
[in] | header | Additional values to write to the header (may be null). |
|
inlineinherited |
Return an x_iterator
to the point (x, y)
in the image.
Definition at line 407 of file ImageBase.h.
|
inlineinherited |
Return an xy_locator
at the point (x, y)
in the image.
Locators may be used to access a patch in an image
Definition at line 425 of file ImageBase.h.
|
inlineinherited |
Return an y_iterator
to the point (x, y)
in the image.
Definition at line 419 of file ImageBase.h.
|
friend |