|
lsst.afw
13.0-101-g894215678
|
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 Member Functions | |
| MaskedImage (unsigned int width, unsigned int height, MaskPlaneDict const &planeDict=MaskPlaneDict()) | |
| Construct from a supplied dimensions. More... | |
| MaskedImage (geom::Extent2I const &dimensions=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 (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 >(), geom::Box2I const &bbox=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 >()) | |
| 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 >(), geom::Box2I const &bbox=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 >()) | |
| 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 >(), geom::Box2I const &bbox=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 >()) | |
| 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 const &rhs, 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... | |
| MaskedImage & | operator= (MaskedImage const &rhs) |
| Make the lhs use the rhs's pixels. More... | |
| virtual | ~MaskedImage () |
| void | swap (MaskedImage &rhs) |
| MaskedImage & | operator= (Pixel const &rhs) |
| Set the pixels in the MaskedImage to the rhs. More... | |
| MaskedImage & | operator= (SinglePixel const &rhs) |
| Set the pixels in the MaskedImage to the rhs. More... | |
| MaskedImage & | operator<<= (MaskedImage const &rhs) |
| Copy the pixels from the rhs to the lhs. More... | |
| void | assign (MaskedImage const &rhs, geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT) |
| Copy pixels from another masked image to a specified subregion of this masked image. More... | |
| MaskedImage & | operator+= (ImagePixelT const rhs) |
| Add a scalar rhs to a MaskedImage. More... | |
| MaskedImage & | operator+= (MaskedImage const &rhs) |
| Add a MaskedImage rhs to a MaskedImage. More... | |
| MaskedImage & | operator+= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
| MaskedImage & | operator+= (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... | |
| MaskedImage & | operator-= (ImagePixelT const rhs) |
| Subtract a scalar rhs from a MaskedImage. More... | |
| MaskedImage & | operator-= (MaskedImage const &rhs) |
| Subtract a MaskedImage rhs from a MaskedImage. More... | |
| MaskedImage & | operator-= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
| MaskedImage & | operator-= (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... | |
| MaskedImage & | operator*= (ImagePixelT const rhs) |
| MaskedImage & | operator*= (MaskedImage const &rhs) |
| MaskedImage & | operator*= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
| void | scaledMultiplies (double const c, MaskedImage const &rhs) |
| MaskedImage & | operator/= (ImagePixelT const rhs) |
| MaskedImage & | operator/= (MaskedImage const &rhs) |
| MaskedImage & | operator/= (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... | |
| geom::Extent2I | getDimensions () const |
| 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... | |
| 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 (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) const |
| Fast iterators to contiguous images. More... | |
| fast_iterator | end (bool) 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... | |
A class to manipulate images, masks, and variance as a single object.
Definition at line 81 of file MaskedImage.h.
| typedef const_MaskedImageIterator<typename Image::iterator, typename Mask::iterator, typename Variance::iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::const_iterator |
Definition at line 551 of file MaskedImage.h.
| 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 568 of file MaskedImage.h.
| 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 589 of file MaskedImage.h.
| 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 580 of file MaskedImage.h.
| 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 572 of file MaskedImage.h.
| typedef lsst::afw::image::Image<ImagePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Image |
Definition at line 93 of file MaskedImage.h.
| typedef detail::MaskedImage_tag lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::image_category |
Definition at line 96 of file MaskedImage.h.
| typedef std::shared_ptr<image::Image<ImagePixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::ImagePtr |
shared pointer to the Image
Definition at line 84 of file MaskedImage.h.
| typedef MaskedImageIterator<typename Image::iterator, typename Mask::iterator, typename Variance::iterator> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator |
Definition at line 547 of file MaskedImage.h.
| typedef lsst::afw::image::Mask<MaskPixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Mask |
Definition at line 94 of file MaskedImage.h.
| typedef Mask<MaskPixelT>::MaskPlaneDict lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskPlaneDict |
The Mask's MaskPlaneDict.
Definition at line 90 of file MaskedImage.h.
| typedef std::shared_ptr<image::Mask<MaskPixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskPtr |
shared pointer to the Mask
Definition at line 86 of file MaskedImage.h.
| 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 116 of file MaskedImage.h.
| 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 555 of file MaskedImage.h.
| 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 121 of file MaskedImage.h.
| typedef lsst::afw::image::Image<VariancePixelT> lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Variance |
Definition at line 92 of file MaskedImage.h.
| typedef std::shared_ptr<image::Image<VariancePixelT> > lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::VariancePtr |
shared pointer to the variance Image
Definition at line 88 of file MaskedImage.h.
| 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 564 of file MaskedImage.h.
| 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 585 of file MaskedImage.h.
| 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 593 of file MaskedImage.h.
| 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 596 of file MaskedImage.h.
| 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 576 of file MaskedImage.h.
|
explicit |
Construct from a supplied dimensions.
The Image, Mask, and Variance will be set to zero
| width | number of columns |
| height | number of rows |
| planeDict | Make Mask conform to this mask layout (ignore if empty) |
Definition at line 49 of file MaskedImage.cc.
|
explicit |
Construct from a supplied dimensions.
The Image, Mask, and Variance will be set to zero
| dimensions | Number of columns, rows in image |
| planeDict | Make Mask conform to this mask layout (ignore if empty) |
Definition at line 61 of file MaskedImage.cc.
|
explicit |
Construct from a supplied Image and optional Mask and Variance.
The Mask and Variance will be set to zero if omitted
| image | Image |
| mask | Mask |
| variance | Variance Mask |
Definition at line 226 of file MaskedImage.cc.
|
explicit |
Create an MaskedImage of the specified size.
The Image, Mask, and Variance will be set to zero
| bbox | dimensions of image: width x height |
| planeDict | Make Mask conform to this mask layout (ignore if empty) |
dimensions member which may be conveniently used to make objects of an appropriate size Definition at line 73 of file MaskedImage.cc.
|
explicit |
Construct a MaskedImage by reading a regular FITS file.
| [in] | fileName | File to read. |
| [in,out] | metadata | Metadata read from the primary HDU header. |
| [in] | bbox | If non-empty, read only the pixels within the bounding box. |
| [in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
| [in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
| [in] | needAllHdus | If true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero. |
| [in,out] | imageMetadata | Metadata read from the image HDU header. |
| [in,out] | maskMetadata | Metadata read from the mask HDU header. |
| [in,out] | varianceMetadata | Metadata read from the variance HDU header. |
Definition at line 85 of file MaskedImage.cc.
|
explicit |
Construct a MaskedImage by reading a FITS image in memory.
| [in] | manager | An object that manages the memory buffer to read. |
| [in,out] | metadata | Metadata read from the primary HDU header. |
| [in] | bbox | If non-empty, read only the pixels within the bounding box. |
| [in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
| [in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
| [in] | needAllHdus | If true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero. |
| [in,out] | imageMetadata | Metadata read from the image HDU header. |
| [in,out] | maskMetadata | Metadata read from the mask HDU header. |
| [in,out] | varianceMetadata | Metadata read from the variance HDU header. |
Definition at line 98 of file MaskedImage.cc.
|
explicit |
Construct a MaskedImage from an already-open FITS object.
| [in] | fitsfile | A FITS object to read from. Current HDU is ignored. |
| [in,out] | metadata | Metadata read from the primary HDU header. |
| [in] | bbox | If non-empty, read only the pixels within the bounding box. |
| [in] | origin | Coordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image. |
| [in] | conformMasks | If true, make Mask conform to the mask layout in the file. |
| [in] | needAllHdus | If true, throw fits::FitsError if the mask and/or variance plane is missing. If false, silently initialize them to zero. |
| [in,out] | imageMetadata | Metadata read from the image HDU header. |
| [in,out] | maskMetadata | Metadata read from the mask HDU header. |
| [in,out] | varianceMetadata | Metadata read from the variance HDU header. |
Definition at line 139 of file MaskedImage.cc.
| 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.
| rhs | Image to copy |
| deep | Make deep copy? |
Definition at line 233 of file MaskedImage.cc.
| lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskedImage | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs, |
| 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.
| rhs | MaskedImage to copy |
| bbox | Specify desired region |
| origin | Specify the coordinate system of the bbox |
| deep | If false, new ImageBase shares storage with rhs; if true make a new, standalone, MaskedImage |
Definition at line 244 of file MaskedImage.cc.
|
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
| rhs | Input image |
| deep | Must be true; needed to disambiguate |
Definition at line 737 of file MaskedImage.h.
|
inlinevirtual |
Definition at line 765 of file MaskedImage.h.
| void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::assign | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs, |
| geom::Box2I const & | bbox = geom::Box2I(), |
||
| ImageOrigin | origin = PARENT |
||
| ) |
Copy pixels from another masked image to a specified subregion of this masked image.
| [in] | rhs | source image whose pixels are to be copied into this image (the destination) |
| [in] | bbox | subregion of this image to set; if empty (the default) then all pixels are set |
| [in] | origin | origin of bbox: if PARENT then the lower left pixel of this image is at xy0 if LOCAL then the lower left pixel of this image is at 0,0 |
| lsst::pex::exceptions::LengthError | if the dimensions of rhs and the specified subregion of this image do not match. |
Definition at line 303 of file MaskedImage.cc.
| 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 659 of file MaskedImage.cc.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::begin | ( | ) | const |
Return an iterator to the start of the image.
Definition at line 635 of file MaskedImage.cc.
| 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.
| contiguous | Pixels are contiguous (must be true) |
| lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 729 of file MaskedImage.cc.
| 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 709 of file MaskedImage.cc.
| 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 719 of file MaskedImage.cc.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::end | ( | ) | const |
Return an iterator to the end of the image.
Definition at line 649 of file MaskedImage.cc.
| 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.
| contiguous | Pixels are contiguous (must be true) |
| lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 739 of file MaskedImage.cc.
|
inline |
Definition at line 1081 of file MaskedImage.h.
|
inline |
Definition at line 1080 of file MaskedImage.h.
|
inline |
Return the number of rows in the image.
Definition at line 1079 of file MaskedImage.h.
|
inline |
Return a (shared_ptr to) the MaskedImage's image.
Definition at line 1041 of file MaskedImage.h.
|
inline |
Return a (shared_ptr to) the MaskedImage's mask.
Definition at line 1053 of file MaskedImage.h.
|
inline |
Return a (shared_ptr to) the MaskedImage's variance.
Definition at line 1074 of file MaskedImage.h.
|
inline |
Return the number of columns in the image.
Definition at line 1077 of file MaskedImage.h.
|
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 1089 of file MaskedImage.h.
|
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 1105 of file MaskedImage.h.
|
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 1097 of file MaskedImage.h.
|
inline |
Convert image index to image position (see Image::indexToPosition)
| ind | image index |
| xy | Is this a column or row coordinate? |
Definition at line 1144 of file MaskedImage.h.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= | ( | ImagePixelT const | rhs | ) |
Definition at line 413 of file MaskedImage.cc.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ) |
Definition at line 382 of file MaskedImage.cc.
|
inline |
Definition at line 854 of file MaskedImage.h.
| 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 330 of file MaskedImage.cc.
| 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
Definition at line 313 of file MaskedImage.cc.
|
inline |
Definition at line 809 of file MaskedImage.h.
|
inline |
Definition at line 813 of file MaskedImage.h.
| 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 354 of file MaskedImage.cc.
| 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
Definition at line 337 of file MaskedImage.cc.
|
inline |
Definition at line 836 of file MaskedImage.h.
|
inline |
Definition at line 840 of file MaskedImage.h.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= | ( | ImagePixelT const | rhs | ) |
Definition at line 474 of file MaskedImage.cc.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ) |
Definition at line 443 of file MaskedImage.cc.
|
inline |
Definition at line 864 of file MaskedImage.h.
| 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.
Definition at line 297 of file MaskedImage.cc.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ) |
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)
| rhs | Right hand side |
Definition at line 260 of file MaskedImage.cc.
| 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 277 of file MaskedImage.cc.
| 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 287 of file MaskedImage.cc.
|
inline |
Convert image position to index (see Image::positionToIndex)
| pos | image position |
| xy | Is this a column or row coordinate? |
Definition at line 1155 of file MaskedImage.h.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::reverse_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::rbegin | ( | ) | const |
Return a reverse_iterator to the start of the image.
Definition at line 669 of file MaskedImage.cc.
|
inlinestatic |
Read a MaskedImage from a regular FITS file.
| [in] | filename | Name of the file to read. |
Definition at line 1025 of file MaskedImage.h.
|
inlinestatic |
Read a MaskedImage from a FITS RAM file.
| [in] | manager | Object that manages the memory to be read. |
Definition at line 1034 of file MaskedImage.h.
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::reverse_iterator lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::rend | ( | ) | const |
Return a reverse_iterator to the end of the image.
Definition at line 679 of file MaskedImage.cc.
| 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 689 of file MaskedImage.cc.
| 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 699 of file MaskedImage.cc.
| void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledDivides | ( | double const | c, |
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ||
| ) |
Definition at line 458 of file MaskedImage.cc.
| 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
Definition at line 345 of file MaskedImage.cc.
| void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::scaledMultiplies | ( | double const | c, |
| MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ||
| ) |
Definition at line 397 of file MaskedImage.cc.
| 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
Definition at line 321 of file MaskedImage.cc.
|
inline |
Set the image plane's pixel values to those of another Image.
This copies pixel values, not pointers.
| pex::exceptions::LengthError | if dimensions do not match. |
Definition at line 1050 of file MaskedImage.h.
|
inline |
Set the mask plane's pixel values to those of another Mask.
This copies pixel values, not pointers.
| pex::exceptions::LengthError | if dimensions do not match. |
Definition at line 1062 of file MaskedImage.h.
|
inline |
Set the variance plane's pixel values to those of another Image.
This copies pixel values, not pointers.
| pex::exceptions::LengthError | if dimensions do not match. |
Definition at line 1071 of file MaskedImage.h.
|
inline |
Set the MaskedImage's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 1115 of file MaskedImage.h.
|
inline |
Set the MaskedImage's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 1125 of file MaskedImage.h.
| void lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::swap | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & | rhs | ) |
Definition at line 264 of file MaskedImage.cc.
| 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.
| [in] | fileName | Name 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] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 481 of file MaskedImage.cc.
| 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.
| [in] | manager | Manager object for the memory block to write to. |
| [in] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 491 of file MaskedImage.cc.
| 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.
| [in] | fitsfile | An empty FITS file object. |
| [in] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 516 of file MaskedImage.cc.
| 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.
| [in] | fileName | Name of the file to write. |
| [in] | imageOptions | Options controlling writing of image as FITS. |
| [in] | maskOptions | Options controlling writing of mask as FITS. |
| [in] | varianceOptions | Options controlling writing of variance as FITS. |
| [in] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 526 of file MaskedImage.cc.
| 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.
| [in] | manager | Manager object for the memory block to write to. |
| [in] | imageOptions | Options controlling writing of image as FITS. |
| [in] | maskOptions | Options controlling writing of mask as FITS. |
| [in] | varianceOptions | Options controlling writing of variance as FITS. |
| [in] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 542 of file MaskedImage.cc.
| 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.
| [in] | fitsfile | An empty FITS file object. |
| [in] | imageOptions | Options controlling writing of image as FITS. |
| [in] | maskOptions | Options controlling writing of mask as FITS. |
| [in] | varianceOptions | Options controlling writing of variance as FITS. |
| [in] | metadata | Additional values to write to the primary HDU header (may be null). |
| [in] | imageMetadata | Metadata to be written to the image header. |
| [in] | maskMetadata | Metadata to be written to the mask header. |
| [in] | varianceMetadata | Metadata 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 558 of file MaskedImage.cc.
|
inline |
Return an x_iterator at the point (x, y)
Definition at line 1203 of file MaskedImage.h.
|
inline |
Return an xy_locator at the point (x, y)
Definition at line 1237 of file MaskedImage.h.
|
inline |
Return an y_iterator at the point (x, y)
Definition at line 1223 of file MaskedImage.h.
1.8.13