LSSTApplications  19.0.0-14-gb0260a2+64befe7c1c,20.0.0+0b340dd7c4,20.0.0+1540ce6389,20.0.0+7c6b12c2f9,20.0.0+ae956f52c5,20.0.0+be870186d9,20.0.0+e2e26847c2,20.0.0-1-g04bee24+7c6b12c2f9,20.0.0-1-g10df615+fbe45b1aff,20.0.0-1-g253301a+7c6b12c2f9,20.0.0-1-g2b7511a+46a6078777,20.0.0-1-g4d801e7+9d50d6c21a,20.0.0-1-g5b95a8c+8ebfc75efb,20.0.0-1-gb058bd0+46a6078777,20.0.0-1-gb88604f+acecce4127,20.0.0-1-gc96f8cb+016e330d09,20.0.0-1-gedffbd8+83814edeba,20.0.0-10-g0891cd99+a5f14e9acb,20.0.0-10-g9a20bd332+576ca7b471,20.0.0-17-gcdbda88+0e26bfb1e6,20.0.0-2-g4dae9ad+016e330d09,20.0.0-2-g61b8584+85c46248f3,20.0.0-2-gb780d76+f45b7d88f4,20.0.0-21-g9bbb7f7+016e330d09,20.0.0-22-gc512666+f30f3883a7,20.0.0-23-g8900aa8+68630f7098,20.0.0-3-g1653f94+85c46248f3,20.0.0-3-g4cc78c6+63636aeed8,20.0.0-3-g750bffe+e05f822de9,20.0.0-3-gbd60e8c+ff10c6d78d,20.0.0-32-g15a0e07c+a4c9d0309b,20.0.0-4-g97dc21a+68630f7098,20.0.0-4-gfea843c+f45b7d88f4,20.0.0-5-g357b56b+f45b7d88f4,20.0.0-6-g9a5b7a1+b0f8c2be93,20.0.0-60-gad89340+e4dd172200,20.0.0-7-gcda7bf1+673816f70c,w.2020.43
LSSTDataManagementBasePackage
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > Class Template Reference

A class to manipulate images, masks, and variance as a single object. More...

#include <MaskedImage.h>

Classes

class  const_MaskedImageIterator
 An const iterator to the MaskedImage. More...
 
class  const_MaskedImageLocator
 A const locator for the MaskedImage. More...
 
struct  ImageTypeFactory
 A templated class to return this classes' type (present in Image/Mask/MaskedImage) More...
 
class  MaskedImageIterator
 An iterator to the MaskedImage. More...
 
class  MaskedImageIteratorBase
 The base class for MaskedImageIterators (const and non-const) More...
 
class  MaskedImageLocator
 A locator for the MaskedImage. More...
 
class  MaskedImageLocatorBase
 The base class for MaskedImageLocators (const and non-const) More...
 

Public Types

typedef std::shared_ptr< image::Image< ImagePixelT > > ImagePtr
 shared pointer to the Image More...
 
typedef std::shared_ptr< image::Mask< MaskPixelT > > MaskPtr
 shared pointer to the Mask More...
 
typedef std::shared_ptr< image::Image< VariancePixelT > > VariancePtr
 shared pointer to the variance Image More...
 
typedef Mask< MaskPixelT >::MaskPlaneDict MaskPlaneDict
 The Mask's MaskPlaneDict. More...
 
typedef lsst::afw::image::Image< VariancePixelT > Variance
 
typedef lsst::afw::image::Image< ImagePixelT > Image
 
typedef lsst::afw::image::Mask< MaskPixelT > Mask
 
typedef detail::MaskedImage_tag image_category
 
typedef lsst::afw::image::pixel::Pixel< ImagePixelT, MaskPixelT, VariancePixelT > Pixel
 A Pixel in the MaskedImage. More...
 
typedef lsst::afw::image::pixel::SinglePixel< ImagePixelT, MaskPixelT, VariancePixelT > SinglePixel
 A single Pixel of the same type as those in the MaskedImage. More...
 
typedef MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iteratoriterator
 
typedef const_MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iteratorconst_iterator
 
typedef MaskedImageIterator< typename Image::reverse_iterator, typename Mask::reverse_iterator, typename Variance::reverse_iteratorreverse_iterator
 
typedef MaskedImageIterator< typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iteratorx_iterator
 An iterator to a row of a MaskedImage. More...
 
typedef const_MaskedImageIterator< typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iteratorconst_x_iterator
 A const_iterator to a row of a MaskedImage. More...
 
typedef x_iterator fast_iterator
 A fast STL compliant iterator for contiguous images N.b. More...
 
typedef MaskedImageIterator< typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iteratory_iterator
 An iterator to a column of a MaskedImage. More...
 
typedef const_MaskedImageIterator< typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iteratorconst_y_iterator
 A const_iterator to a column of a MaskedImage. More...
 
typedef MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locatorxy_locator
 A locator for a MaskedImage. More...
 
typedef const_MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locatorconst_xy_locator
 A const_locator for a MaskedImage. More...
 
typedef MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator >::x_iterator xy_x_iterator
 an x_iterator associated with an xy_locator More...
 
typedef MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator >::y_iterator xy_y_iterator
 an y_iterator associated with an xy_locator More...
 

Public Member Functions

 MaskedImage (unsigned int width, unsigned int height, MaskPlaneDict const &planeDict=MaskPlaneDict())
 Construct from a supplied dimensions. More...
 
 MaskedImage (lsst::geom::Extent2I const &dimensions=lsst::geom::Extent2I(), MaskPlaneDict const &planeDict=MaskPlaneDict())
 Construct from a supplied dimensions. More...
 
 MaskedImage (ImagePtr image, MaskPtr mask=MaskPtr(), VariancePtr variance=VariancePtr())
 Construct from a supplied Image and optional Mask and Variance. More...
 
 MaskedImage (lsst::geom::Box2I const &bbox, MaskPlaneDict const &planeDict=MaskPlaneDict())
 Create an MaskedImage of the specified size. More...
 
 MaskedImage (std::string const &fileName, std::shared_ptr< daf::base::PropertySet > metadata=std::shared_ptr< daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, std::shared_ptr< daf::base::PropertySet > imageMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > maskMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > varianceMetadata=std::shared_ptr< daf::base::PropertySet >(), bool allowUnsafe=false)
 Construct a MaskedImage by reading a regular FITS file. More...
 
 MaskedImage (fits::MemFileManager &manager, std::shared_ptr< daf::base::PropertySet > metadata=std::shared_ptr< daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, std::shared_ptr< daf::base::PropertySet > imageMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > maskMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > varianceMetadata=std::shared_ptr< daf::base::PropertySet >(), bool allowUnsafe=false)
 Construct a MaskedImage by reading a FITS image in memory. More...
 
 MaskedImage (fits::Fits &fitsfile, std::shared_ptr< daf::base::PropertySet > metadata=std::shared_ptr< daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, std::shared_ptr< daf::base::PropertySet > imageMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > maskMetadata=std::shared_ptr< daf::base::PropertySet >(), std::shared_ptr< daf::base::PropertySet > varianceMetadata=std::shared_ptr< daf::base::PropertySet >(), bool allowUnsafe=false)
 Construct a MaskedImage from an already-open FITS object. More...
 
 MaskedImage (MaskedImage const &rhs, bool const deep=false)
 Copy constructor; shallow, unless deep is true. More...
 
 MaskedImage (MaskedImage &&rhs)
 
 MaskedImage (MaskedImage const &rhs, lsst::geom::Box2I const &bbox, ImageOrigin const origin=PARENT, bool const deep=false)
 Copy constructor of the pixels specified by bbox; shallow, unless deep is true. More...
 
template<typename OtherPixelT >
 MaskedImage (MaskedImage< OtherPixelT, MaskPixelT, VariancePixelT > const &rhs, const bool deep)
 generalised copy constructor; defined here in the header so that the compiler can instantiate N(N-1)/2 conversions between N ImageBase types. More...
 
MaskedImageoperator= (MaskedImage const &rhs)
 Make the lhs use the rhs's pixels. More...
 
MaskedImageoperator= (MaskedImage &&rhs)
 
virtual ~MaskedImage ()=default
 
void swap (MaskedImage &rhs)
 
MaskedImageoperator= (Pixel const &rhs)
 Set the pixels in the MaskedImage to the rhs. More...
 
MaskedImageoperator= (SinglePixel const &rhs)
 Set the pixels in the MaskedImage to the rhs. More...
 
MaskedImage subset (lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
 Return a subimage corresponding to the given box. More...
 
MaskedImage operator[] (lsst::geom::Box2I const &bbox) const
 Return a subimage corresponding to the given box (interpreted as PARENT coordinates). More...
 
MaskedImageoperator<<= (MaskedImage const &rhs)
 Copy the pixels from the rhs to the lhs. More...
 
void assign (MaskedImage const &rhs, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT)
 Copy pixels from another masked image to a specified subregion of this masked image. More...
 
MaskedImageoperator+= (ImagePixelT const rhs)
 Add a scalar rhs to a MaskedImage. More...
 
MaskedImageoperator+= (MaskedImage const &rhs)
 Add a MaskedImage rhs to a MaskedImage. More...
 
MaskedImageoperator+= (lsst::afw::image::Image< ImagePixelT > const &rhs)
 
MaskedImageoperator+= (lsst::afw::math::Function2< double > const &function)
 
void scaledPlus (double const c, MaskedImage const &rhs)
 Add a scaled MaskedImage c*rhs to a MaskedImage. More...
 
MaskedImageoperator-= (ImagePixelT const rhs)
 Subtract a scalar rhs from a MaskedImage. More...
 
MaskedImageoperator-= (MaskedImage const &rhs)
 Subtract a MaskedImage rhs from a MaskedImage. More...
 
MaskedImageoperator-= (lsst::afw::image::Image< ImagePixelT > const &rhs)
 
MaskedImageoperator-= (lsst::afw::math::Function2< double > const &function)
 
void scaledMinus (double const c, MaskedImage const &rhs)
 Subtract a scaled MaskedImage c*rhs from a MaskedImage. More...
 
MaskedImageoperator*= (ImagePixelT const rhs)
 
MaskedImageoperator*= (MaskedImage const &rhs)
 
MaskedImageoperator*= (lsst::afw::image::Image< ImagePixelT > const &rhs)
 
void scaledMultiplies (double const c, MaskedImage const &rhs)
 
MaskedImageoperator/= (ImagePixelT const rhs)
 
MaskedImageoperator/= (MaskedImage const &rhs)
 
MaskedImageoperator/= (lsst::afw::image::Image< ImagePixelT > const &rhs)
 
void scaledDivides (double const c, MaskedImage const &rhs)
 
void writeFits (std::string const &fileName, std::shared_ptr< daf::base::PropertySet const > metadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > imageMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > maskMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > varianceMetadata=std::shared_ptr< daf::base::PropertySet const >()) const
 Write a MaskedImage to a regular FITS file. More...
 
void writeFits (fits::MemFileManager &manager, std::shared_ptr< daf::base::PropertySet const > metadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > imageMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > maskMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > varianceMetadata=std::shared_ptr< daf::base::PropertySet const >()) const
 Write a MaskedImage to a FITS RAM file. More...
 
void writeFits (fits::Fits &fitsfile, std::shared_ptr< daf::base::PropertySet const > metadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > imageMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > maskMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > varianceMetadata=std::shared_ptr< daf::base::PropertySet const >()) const
 Write a MaskedImage to a FITS file. More...
 
void writeFits (std::string const &fileName, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions, std::shared_ptr< daf::base::PropertySet const > metadata=nullptr, std::shared_ptr< daf::base::PropertySet const > imageMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > maskMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > varianceMetadata=nullptr) const
 Write a MaskedImage to a FITS file. More...
 
void writeFits (fits::MemFileManager &manager, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions, std::shared_ptr< daf::base::PropertySet const > metadata=nullptr, std::shared_ptr< daf::base::PropertySet const > imageMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > maskMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > varianceMetadata=nullptr) const
 Write a MaskedImage to a FITS file. More...
 
void writeFits (fits::Fits &fitsfile, fits::ImageWriteOptions const &imageOptions, fits::ImageWriteOptions const &maskOptions, fits::ImageWriteOptions const &varianceOptions, std::shared_ptr< daf::base::PropertySet const > metadata=nullptr, std::shared_ptr< daf::base::PropertySet const > imageMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > maskMetadata=nullptr, std::shared_ptr< daf::base::PropertySet const > varianceMetadata=nullptr) const
 Write a MaskedImage to a FITS file. More...
 
ImagePtr getImage () const
 Return a (shared_ptr to) the MaskedImage's image. More...
 
void setImage (Image const &other)
 Set the image plane's pixel values to those of another Image. More...
 
MaskPtr getMask () const
 Return a (shared_ptr to) the MaskedImage's mask. More...
 
void setMask (Mask const &other)
 Set the mask plane's pixel values to those of another Mask. More...
 
void setVariance (Variance const &other)
 Set the variance plane's pixel values to those of another Image. More...
 
VariancePtr getVariance () const
 Return a (shared_ptr to) the MaskedImage's variance. More...
 
int getWidth () const
 Return the number of columns in the image. More...
 
int getHeight () const
 Return the number of rows in the image. More...
 
lsst::geom::Extent2I getDimensions () const
 
lsst::geom::Box2I getBBox (ImageOrigin const origin=PARENT) const
 
int getX0 () const
 Return the image's column-origin. More...
 
int getY0 () const
 Return the image's row-origin. More...
 
lsst::geom::Point2I getXY0 () const
 Return the image's origin. More...
 
void setXY0 (int const x0, int const y0)
 Set the MaskedImage's origin. More...
 
void setXY0 (lsst::geom::Point2I const origin)
 Set the MaskedImage's origin. More...
 
double indexToPosition (double ind, lsst::afw::image::xOrY const xy) const
 Convert image index to image position (see Image::indexToPosition) More...
 
std::pair< int, double > positionToIndex (double const pos, lsst::afw::image::xOrY const xy) const
 Convert image position to index (see Image::positionToIndex) More...
 
iterator begin () const
 Return an iterator to the start of the image. More...
 
iterator end () const
 Return an iterator to the end of the image. More...
 
iterator at (int const x, int const y) const
 Return an iterator at the point (x, y) More...
 
reverse_iterator rbegin () const
 Return a reverse_iterator to the start of the image. More...
 
reverse_iterator rend () const
 Return a reverse_iterator to the end of the image. More...
 
fast_iterator begin (bool contiguous) const
 Fast iterators to contiguous images. More...
 
fast_iterator end (bool contiguous) const
 Return a fast iterator to the end of the image, which must be contiguous Note that the order in which pixels are visited is undefined. More...
 
x_iterator row_begin (int y) const
 Return an x_iterator to the start of the image. More...
 
x_iterator row_end (int y) const
 Return an x_iterator to the end of the image. More...
 
x_iterator x_at (int x, int y) const
 Return an x_iterator at the point (x, y) More...
 
y_iterator col_begin (int x) const
 Return an y_iterator to the start of the image. More...
 
y_iterator col_end (int x) const
 Return an y_iterator to the end of the image. More...
 
y_iterator y_at (int x, int y) const
 Return an y_iterator at the point (x, y) More...
 
xy_locator xy_at (int x, int y) const
 Return an xy_locator at the point (x, y) More...
 

Static Public Member Functions

static MaskedImage readFits (std::string const &filename)
 Read a MaskedImage from a regular FITS file. More...
 
static MaskedImage readFits (fits::MemFileManager &manager)
 Read a MaskedImage from a FITS RAM file. More...
 

Detailed Description

template<typename ImagePixelT, typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
class lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >

A class to manipulate images, masks, and variance as a single object.

Examples
imageStatistics.cc, maskedImage1.cc, and maskedImage2.cc.

Definition at line 73 of file MaskedImage.h.

Member Typedef Documentation

◆ const_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef const_MaskedImageIterator<typename Image::iterator, typename Mask::iterator, typename Variance::iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_iterator

Definition at line 543 of file MaskedImage.h.

◆ const_x_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef const_MaskedImageIterator<typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_x_iterator

A const_iterator to a row of a MaskedImage.

Definition at line 560 of file MaskedImage.h.

◆ const_xy_locator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef const_MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_xy_locator

A const_locator for a MaskedImage.

Definition at line 581 of file MaskedImage.h.

◆ const_y_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef const_MaskedImageIterator<typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_y_iterator

A const_iterator to a column of a MaskedImage.

Definition at line 572 of file MaskedImage.h.

◆ fast_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::fast_iterator

A fast STL compliant iterator for contiguous images N.b.

The order of pixel access is undefined

Definition at line 564 of file MaskedImage.h.

◆ Image

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef lsst::afw::image::Image<ImagePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Image

Definition at line 85 of file MaskedImage.h.

◆ image_category

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef detail::MaskedImage_tag lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::image_category

Definition at line 88 of file MaskedImage.h.

◆ ImagePtr

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef std::shared_ptr<image::Image<ImagePixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::ImagePtr

shared pointer to the Image

Definition at line 76 of file MaskedImage.h.

◆ iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageIterator<typename Image::iterator, typename Mask::iterator, typename Variance::iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator

Definition at line 539 of file MaskedImage.h.

◆ Mask

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef lsst::afw::image::Mask<MaskPixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Mask

Definition at line 86 of file MaskedImage.h.

◆ MaskPlaneDict

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef Mask<MaskPixelT>::MaskPlaneDict lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskPlaneDict

The Mask's MaskPlaneDict.

Definition at line 82 of file MaskedImage.h.

◆ MaskPtr

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef std::shared_ptr<image::Mask<MaskPixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskPtr

shared pointer to the Mask

Definition at line 78 of file MaskedImage.h.

◆ Pixel

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Pixel

A Pixel in the MaskedImage.

Definition at line 111 of file MaskedImage.h.

◆ reverse_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageIterator<typename Image::reverse_iterator, typename Mask::reverse_iterator, typename Variance::reverse_iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::reverse_iterator

Definition at line 547 of file MaskedImage.h.

◆ SinglePixel

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::SinglePixel

A single Pixel of the same type as those in the MaskedImage.

Definition at line 113 of file MaskedImage.h.

◆ Variance

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef lsst::afw::image::Image<VariancePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Variance

Definition at line 84 of file MaskedImage.h.

◆ VariancePtr

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef std::shared_ptr<image::Image<VariancePixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::VariancePtr

shared pointer to the variance Image

Definition at line 80 of file MaskedImage.h.

◆ x_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageIterator<typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::x_iterator

An iterator to a row of a MaskedImage.

Definition at line 556 of file MaskedImage.h.

◆ xy_locator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::xy_locator

A locator for a MaskedImage.

Definition at line 577 of file MaskedImage.h.

◆ xy_x_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator>::x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::xy_x_iterator

an x_iterator associated with an xy_locator

Definition at line 585 of file MaskedImage.h.

◆ xy_y_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator>::y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::xy_y_iterator

an y_iterator associated with an xy_locator

Definition at line 588 of file MaskedImage.h.

◆ y_iterator

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
typedef MaskedImageIterator<typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::y_iterator

An iterator to a column of a MaskedImage.

Definition at line 568 of file MaskedImage.h.

Constructor & Destructor Documentation

◆ MaskedImage() [1/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( unsigned int  width,
unsigned int  height,
MaskPlaneDict const &  planeDict = MaskPlaneDict() 
)
explicit

Construct from a supplied dimensions.

The Image, Mask, and Variance will be set to zero

Parameters
widthnumber of columns
heightnumber of rows
planeDictMake Mask conform to this mask layout (ignore if empty)

Definition at line 48 of file MaskedImage.cc.

50  : _image(new Image(width, height)),
51  _mask(new Mask(width, height, planeDict)),
52  _variance(new Variance(width, height)) {
53  *_image = 0;
54  *_mask = 0x0;
55  *_variance = 0;
56 }

◆ MaskedImage() [2/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( lsst::geom::Extent2I const &  dimensions = lsst::geom::Extent2I(),
MaskPlaneDict const &  planeDict = MaskPlaneDict() 
)
explicit

Construct from a supplied dimensions.

The Image, Mask, and Variance will be set to zero

Parameters
dimensionsNumber of columns, rows in image
planeDictMake Mask conform to this mask layout (ignore if empty)

Definition at line 59 of file MaskedImage.cc.

61  : _image(new Image(dimensions)),
62  _mask(new Mask(dimensions, planeDict)),
63  _variance(new Variance(dimensions)) {
64  *_image = 0;
65  *_mask = 0x0;
66  *_variance = 0;
67 }

◆ MaskedImage() [3/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( ImagePtr  image,
MaskPtr  mask = MaskPtr(),
VariancePtr  variance = VariancePtr() 
)
explicit

Construct from a supplied Image and optional Mask and Variance.

The Mask and Variance will be set to zero if omitted

Parameters
imageImage
maskMask
varianceVariance Mask

Definition at line 154 of file MaskedImage.cc.

156  : _image(image), _mask(mask), _variance(variance) {
157  conformSizes();
158 }

◆ MaskedImage() [4/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( lsst::geom::Box2I const &  bbox,
MaskPlaneDict const &  planeDict = MaskPlaneDict() 
)
explicit

Create an MaskedImage of the specified size.

The Image, Mask, and Variance will be set to zero

Parameters
bboxdimensions of image: width x height
planeDictMake Mask conform to this mask layout (ignore if empty)
Note
Many lsst::afw::image and lsst::afw::math objects define a dimensions member which may be conveniently used to make objects of an appropriate size

Definition at line 70 of file MaskedImage.cc.

72  : _image(new Image(bbox)), _mask(new Mask(bbox, planeDict)), _variance(new Variance(bbox)) {
73  *_image = 0;
74  *_mask = 0x0;
75  *_variance = 0;
76 }

◆ MaskedImage() [5/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( std::string const &  fileName,
std::shared_ptr< daf::base::PropertySet metadata = std::shared_ptr<daf::base::PropertySet>(),
lsst::geom::Box2I const &  bbox = lsst::geom::Box2I(),
ImageOrigin  origin = PARENT,
bool  conformMasks = false,
bool  needAllHdus = false,
std::shared_ptr< daf::base::PropertySet imageMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet maskMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet varianceMetadata = std::shared_ptr<daf::base::PropertySet>(),
bool  allowUnsafe = false 
)
explicit

Construct a MaskedImage by reading a regular FITS file.

Parameters
[in]fileNameFile to read.
[in,out]metadataMetadata read from the primary HDU header.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]needAllHdusIf true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero.
[in,out]imageMetadataMetadata read from the image HDU header.
[in,out]maskMetadataMetadata read from the mask HDU header.
[in,out]varianceMetadataMetadata read from the variance HDU header.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 79 of file MaskedImage.cc.

85  : _image(), _mask(), _variance() {
86  MaskedImageFitsReader reader(fileName);
87  *this = reader.read<ImagePixelT, MaskPixelT, VariancePixelT>(bbox, origin, conformMasks, needAllHdus,
88  allowUnsafe);
89  if (metadata) {
90  metadata->combine(reader.readPrimaryMetadata());
91  }
92  if (imageMetadata) {
93  imageMetadata->combine(reader.readImageMetadata());
94  }
95  if (maskMetadata) {
96  maskMetadata->combine(reader.readMaskMetadata());
97  }
98  if (varianceMetadata) {
99  varianceMetadata->combine(reader.readVarianceMetadata());
100  }
101 }

◆ MaskedImage() [6/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( fits::MemFileManager manager,
std::shared_ptr< daf::base::PropertySet metadata = std::shared_ptr<daf::base::PropertySet>(),
lsst::geom::Box2I const &  bbox = lsst::geom::Box2I(),
ImageOrigin  origin = PARENT,
bool  conformMasks = false,
bool  needAllHdus = false,
std::shared_ptr< daf::base::PropertySet imageMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet maskMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet varianceMetadata = std::shared_ptr<daf::base::PropertySet>(),
bool  allowUnsafe = false 
)
explicit

Construct a MaskedImage by reading a FITS image in memory.

Parameters
[in]managerAn object that manages the memory buffer to read.
[in,out]metadataMetadata read from the primary HDU header.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]needAllHdusIf true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero.
[in,out]imageMetadataMetadata read from the image HDU header.
[in,out]maskMetadataMetadata read from the mask HDU header.
[in,out]varianceMetadataMetadata read from the variance HDU header.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 104 of file MaskedImage.cc.

110  : _image(), _mask(), _variance() {
111  MaskedImageFitsReader reader(manager);
112  *this = reader.read<ImagePixelT, MaskPixelT, VariancePixelT>(bbox, origin, conformMasks, needAllHdus,
113  allowUnsafe);
114  if (metadata) {
115  metadata->combine(reader.readPrimaryMetadata());
116  }
117  if (imageMetadata) {
118  imageMetadata->combine(reader.readImageMetadata());
119  }
120  if (maskMetadata) {
121  maskMetadata->combine(reader.readMaskMetadata());
122  }
123  if (varianceMetadata) {
124  varianceMetadata->combine(reader.readVarianceMetadata());
125  }
126 }

◆ MaskedImage() [7/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( fits::Fits fitsfile,
std::shared_ptr< daf::base::PropertySet metadata = std::shared_ptr<daf::base::PropertySet>(),
lsst::geom::Box2I const &  bbox = lsst::geom::Box2I(),
ImageOrigin  origin = PARENT,
bool  conformMasks = false,
bool  needAllHdus = false,
std::shared_ptr< daf::base::PropertySet imageMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet maskMetadata = std::shared_ptr<daf::base::PropertySet>(),
std::shared_ptr< daf::base::PropertySet varianceMetadata = std::shared_ptr<daf::base::PropertySet>(),
bool  allowUnsafe = false 
)
explicit

Construct a MaskedImage from an already-open FITS object.

Parameters
[in]fitsfileA FITS object to read from. Current HDU is ignored.
[in,out]metadataMetadata read from the primary HDU header.
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
[in]conformMasksIf true, make Mask conform to the mask layout in the file.
[in]needAllHdusIf true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero.
[in,out]imageMetadataMetadata read from the image HDU header.
[in,out]maskMetadataMetadata read from the mask HDU header.
[in,out]varianceMetadataMetadata read from the variance HDU header.
[in]allowUnsafePermit reading into the requested pixel type even when on-disk values may overflow or truncate.

Definition at line 129 of file MaskedImage.cc.

135  : _image(), _mask(), _variance() {
136  MaskedImageFitsReader reader(&fitsFile);
137  *this = reader.read<ImagePixelT, MaskPixelT, VariancePixelT>(bbox, origin, conformMasks, needAllHdus,
138  allowUnsafe);
139  if (metadata) {
140  metadata->combine(reader.readPrimaryMetadata());
141  }
142  if (imageMetadata) {
143  imageMetadata->combine(reader.readImageMetadata());
144  }
145  if (maskMetadata) {
146  maskMetadata->combine(reader.readMaskMetadata());
147  }
148  if (varianceMetadata) {
149  varianceMetadata->combine(reader.readVarianceMetadata());
150  }
151 }

◆ MaskedImage() [8/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs,
bool const  deep = false 
)

Copy constructor; shallow, unless deep is true.

Parameters
rhsImage to copy
deepMake deep copy?

Definition at line 161 of file MaskedImage.cc.

162  : _image(rhs._image), _mask(rhs._mask), _variance(rhs._variance) {
163  if (deep) {
164  _image = std::shared_ptr<Image>(new Image(*rhs.getImage(), deep));
165  _mask = std::shared_ptr<Mask>(new Mask(*rhs.getMask(), deep));
166  _variance = std::shared_ptr<Variance>(new Variance(*rhs.getVariance(), deep));
167  }
168  conformSizes();
169 }

◆ MaskedImage() [9/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &&  rhs)

Definition at line 173 of file MaskedImage.cc.

174  : MaskedImage(rhs, false) {}

◆ MaskedImage() [10/11]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs,
lsst::geom::Box2I const &  bbox,
ImageOrigin const  origin = PARENT,
bool const  deep = false 
)

Copy constructor of the pixels specified by bbox; shallow, unless deep is true.

Parameters
rhsMaskedImage to copy
bboxSpecify desired region
originSpecify the coordinate system of the bbox
deepIf false, new ImageBase shares storage with rhs; if true make a new, standalone, MaskedImage

Definition at line 177 of file MaskedImage.cc.

182  : _image(new Image(*rhs.getImage(), bbox, origin, deep)),
183  _mask(rhs._mask ? new Mask(*rhs.getMask(), bbox, origin, deep) : static_cast<Mask*>(NULL)),
184  _variance(rhs._variance ? new Variance(*rhs.getVariance(), bbox, origin, deep)
185  : static_cast<Variance*>(NULL)) {
186  conformSizes();
187 }

◆ MaskedImage() [11/11]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
template<typename OtherPixelT >
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage ( MaskedImage< OtherPixelT, MaskPixelT, VariancePixelT > const &  rhs,
const bool  deep 
)
inline

generalised copy constructor; defined here in the header so that the compiler can instantiate N(N-1)/2 conversions between N ImageBase types.

We only support converting the Image part

Parameters
rhsInput image
deepMust be true; needed to disambiguate

Definition at line 740 of file MaskedImage.h.

744  : _image(), _mask(), _variance() {
745  if (!deep) {
747  "Only deep copies are permitted for MaskedImages with different pixel types");
748  }
749 
750  _image = ImagePtr(new Image(*rhs.getImage(), deep));
751  _mask = MaskPtr(new Mask(*rhs.getMask(), deep));
752  _variance = VariancePtr(new Variance(*rhs.getVariance(), deep));
753  }

◆ ~MaskedImage()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
virtual lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::~MaskedImage ( )
virtualdefault

Member Function Documentation

◆ assign()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::assign ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs,
lsst::geom::Box2I const &  bbox = lsst::geom::Box2I(),
ImageOrigin  origin = PARENT 
)

Copy pixels from another masked image to a specified subregion of this masked image.

Parameters
[in]rhssource image whose pixels are to be copied into this image (the destination)
[in]bboxsubregion of this image to set; if empty (the default) then all pixels are set
[in]originorigin 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
Exceptions
lsst::pex::exceptions::LengthErrorif the dimensions of rhs and the specified subregion of this image do not match.

Definition at line 235 of file MaskedImage.cc.

237  {
238  _image->assign(*rhs.getImage(), bbox, origin);
239  _mask->assign(*rhs.getMask(), bbox, origin);
240  _variance->assign(*rhs.getVariance(), bbox, origin);
241 }

◆ at()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::at ( int const  x,
int const  y 
) const

Return an iterator at the point (x, y)

Definition at line 582 of file MaskedImage.cc.

582  {
583  typename Image::iterator imageEnd = getImage()->at(x, y);
584  typename Mask::iterator maskEnd = getMask()->at(x, y);
585  typename Variance::iterator varianceEnd = getVariance()->at(x, y);
586 
587  return iterator(imageEnd, maskEnd, varianceEnd);
588 }

◆ begin() [1/2]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::begin

Return an iterator to the start of the image.

Definition at line 558 of file MaskedImage.cc.

558  {
559 #if 0 // this doesn't compile; why?
560  return iterator(_image->begin(), _mask->begin(), _variance->begin());
561 #else
562  typename Image::iterator imageBegin = _image->begin();
563  typename Mask::iterator maskBegin = _mask->begin();
564  typename Variance::iterator varianceBegin = _variance->begin();
565 
566  return iterator(imageBegin, maskBegin, varianceBegin);
567 #endif
568 }

◆ begin() [2/2]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::fast_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::begin ( bool  contiguous) const

Fast iterators to contiguous images.

Return a fast iterator to the start of the image, which must be contiguous Note that the order in which pixels are visited is undefined.

Parameters
contiguousPixels are contiguous (must be true)
Exceptions
lsst::pex::exceptions::RuntimeErrorArgument contiguous is false, or the pixels are not in fact contiguous

Definition at line 652 of file MaskedImage.cc.

652  {
653  typename Image::fast_iterator imageBegin = _image->begin(contiguous);
654  typename Mask::fast_iterator maskBegin = _mask->begin(contiguous);
655  typename Variance::fast_iterator varianceBegin = _variance->begin(contiguous);
656 
657  return fast_iterator(imageBegin, maskBegin, varianceBegin);
658 }

◆ col_begin()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::col_begin ( int  x) const

Return an y_iterator to the start of the image.

Definition at line 632 of file MaskedImage.cc.

632  {
633  typename Image::y_iterator imageBegin = _image->col_begin(x);
634  typename Mask::y_iterator maskBegin = _mask->col_begin(x);
635  typename Variance::y_iterator varianceBegin = _variance->col_begin(x);
636 
637  return y_iterator(imageBegin, maskBegin, varianceBegin);
638 }

◆ col_end()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::col_end ( int  x) const

Return an y_iterator to the end of the image.

Definition at line 642 of file MaskedImage.cc.

642  {
643  typename Image::y_iterator imageEnd = getImage()->col_end(x);
644  typename Mask::y_iterator maskEnd = getMask()->col_end(x);
645  typename Variance::y_iterator varianceEnd = getVariance()->col_end(x);
646 
647  return y_iterator(imageEnd, maskEnd, varianceEnd);
648 }

◆ end() [1/2]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::end

Return an iterator to the end of the image.

Definition at line 572 of file MaskedImage.cc.

572  {
573  typename Image::iterator imageEnd = getImage()->end();
574  typename Mask::iterator maskEnd = getMask()->end();
575  typename Variance::iterator varianceEnd = getVariance()->end();
576 
577  return iterator(imageEnd, maskEnd, varianceEnd);
578 }

◆ end() [2/2]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::fast_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::end ( bool  contiguous) const

Return a fast iterator to the end of the image, which must be contiguous Note that the order in which pixels are visited is undefined.

Parameters
contiguousPixels are contiguous (must be true)
Exceptions
lsst::pex::exceptions::RuntimeErrorArgument contiguous is false, or the pixels are not in fact contiguous

Definition at line 662 of file MaskedImage.cc.

662  {
663  typename Image::fast_iterator imageEnd = getImage()->end(contiguous);
664  typename Mask::fast_iterator maskEnd = getMask()->end(contiguous);
665  typename Variance::fast_iterator varianceEnd = getVariance()->end(contiguous);
666 
667  return fast_iterator(imageEnd, maskEnd, varianceEnd);
668 }

◆ getBBox()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::geom::Box2I lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getBBox ( ImageOrigin const  origin = PARENT) const
inline

Definition at line 1097 of file MaskedImage.h.

1097 { return _image->getBBox(origin); }

◆ getDimensions()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::geom::Extent2I lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getDimensions ( ) const
inline

Definition at line 1096 of file MaskedImage.h.

1096 { return _image->getDimensions(); }

◆ getHeight()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
int lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getHeight ( ) const
inline

Return the number of rows in the image.

Definition at line 1095 of file MaskedImage.h.

1095 { return _image->getHeight(); }

◆ getImage()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
ImagePtr lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getImage ( ) const
inline

Return a (shared_ptr to) the MaskedImage's image.

Definition at line 1057 of file MaskedImage.h.

1057 { return _image; }

◆ getMask()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskPtr lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getMask ( ) const
inline

Return a (shared_ptr to) the MaskedImage's mask.

Definition at line 1069 of file MaskedImage.h.

1069 { return _mask; }

◆ getVariance()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
VariancePtr lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getVariance ( ) const
inline

Return a (shared_ptr to) the MaskedImage's variance.

Definition at line 1090 of file MaskedImage.h.

1090 { return _variance; }

◆ getWidth()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
int lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getWidth ( ) const
inline

Return the number of columns in the image.

Definition at line 1093 of file MaskedImage.h.

1093 { return _image->getWidth(); }

◆ getX0()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
int lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getX0 ( ) const
inline

Return the image's column-origin.

This will usually be 0 except for images created using the MaskedImage(fileName, hdu, BBox, mode) ctor or MaskedImage(ImageBase, BBox) cctor The origin can be reset with setXY0()

Definition at line 1105 of file MaskedImage.h.

1105 { return _image->getX0(); }

◆ getXY0()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
lsst::geom::Point2I lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getXY0 ( ) const
inline

Return the image's origin.

This will usually be (0, 0) except for images created using the MaskedImage(fileName, hdu, BBox, mode) ctor or MaskedImage(ImageBase, BBox) cctor The origin can be reset with setXY0

Definition at line 1121 of file MaskedImage.h.

1121 { return _image->getXY0(); }

◆ getY0()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
int lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::getY0 ( ) const
inline

Return the image's row-origin.

This will usually be 0 except for images created using the MaskedImage(fileName, hdu, BBox, mode) ctor or MaskedImage(ImageBase, BBox) cctor The origin can be reset with setXY0()

Definition at line 1113 of file MaskedImage.h.

1113 { return _image->getY0(); }

◆ indexToPosition()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
double lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::indexToPosition ( double  ind,
lsst::afw::image::xOrY const  xy 
) const
inline

Convert image index to image position (see Image::indexToPosition)

Returns
image position
Parameters
indimage index
xyIs this a column or row coordinate?

Definition at line 1160 of file MaskedImage.h.

1162  {
1163  return getImage()->indexToPosition(ind, xy);
1164  }

◆ operator*=() [1/3]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= ( ImagePixelT const  rhs)

Definition at line 344 of file MaskedImage.cc.

345  {
346  *_image *= rhs;
347  *_variance *= rhs * rhs;
348  return *this;
349 }

◆ operator*=() [2/3]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= ( lsst::afw::image::Image< ImagePixelT > const &  rhs)
inline

Definition at line 879 of file MaskedImage.h.

879  {
880  *_image *= rhs;
881  *_variance *= rhs; // yes, multiply twice
882  *_variance *= rhs;
883  return *this;
884  }

◆ operator*=() [3/3]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)

Definition at line 313 of file MaskedImage.cc.

314  {
315  // Must do variance before we modify the image values
316  transform_pixels(_image->_getRawView(), // lhs
317  rhs._image->_getRawView(), // rhs,
318  _variance->_getRawView(), // Var(lhs),
319  rhs._variance->_getRawView(), // Var(rhs)
320  _variance->_getRawView(), // result
321  productVariance<ImagePixelT, VariancePixelT>());
322 
323  *_image *= *rhs.getImage();
324  *_mask |= *rhs.getMask();
325  return *this;
326 }

◆ operator+=() [1/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator+= ( ImagePixelT const  rhs)

Add a scalar rhs to a MaskedImage.

Definition at line 261 of file MaskedImage.cc.

262  {
263  *_image += rhs;
264  return *this;
265 }

◆ operator+=() [2/4]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator+= ( lsst::afw::image::Image< ImagePixelT > const &  rhs)
inline

Definition at line 834 of file MaskedImage.h.

834  {
835  *_image += rhs;
836  return *this;
837  }

◆ operator+=() [3/4]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator+= ( lsst::afw::math::Function2< double > const &  function)
inline

Definition at line 838 of file MaskedImage.h.

838  {
839  *_image += function;
840  return *this;
841  }

◆ operator+=() [4/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator+= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)

Add a MaskedImage rhs to a MaskedImage.

The image and variances are added; the masks are ORd together

Note
The pixels in the two images are taken to be independent. There is a Pixel operation (plus) which models the covariance, but this is not (yet?) available as full-MaskedImage operators

Definition at line 244 of file MaskedImage.cc.

245  {
246  *_image += *rhs.getImage();
247  *_mask |= *rhs.getMask();
248  *_variance += *rhs.getVariance();
249  return *this;
250 }

◆ operator-=() [1/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator-= ( ImagePixelT const  rhs)

Subtract a scalar rhs from a MaskedImage.

Definition at line 285 of file MaskedImage.cc.

286  {
287  *_image -= rhs;
288  return *this;
289 }

◆ operator-=() [2/4]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator-= ( lsst::afw::image::Image< ImagePixelT > const &  rhs)
inline

Definition at line 861 of file MaskedImage.h.

861  {
862  *_image -= rhs;
863  return *this;
864  }

◆ operator-=() [3/4]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator-= ( lsst::afw::math::Function2< double > const &  function)
inline

Definition at line 865 of file MaskedImage.h.

865  {
866  *_image -= function;
867  return *this;
868  }

◆ operator-=() [4/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator-= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)

Subtract a MaskedImage rhs from a MaskedImage.

The images are subtracted; the masks are ORd together; and the variances are added

Note
the pixels in the two images are taken to be independent

Definition at line 268 of file MaskedImage.cc.

269  {
270  *_image -= *rhs.getImage();
271  *_mask |= *rhs.getMask();
272  *_variance += *rhs.getVariance();
273  return *this;
274 }

◆ operator/=() [1/3]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= ( ImagePixelT const  rhs)

Definition at line 405 of file MaskedImage.cc.

406  {
407  *_image /= rhs;
408  *_variance /= rhs * rhs;
409  return *this;
410 }

◆ operator/=() [2/3]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage& lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= ( lsst::afw::image::Image< ImagePixelT > const &  rhs)
inline

Definition at line 889 of file MaskedImage.h.

889  {
890  *_image /= rhs;
891  *_variance /= rhs; // yes, divide twice
892  *_variance /= rhs;
893  return *this;
894  }

◆ operator/=() [3/3]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)

Definition at line 374 of file MaskedImage.cc.

375  {
376  // Must do variance before we modify the image values
377  transform_pixels(_image->_getRawView(), // lhs
378  rhs._image->_getRawView(), // rhs,
379  _variance->_getRawView(), // Var(lhs),
380  rhs._variance->_getRawView(), // Var(rhs)
381  _variance->_getRawView(), // result
382  quotientVariance<ImagePixelT, VariancePixelT>());
383 
384  *_image /= *rhs.getImage();
385  *_mask |= *rhs.getMask();
386  return *this;
387 }

◆ operator<<=()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator<<= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)

Copy the pixels from the rhs to the lhs.

Deprecated:
use assign(rhs) instead
Note
operator=() is not equivalent to this command

Definition at line 218 of file MaskedImage.cc.

229  {
230  assign(rhs);
231  return *this;
232 }

◆ operator=() [1/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &&  rhs)
default

◆ operator=() [2/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs)
default

Make the lhs use the rhs's pixels.

If you are copying a scalar value, a simple lhs = scalar; is OK, but this is probably not the function that you want to use with an image. To copy pixel values from the rhs use assign(rhs)

Parameters
rhsRight hand side

◆ operator=() [3/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Pixel const &  rhs)

Set the pixels in the MaskedImage to the rhs.

Definition at line 208 of file MaskedImage.cc.

209  {
210  *_image = rhs.image();
211  *_mask = rhs.mask();
212  *_variance = rhs.variance();
213 
214  return *this;
215 }

◆ operator=() [4/4]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::SinglePixel const &  rhs)

Set the pixels in the MaskedImage to the rhs.

Definition at line 218 of file MaskedImage.cc.

219  {
220  *_image = rhs.image();
221  *_mask = rhs.mask();
222  *_variance = rhs.variance();
223 
224  return *this;
225 }

◆ operator[]()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator[] ( lsst::geom::Box2I const &  bbox) const
inline

Return a subimage corresponding to the given box (interpreted as PARENT coordinates).

Definition at line 795 of file MaskedImage.h.

795 { return subset(bbox); }

◆ positionToIndex()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
std::pair<int, double> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::positionToIndex ( double const  pos,
lsst::afw::image::xOrY const  xy 
) const
inline

Convert image position to index (see Image::positionToIndex)

Returns
std::pair(nearest integer index, fractional part)
Parameters
posimage position
xyIs this a column or row coordinate?

Definition at line 1171 of file MaskedImage.h.

1174  {
1175  return getImage()->positionToIndex(pos, xy);
1176  }

◆ rbegin()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::reverse_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::rbegin

Return a reverse_iterator to the start of the image.

Definition at line 592 of file MaskedImage.cc.

592  {
593  typename Image::reverse_iterator imageBegin = _image->rbegin();
594  typename Mask::reverse_iterator maskBegin = _mask->rbegin();
595  typename Variance::reverse_iterator varianceBegin = _variance->rbegin();
596 
597  return reverse_iterator(imageBegin, maskBegin, varianceBegin);
598 }

◆ readFits() [1/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
static MaskedImage lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::readFits ( fits::MemFileManager manager)
inlinestatic

Read a MaskedImage from a FITS RAM file.

Parameters
[in]managerObject that manages the memory to be read.

Definition at line 1050 of file MaskedImage.h.

1050  {
1051  return MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>(manager);
1052  }

◆ readFits() [2/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
static MaskedImage lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::readFits ( std::string const &  filename)
inlinestatic

Read a MaskedImage from a regular FITS file.

Parameters
[in]filenameName of the file to read.

Definition at line 1041 of file MaskedImage.h.

1041  {
1042  return MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>(filename);
1043  }

◆ rend()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::reverse_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::rend

Return a reverse_iterator to the end of the image.

Definition at line 602 of file MaskedImage.cc.

602  {
603  typename Image::reverse_iterator imageEnd = getImage()->rend();
604  typename Mask::reverse_iterator maskEnd = getMask()->rend();
605  typename Variance::reverse_iterator varianceEnd = getVariance()->rend();
606 
607  return reverse_iterator(imageEnd, maskEnd, varianceEnd);
608 }

◆ row_begin()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::row_begin ( int  y) const

Return an x_iterator to the start of the image.

Definition at line 612 of file MaskedImage.cc.

612  {
613  typename Image::x_iterator imageBegin = _image->row_begin(y);
614  typename Mask::x_iterator maskBegin = _mask->row_begin(y);
615  typename Variance::x_iterator varianceBegin = _variance->row_begin(y);
616 
617  return x_iterator(imageBegin, maskBegin, varianceBegin);
618 }

◆ row_end()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::row_end ( int  y) const

Return an x_iterator to the end of the image.

Definition at line 622 of file MaskedImage.cc.

622  {
623  typename Image::x_iterator imageEnd = getImage()->row_end(y);
624  typename Mask::x_iterator maskEnd = getMask()->row_end(y);
625  typename Variance::x_iterator varianceEnd = getVariance()->row_end(y);
626 
627  return x_iterator(imageEnd, maskEnd, varianceEnd);
628 }

◆ scaledDivides()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledDivides ( double const  c,
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs 
)

Definition at line 390 of file MaskedImage.cc.

391  {
392  // Must do variance before we modify the image values
393  transform_pixels(_image->_getRawView(), // lhs
394  rhs._image->_getRawView(), // rhs,
395  _variance->_getRawView(), // Var(lhs),
396  rhs._variance->_getRawView(), // Var(rhs)
397  _variance->_getRawView(), // result
398  scaledQuotientVariance<ImagePixelT, VariancePixelT>(c));
399 
400  (*_image).scaledDivides(c, *rhs.getImage());
401  *_mask |= *rhs._mask;
402 }

◆ scaledMinus()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledMinus ( double const  c,
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs 
)

Subtract a scaled MaskedImage c*rhs from a MaskedImage.

The images are subtracted; the masks are ORd together; and the variances are added

Note
the pixels in the two images are taken to be independent

Definition at line 277 of file MaskedImage.cc.

278  {
279  (*_image).scaledMinus(c, *rhs.getImage());
280  *_mask |= *rhs.getMask();
281  (*_variance).scaledPlus(c * c, *rhs.getVariance());
282 }

◆ scaledMultiplies()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledMultiplies ( double const  c,
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs 
)

Definition at line 329 of file MaskedImage.cc.

330  {
331  // Must do variance before we modify the image values
332  transform_pixels(_image->_getRawView(), // lhs
333  rhs._image->_getRawView(), // rhs,
334  _variance->_getRawView(), // Var(lhs),
335  rhs._variance->_getRawView(), // Var(rhs)
336  _variance->_getRawView(), // result
337  scaledProductVariance<ImagePixelT, VariancePixelT>(c));
338 
339  (*_image).scaledMultiplies(c, *rhs.getImage());
340  *_mask |= *rhs.getMask();
341 }

◆ scaledPlus()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledPlus ( double const  c,
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const &  rhs 
)

Add a scaled MaskedImage c*rhs to a MaskedImage.

The image and variances are added; the masks are ORd together

Note
The pixels in the two images are taken to be independent. There is a Pixel operation (plus) which models the covariance, but this is not (yet?) available as full-MaskedImage operators

Definition at line 253 of file MaskedImage.cc.

254  {
255  (*_image).scaledPlus(c, *rhs.getImage());
256  *_mask |= *rhs.getMask();
257  (*_variance).scaledPlus(c * c, *rhs.getVariance());
258 }

◆ setImage()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::setImage ( Image const &  other)
inline

Set the image plane's pixel values to those of another Image.

This copies pixel values, not pointers.

Exceptions
pex::exceptions::LengthErrorif dimensions do not match.

Definition at line 1066 of file MaskedImage.h.

1066 { _image->assign(other); }

◆ setMask()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::setMask ( Mask const &  other)
inline

Set the mask plane's pixel values to those of another Mask.

This copies pixel values, not pointers.

Exceptions
pex::exceptions::LengthErrorif dimensions do not match.

Definition at line 1078 of file MaskedImage.h.

1078 { _mask->assign(other); }

◆ setVariance()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::setVariance ( Variance const &  other)
inline

Set the variance plane's pixel values to those of another Image.

This copies pixel values, not pointers.

Exceptions
pex::exceptions::LengthErrorif dimensions do not match.

Definition at line 1087 of file MaskedImage.h.

1087 { _variance->assign(other); }

◆ setXY0() [1/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::setXY0 ( int const  x0,
int const  y0 
)
inline

Set the MaskedImage's origin.

The origin is usually set by the constructor, so you shouldn't need this function

Note
There are use cases (e.g. memory overlays) that may want to set these values, but don't do so unless you are an Expert.

Definition at line 1131 of file MaskedImage.h.

1131 { setXY0(lsst::geom::Point2I(x0, y0)); }

◆ setXY0() [2/2]

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::setXY0 ( lsst::geom::Point2I const  origin)
inline

Set the MaskedImage's origin.

The origin is usually set by the constructor, so you shouldn't need this function

Note
There are use cases (e.g. memory overlays) that may want to set these values, but don't do so unless you are an Expert.

Definition at line 1141 of file MaskedImage.h.

1141  {
1142  if (_image) {
1143  _image->setXY0(origin);
1144  }
1145 
1146  if (_mask) {
1147  _mask->setXY0(origin);
1148  }
1149 
1150  if (_variance) {
1151  _variance->setXY0(origin);
1152  }
1153  }

◆ subset()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
MaskedImage lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::subset ( lsst::geom::Box2I const &  bbox,
ImageOrigin  origin = PARENT 
) const
inline

Return a subimage corresponding to the given box.

Parameters
bboxBounding box of the subimage returned.
originOrigin bbox is rleative to; PARENT accounts for xy0, LOCAL does not.
Returns
A subimage view into this.

This method is wrapped as getitem in Python.

Note
This method permits mutable views to be obtained from const references to images (just as the copy constructor does). This is an intrinsic flaw in Image's design.

Definition at line 790 of file MaskedImage.h.

790  {
791  return MaskedImage(*this, bbox, origin, false);
792  }

◆ swap()

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::swap ( MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &  rhs)

Definition at line 198 of file MaskedImage.cc.

198  {
199  using std::swap; // See Meyers, Effective C++, Item 25
200 
201  _image.swap(rhs._image);
202  _mask.swap(rhs._mask);
203  _variance.swap(rhs._variance);
204 }

◆ writeFits() [1/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( fits::Fits fitsfile,
fits::ImageWriteOptions const &  imageOptions,
fits::ImageWriteOptions const &  maskOptions,
fits::ImageWriteOptions const &  varianceOptions,
std::shared_ptr< daf::base::PropertySet const >  metadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = nullptr 
) const

Write a MaskedImage to a FITS file.

Parameters
[in]fitsfileAn empty FITS file object.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 484 of file MaskedImage.cc.

490  {
492  if (metadata) {
493  header = metadata->deepCopy();
494  } else {
495  header = std::make_shared<daf::base::PropertyList>();
496  }
497 
498  if (fitsfile.countHdus() != 0) {
499  throw LSST_EXCEPT(pex::exceptions::LogicError,
500  "MaskedImage::writeFits can only write to an empty file");
501  }
502  if (fitsfile.getHdu() < 1) {
503  // Don't ever write images to primary; instead we make an empty primary.
504  fitsfile.createEmpty();
505  } else {
506  fitsfile.setHdu(0);
507  }
508  fitsfile.writeMetadata(*header);
509 
510  processPlaneMetadata(imageMetadata, header, "IMAGE");
511  _image->writeFits(fitsfile, imageOptions, header, _mask);
512 
513  processPlaneMetadata(maskMetadata, header, "MASK");
514  _mask->writeFits(fitsfile, maskOptions, header);
515 
516  processPlaneMetadata(varianceMetadata, header, "VARIANCE");
517  _variance->writeFits(fitsfile, varianceOptions, header, _mask);
518 }

◆ writeFits() [2/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( fits::Fits fitsfile,
std::shared_ptr< daf::base::PropertySet const >  metadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = std::shared_ptr<daf::base::PropertySet const>() 
) const

Write a MaskedImage to a FITS file.

Parameters
[in]fitsfileAn empty FITS file object.
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 448 of file MaskedImage.cc.

452  {
453  writeFits(fitsfile, fits::ImageWriteOptions(*_image), fits::ImageWriteOptions(*_mask),
454  fits::ImageWriteOptions(*_variance), metadata, imageMetadata, maskMetadata, varianceMetadata);
455 }

◆ writeFits() [3/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( fits::MemFileManager manager,
fits::ImageWriteOptions const &  imageOptions,
fits::ImageWriteOptions const &  maskOptions,
fits::ImageWriteOptions const &  varianceOptions,
std::shared_ptr< daf::base::PropertySet const >  metadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = nullptr 
) const

Write a MaskedImage to a FITS file.

Parameters
[in]managerManager object for the memory block to write to.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 471 of file MaskedImage.cc.

477  {
478  fits::Fits fitsfile(manager, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
479  writeFits(fitsfile, imageOptions, maskOptions, varianceOptions, metadata, imageMetadata, maskMetadata,
480  varianceMetadata);
481 }

◆ writeFits() [4/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( fits::MemFileManager manager,
std::shared_ptr< daf::base::PropertySet const >  metadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = std::shared_ptr<daf::base::PropertySet const>() 
) const

Write a MaskedImage to a FITS RAM file.

Parameters
[in]managerManager object for the memory block to write to.
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 423 of file MaskedImage.cc.

427  {
428  fits::Fits fitsfile(manager, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
429  writeFits(fitsfile, metadata, imageMetadata, maskMetadata, varianceMetadata);
430 }

◆ writeFits() [5/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( std::string const &  fileName,
fits::ImageWriteOptions const &  imageOptions,
fits::ImageWriteOptions const &  maskOptions,
fits::ImageWriteOptions const &  varianceOptions,
std::shared_ptr< daf::base::PropertySet const >  metadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = nullptr,
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = nullptr 
) const

Write a MaskedImage to a FITS file.

Parameters
[in]fileNameName of the file to write.
[in]imageOptionsOptions controlling writing of image as FITS.
[in]maskOptionsOptions controlling writing of mask as FITS.
[in]varianceOptionsOptions controlling writing of variance as FITS.
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 458 of file MaskedImage.cc.

464  {
465  fits::Fits fitsfile(fileName, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
466  writeFits(fitsfile, imageOptions, maskOptions, varianceOptions, metadata, imageMetadata, maskMetadata,
467  varianceMetadata);
468 }

◆ writeFits() [6/6]

template<typename ImagePixelT , typename MaskPixelT , typename VariancePixelT >
void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits ( std::string const &  fileName,
std::shared_ptr< daf::base::PropertySet const >  metadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  imageMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  maskMetadata = std::shared_ptr<daf::base::PropertySet const>(),
std::shared_ptr< daf::base::PropertySet const >  varianceMetadata = std::shared_ptr<daf::base::PropertySet const>() 
) const

Write a MaskedImage to a regular FITS file.

Parameters
[in]fileNameName of the file to write. When writing separate files, this is the "base" of the filename (e.g. foo reads foo_{img.msk.var}.fits).
[in]metadataAdditional values to write to the primary HDU header (may be null).
[in]imageMetadataMetadata to be written to the image header.
[in]maskMetadataMetadata to be written to the mask header.
[in]varianceMetadataMetadata to be written to the variance header.

The FITS file will have four HDUs; the primary HDU will contain only metadata, while the image, mask, and variance HDU headers will use the "INHERIT='T'" convention to indicate that the primary metadata applies to those HDUs as well.

Definition at line 413 of file MaskedImage.cc.

417  {
418  fits::Fits fitsfile(fileName, "w", fits::Fits::AUTO_CLOSE | fits::Fits::AUTO_CHECK);
419  writeFits(fitsfile, metadata, imageMetadata, maskMetadata, varianceMetadata);
420 }

◆ x_at()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
x_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::x_at ( int  x,
int  y 
) const
inline

Return an x_iterator at the point (x, y)

Definition at line 1219 of file MaskedImage.h.

1219  {
1220 #if 0
1221  typename Image::x_iterator imageEnd = getImage()->x_at(x, y);
1222  typename Mask::x_iterator maskEnd = getMask()->x_at(x, y);
1223  typename Variance::x_iterator varianceEnd = getVariance()->x_at(x, y);
1224 #else // bypass checks for non-NULL pointers
1225  typename Image::x_iterator imageEnd = _image->x_at(x, y);
1226  typename Mask::x_iterator maskEnd = _mask->x_at(x, y);
1227  typename Variance::x_iterator varianceEnd = _variance->x_at(x, y);
1228 #endif
1229 
1230  return x_iterator(imageEnd, maskEnd, varianceEnd);
1231  }

◆ xy_at()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
xy_locator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::xy_at ( int  x,
int  y 
) const
inline

Return an xy_locator at the point (x, y)

Definition at line 1253 of file MaskedImage.h.

1253  {
1254 #if 0
1255  typename Image::xy_locator imageEnd = getImage()->xy_at(x, y);
1256  typename Mask::xy_locator maskEnd = getMask()->xy_at(x, y);
1257  typename Variance::xy_locator varianceEnd = getVariance()->xy_at(x, y);
1258 #else // bypass checks for non-NULL pointers
1259  typename Image::xy_locator imageEnd = _image->xy_at(x, y);
1260  typename Mask::xy_locator maskEnd = _mask->xy_at(x, y);
1261  typename Variance::xy_locator varianceEnd = _variance->xy_at(x, y);
1262 #endif
1263 
1264  return xy_locator(imageEnd, maskEnd, varianceEnd);
1265  }

◆ y_at()

template<typename ImagePixelT , typename MaskPixelT = lsst::afw::image::MaskPixel, typename VariancePixelT = lsst::afw::image::VariancePixel>
y_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::y_at ( int  x,
int  y 
) const
inline

Return an y_iterator at the point (x, y)

Definition at line 1239 of file MaskedImage.h.

1239  {
1240 #if 0
1241  typename Image::y_iterator imageEnd = getImage()->y_at(x, y);
1242  typename Mask::y_iterator maskEnd = getMask()->y_at(x, y);
1243  typename Variance::y_iterator varianceEnd = getVariance()->y_at(x, y);
1244 #else // bypass checks for non-NULL pointers
1245  typename Image::y_iterator imageEnd = _image->y_at(x, y);
1246  typename Mask::y_iterator maskEnd = _mask->y_at(x, y);
1247  typename Variance::y_iterator varianceEnd = _variance->y_at(x, y);
1248 #endif
1249  return y_iterator(imageEnd, maskEnd, varianceEnd);
1250  }

The documentation for this class was generated from the following files:
y
int y
Definition: SpanSet.cc:49
lsst::afw::image::Image::writeFits
void writeFits(std::string const &fileName, std::shared_ptr< lsst::daf::base::PropertySet const > metadata=std::shared_ptr< lsst::daf::base::PropertySet const >(), std::string const &mode="w") const
Write an image to a regular FITS file.
lsst::afw::image
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects.
Definition: imageAlgorithm.dox:1
lsst::afw::image::ImageBase::col_begin
y_iterator col_begin(int x) const
Return an y_iterator to the start of the y'th row.
Definition: ImageBase.h:450
lsst::afw::image::ImageBase::assign
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.
Definition: Image.cc:166
std::shared_ptr
STL class.
lsst::afw::image::ImageBase::rbegin
reverse_iterator rbegin() const
Return an STL compliant reverse iterator to the start of the image.
Definition: Image.cc:273
lsst::afw::image::MaskedImage::ImagePtr
std::shared_ptr< image::Image< ImagePixelT > > ImagePtr
shared pointer to the Image
Definition: MaskedImage.h:76
lsst::afw::image::ImageBase::y_at
y_iterator y_at(int x, int y) const
Return an y_iterator to the point (x, y) in the image.
Definition: ImageBase.h:456
lsst::afw::image::ImageBase::rend
reverse_iterator rend() const
Return an STL compliant reverse iterator to the end of the image.
Definition: Image.cc:278
lsst::afw::image::ImageBase::at
iterator at(int x, int y) const
Return an STL compliant iterator at the point (x, y)
Definition: Image.cc:283
lsst::afw::image::ImageBase::end
iterator end() const
Return an STL compliant iterator to the end of the image.
Definition: Image.cc:268
lsst::afw::image::ImageBase::row_begin
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
Definition: ImageBase.h:438
lsst::afw::image::ImageBase< ImagePixelT >::reverse_iterator
_view_t::reverse_iterator reverse_iterator
An STL compliant reverse iterator.
Definition: ImageBase.h:129
lsst::afw::image::ImageBase::_getRawView
_view_t _getRawView() const
Definition: ImageBase.h:502
lsst::afw::image::ImageBase::indexToPosition
double indexToPosition(double ind, lsst::afw::image::xOrY const xy) const
Convert image index to image position.
Definition: ImageBase.h:386
lsst::afw::image::ImageBase< ImagePixelT >::y_iterator
_view_t::y_iterator y_iterator
An iterator for traversing the pixels in a column.
Definition: ImageBase.h:143
lsst::afw::image::ImageBase< ImagePixelT >::xy_locator
_view_t::xy_locator xy_locator
An xy_locator.
Definition: ImageBase.h:121
lsst::afw::image::MaskedImage::MaskedImage
MaskedImage(unsigned int width, unsigned int height, MaskPlaneDict const &planeDict=MaskPlaneDict())
Construct from a supplied dimensions.
Definition: MaskedImage.cc:48
lsst::afw::image::ImageBase::positionToIndex
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)
Definition: ImageBase.h:367
mask
afw::table::Key< afw::table::Array< MaskPixelT > > mask
Definition: HeavyFootprint.cc:217
lsst::afw::image::ImageBase::getHeight
int getHeight() const
Return the number of rows in the image.
Definition: ImageBase.h:335
lsst::afw::image::MaskedImage::Variance
lsst::afw::image::Image< VariancePixelT > Variance
Definition: MaskedImage.h:84
lsst::afw::image::ImageBase::x_at
x_iterator x_at(int x, int y) const
Return an x_iterator to the point (x, y) in the image.
Definition: ImageBase.h:444
lsst::afw::image::ImageBase::begin
iterator begin() const
Return an STL compliant iterator to the start of the image.
Definition: Image.cc:263
lsst::afw::fits::Fits::AUTO_CHECK
@ AUTO_CHECK
Definition: fits.h:308
lsst::afw::fits::Fits::AUTO_CLOSE
@ AUTO_CLOSE
Definition: fits.h:307
lsst::afw::image::ImageBase::xy_at
xy_locator xy_at(int x, int y) const
Return an xy_locator at the point (x, y) in the image.
Definition: ImageBase.h:462
lsst::afw::image::ImageBase::row_end
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
Definition: ImageBase.h:441
x
double x
Definition: ChebyshevBoundedField.cc:277
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::afw::image::MaskedImage::xy_locator
MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator > xy_locator
A locator for a MaskedImage.
Definition: MaskedImage.h:577
lsst::afw::image::MaskedImage::VariancePtr
std::shared_ptr< image::Image< VariancePixelT > > VariancePtr
shared pointer to the variance Image
Definition: MaskedImage.h:80
dimensions
afw::table::PointKey< int > dimensions
Definition: GaussianPsf.cc:49
lsst::afw::image::MaskedImage::Mask
lsst::afw::image::Mask< MaskPixelT > Mask
Definition: MaskedImage.h:86
lsst::afw::image::ImageBase< ImagePixelT >::x_iterator
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Definition: ImageBase.h:133
lsst::afw::image::MaskedImage::reverse_iterator
MaskedImageIterator< typename Image::reverse_iterator, typename Mask::reverse_iterator, typename Variance::reverse_iterator > reverse_iterator
Definition: MaskedImage.h:547
lsst::afw::image::MaskedImage::getVariance
VariancePtr getVariance() const
Return a (shared_ptr to) the MaskedImage's variance.
Definition: MaskedImage.h:1090
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
std::swap
T swap(T... args)
lsst::afw::image::MaskedImage::MaskPtr
std::shared_ptr< image::Mask< MaskPixelT > > MaskPtr
shared pointer to the Mask
Definition: MaskedImage.h:78
lsst::afw::image::ImageBase::getX0
int getX0() const
Return the image's column-origin.
Definition: ImageBase.h:343
lsst::afw::image::ImageBase::getDimensions
lsst::geom::Extent2I getDimensions() const
Return the image's size; useful for passing to constructors.
Definition: ImageBase.h:393
variance
afw::table::Key< afw::table::Array< VariancePixelT > > variance
Definition: HeavyFootprint.cc:218
lsst::afw::image::ImageBase< ImagePixelT >::fast_iterator
x_iterator fast_iterator
A fast STL compliant iterator for contiguous images N.b.
Definition: ImageBase.h:137
lsst.pex::exceptions::InvalidParameterError
Reports invalid arguments.
Definition: Runtime.h:66
lsst::afw::image::MaskedImage::fast_iterator
x_iterator fast_iterator
A fast STL compliant iterator for contiguous images N.b.
Definition: MaskedImage.h:564
lsst::afw::image::MaskedImage::y_iterator
MaskedImageIterator< typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator > y_iterator
An iterator to a column of a MaskedImage.
Definition: MaskedImage.h:568
lsst::geom::Point< int, 2 >
lsst::afw::image::ImageBase< ImagePixelT >::iterator
_view_t::iterator iterator
An STL compliant iterator.
Definition: ImageBase.h:125
lsst::afw::image::ImageBase::getXY0
lsst::geom::Point2I getXY0() const
Return the image's origin.
Definition: ImageBase.h:360
lsst::afw::image::MaskedImage::getImage
ImagePtr getImage() const
Return a (shared_ptr to) the MaskedImage's image.
Definition: MaskedImage.h:1057
lsst::afw::image::ImageBase::setXY0
void setXY0(lsst::geom::Point2I const origin)
Set the ImageBase's origin.
Definition: ImageBase.h:471
lsst::afw::image::ImageBase::getY0
int getY0() const
Return the image's row-origin.
Definition: ImageBase.h:351
lsst::afw::image::MaskedImage::iterator
MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iterator > iterator
Definition: MaskedImage.h:539
lsst::afw::image::MaskedImage::setXY0
void setXY0(int const x0, int const y0)
Set the MaskedImage's origin.
Definition: MaskedImage.h:1131
lsst::afw::image::ImageBase::getBBox
lsst::geom::Box2I getBBox(ImageOrigin origin=PARENT) const
Definition: ImageBase.h:482
lsst::afw::image::MaskedImage::writeFits
void writeFits(std::string const &fileName, std::shared_ptr< daf::base::PropertySet const > metadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > imageMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > maskMetadata=std::shared_ptr< daf::base::PropertySet const >(), std::shared_ptr< daf::base::PropertySet const > varianceMetadata=std::shared_ptr< daf::base::PropertySet const >()) const
Write a MaskedImage to a regular FITS file.
Definition: MaskedImage.cc:413
lsst::afw::image::ImageBase::col_end
y_iterator col_end(int x) const
Return an y_iterator to the start of the y'th row.
Definition: ImageBase.h:453
lsst::afw::image::MaskedImage::assign
void assign(MaskedImage const &rhs, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT)
Copy pixels from another masked image to a specified subregion of this masked image.
Definition: MaskedImage.cc:235
lsst::afw::image::MaskedImage::getMask
MaskPtr getMask() const
Return a (shared_ptr to) the MaskedImage's mask.
Definition: MaskedImage.h:1069
lsst::afw::image::MaskedImage::Image
lsst::afw::image::Image< ImagePixelT > Image
Definition: MaskedImage.h:85
lsst::afw::image::MaskedImage::x_iterator
MaskedImageIterator< typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator > x_iterator
An iterator to a row of a MaskedImage.
Definition: MaskedImage.h:556
lsst::afw::image::ImageBase::getWidth
int getWidth() const
Return the number of columns in the image.
Definition: ImageBase.h:333
bbox
AmpInfoBoxKey bbox
Definition: Amplifier.cc:117
lsst::afw::image::MaskedImage::subset
MaskedImage subset(lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const
Return a subimage corresponding to the given box.
Definition: MaskedImage.h:790