LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
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 Image< ImagePixelT >::Ptr | ImagePtr |
shared pointer to the Image More... | |
typedef Mask< MaskPixelT >::Ptr | MaskPtr |
shared pointer to the Mask More... | |
typedef Image< VariancePixelT > ::Ptr | VariancePtr |
shared pointer to the variance Image More... | |
typedef boost::shared_ptr < MaskedImage > | Ptr |
shared pointer to a MaskedImage More... | |
typedef boost::shared_ptr < const MaskedImage > | ConstPtr |
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::iterator > | iterator |
typedef const_MaskedImageIterator < typename Image::iterator, typename Mask::iterator, typename Variance::iterator > | const_iterator |
typedef MaskedImageIterator < typename Image::reverse_iterator, typename Mask::reverse_iterator, typename Variance::reverse_iterator > | reverse_iterator |
typedef MaskedImageIterator < typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator > | x_iterator |
An iterator to a row of a MaskedImage. More... | |
typedef const_MaskedImageIterator < typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator > | const_x_iterator |
A const_iterator to a row of a MaskedImage. More... | |
typedef x_iterator | fast_iterator |
typedef MaskedImageIterator < typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator > | y_iterator |
An iterator to a column of a MaskedImage. More... | |
typedef const_MaskedImageIterator < typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator > | const_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_locator > | xy_locator |
A locator for a MaskedImage. More... | |
typedef const_MaskedImageLocator < typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator > | const_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 Types inherited from lsst::daf::base::Persistable | |
typedef boost::shared_ptr < Persistable > | Ptr |
Public Types inherited from lsst::daf::base::Citizen | |
enum | { magicSentinel = 0xdeadbeef } |
typedef unsigned long | memId |
Type of the block's ID. More... | |
typedef memId(* | memNewCallback )(const memId cid) |
A function used to register a callback. More... | |
typedef memId(* | memCallback )(const Citizen *ptr) |
Public Member Functions | |
MaskedImage (unsigned int width, unsigned int height, MaskPlaneDict const &planeDict=MaskPlaneDict()) | |
Construct from a supplied dimensions. The Image, Mask, and Variance will be set to zero. More... | |
MaskedImage (geom::Extent2I const &dimensions=geom::Extent2I(), MaskPlaneDict const &planeDict=MaskPlaneDict()) | |
Construct from a supplied dimensions. The Image, Mask, and Variance will be set to zero. More... | |
MaskedImage (ImagePtr image, MaskPtr mask=MaskPtr(), VariancePtr variance=VariancePtr()) | |
Construct from a supplied Image and optional Mask and Variance. The Mask and Variance will be set to zero if omitted. More... | |
MaskedImage (geom::Box2I const &bbox, MaskPlaneDict const &planeDict=MaskPlaneDict()) | |
MaskedImage (std::string const &fileName, boost::shared_ptr< daf::base::PropertySet > metadata=boost::shared_ptr< daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, boost::shared_ptr< daf::base::PropertySet > imageMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > maskMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > varianceMetadata=boost::shared_ptr< daf::base::PropertySet >()) | |
Construct a MaskedImage by reading a regular FITS file. More... | |
MaskedImage (fits::MemFileManager &manager, boost::shared_ptr< daf::base::PropertySet > metadata=boost::shared_ptr< daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, boost::shared_ptr< daf::base::PropertySet > imageMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > maskMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > varianceMetadata=boost::shared_ptr< daf::base::PropertySet >()) | |
Construct a MaskedImage by reading a FITS image in memory. More... | |
MaskedImage (fits::Fits &fitsfile, boost::shared_ptr< daf::base::PropertySet > metadata=boost::shared_ptr< daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT, bool conformMasks=false, bool needAllHdus=false, boost::shared_ptr< daf::base::PropertySet > imageMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > maskMetadata=boost::shared_ptr< daf::base::PropertySet >(), boost::shared_ptr< daf::base::PropertySet > varianceMetadata=boost::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) | |
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) |
MaskedImage & | operator= (SinglePixel const &rhs) |
void | operator<<= (MaskedImage const &rhs) |
void | operator+= (ImagePixelT const rhs) |
Add a scalar rhs to a MaskedImage. More... | |
void | operator+= (MaskedImage const &rhs) |
void | operator+= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
void | operator+= (lsst::afw::math::Function2< double > const &function) |
void | scaledPlus (double const c, MaskedImage const &rhs) |
void | operator-= (ImagePixelT const rhs) |
Subtract a scalar rhs from a MaskedImage. More... | |
void | operator-= (MaskedImage const &rhs) |
void | operator-= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
void | operator-= (lsst::afw::math::Function2< double > const &function) |
void | scaledMinus (double const c, MaskedImage const &rhs) |
void | operator*= (ImagePixelT const rhs) |
void | operator*= (MaskedImage const &rhs) |
void | operator*= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
void | scaledMultiplies (double const c, MaskedImage const &rhs) |
void | operator/= (ImagePixelT const rhs) |
void | operator/= (MaskedImage const &rhs) |
void | operator/= (lsst::afw::image::Image< ImagePixelT > const &rhs) |
void | scaledDivides (double const c, MaskedImage const &rhs) |
void | writeFits (std::string const &fileName, boost::shared_ptr< daf::base::PropertySet const > metadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > imageMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > maskMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > varianceMetadata=boost::shared_ptr< daf::base::PropertySet const >()) const |
Write a MaskedImage to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, boost::shared_ptr< daf::base::PropertySet const > metadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > imageMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > maskMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > varianceMetadata=boost::shared_ptr< daf::base::PropertySet const >()) const |
Write a MaskedImage to a FITS RAM file. More... | |
void | writeFits (fits::Fits &fitsfile, boost::shared_ptr< daf::base::PropertySet const > metadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > imageMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > maskMetadata=boost::shared_ptr< daf::base::PropertySet const >(), boost::shared_ptr< daf::base::PropertySet const > varianceMetadata=boost::shared_ptr< daf::base::PropertySet const >()) const |
Write a MaskedImage to a FITS RAM file. More... | |
ImagePtr | getImage (bool const noThrow=false) const |
Return a (Ptr to) the MaskedImage's image. More... | |
MaskPtr | getMask (bool const noThrow=false) const |
Return a (Ptr to) the MaskedImage's mask. More... | |
VariancePtr | getVariance (bool const noThrow=false) const |
Return a (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 |
int | getY0 () const |
geom::Point2I | getXY0 () const |
void | setXY0 (int const x0, int const y0) |
void | setXY0 (geom::Point2I const origin) |
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_iterator | end (bool) const |
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... | |
Public Member Functions inherited from lsst::daf::base::Persistable | |
Persistable (void) | |
virtual | ~Persistable (void) |
template<class Archive > | |
void | serialize (Archive &, unsigned int const) |
Public Member Functions inherited from lsst::daf::base::Citizen | |
Citizen (const std::type_info &) | |
Citizen (Citizen const &) | |
~Citizen () | |
Citizen & | operator= (Citizen const &) |
std::string | repr () const |
Return a string representation of a Citizen. More... | |
void | markPersistent (void) |
Mark a Citizen as persistent and not destroyed until process end. More... | |
memId | getId () const |
Return the Citizen's ID. More... | |
Static Public Member Functions | |
static 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... | |
Static Public Member Functions inherited from lsst::daf::base::Citizen | |
static bool | hasBeenCorrupted () |
Check all allocated blocks for corruption. More... | |
static memId | getNextMemId () |
Return the memId of the next object to be allocated. More... | |
static int | init () |
Called once when the memory system is being initialised. More... | |
static int | census (int, memId startingMemId=0) |
How many active Citizens are there? More... | |
static void | census (std::ostream &stream, memId startingMemId=0) |
Print a list of all active Citizens to stream, sorted by ID. More... | |
static const std::vector < const Citizen * > * | census () |
Return a (newly allocated) std::vector of active Citizens sorted by ID. More... | |
static memId | setNewCallbackId (memId id) |
Call the NewCallback when block is allocated. More... | |
static memId | setDeleteCallbackId (memId id) |
Call the current DeleteCallback when block is deleted. More... | |
static memNewCallback | setNewCallback (memNewCallback func) |
Set the NewCallback function. More... | |
static memCallback | setDeleteCallback (memCallback func) |
Set the DeleteCallback function. More... | |
static memCallback | setCorruptionCallback (memCallback func) |
Set the CorruptionCallback function. More... | |
Private Member Functions | |
void | conformSizes () |
Private Attributes | |
ImagePtr | _image |
MaskPtr | _mask |
VariancePtr | _variance |
A class to manipulate images, masks, and variance as a single object.
Definition at line 77 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 567 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 581 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 597 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 590 of file MaskedImage.h.
typedef boost::shared_ptr<const MaskedImage> lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::ConstPtr |
Definition at line 88 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 584 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 Image<ImagePixelT>::Ptr lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::ImagePtr |
shared pointer to the Image
Definition at line 81 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 564 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 Mask<MaskPixelT>::Ptr lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::MaskPtr |
shared pointer to the Mask
Definition at line 83 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 115 of file MaskedImage.h.
typedef boost::shared_ptr<MaskedImage> lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Ptr |
shared pointer to a MaskedImage
Definition at line 87 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 570 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 123 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 Image<VariancePixelT>::Ptr lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::VariancePtr |
shared pointer to the variance Image
Definition at line 85 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 578 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 594 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 601 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 604 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 587 of file MaskedImage.h.
|
explicit |
Construct from a supplied dimensions. The Image, Mask, and Variance will be set to zero.
Constructors
width | number of columns |
height | number of rows |
planeDict | Make Mask conform to this mask layout (ignore if empty) |
Definition at line 53 of file MaskedImage.cc.
|
explicit |
Construct from a supplied dimensions. The Image, Mask, and Variance will be set to zero.
Constructors
dimensions | Number of columns, rows in image |
planeDict | Make Mask conform to this mask layout (ignore if empty) |
Definition at line 72 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 271 of file MaskedImage.cc.
|
explicit |
Create an MaskedImage of the specified size
The Image, Mask, and Variance will be set to zero
dimensions
member which may be conveniently used to make objects of an appropriate size bbox | dimensions of image: width x height |
planeDict | Make Mask conform to this mask layout (ignore if empty) |
Definition at line 94 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 108 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 123 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 170 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 287 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 305 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 717 of file MaskedImage.h.
|
inlinevirtual |
Definition at line 737 of file MaskedImage.h.
image::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 712 of file MaskedImage.cc.
image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::begin | ( | void | ) | const |
Return an iterator
to the start of the image.
Definition at line 688 of file MaskedImage.cc.
image::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.
lsst::pex::exceptions::Runtime | Argument contiguous is false, or the pixels are not in fact contiguous |
contiguous | Pixels are contiguous (must be true) |
Definition at line 792 of file MaskedImage.cc.
image::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 764 of file MaskedImage.cc.
image::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 774 of file MaskedImage.cc.
|
private |
Definition at line 649 of file MaskedImage.cc.
image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::iterator lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::end | ( | void | ) | const |
Return an iterator
to the end of the image.
Definition at line 702 of file MaskedImage.cc.
image::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.
lsst::pex::exceptions::Runtime | Argument contiguous is false, or the pixels are not in fact contiguous |
contiguous | Pixels are contiguous (must be true) |
Definition at line 809 of file MaskedImage.cc.
|
inline |
Definition at line 905 of file MaskedImage.h.
|
inline |
Definition at line 904 of file MaskedImage.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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 913 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 929 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 921 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 971 of file MaskedImage.h.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= | ( | ImagePixelT const | rhs | ) |
Definition at line 499 of file MaskedImage.cc.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator*= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ) |
Definition at line 470 of file MaskedImage.cc.
|
inline |
Definition at line 769 of file MaskedImage.h.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator+= | ( | ImagePixelT const | rhs | ) |
void 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 391 of file MaskedImage.cc.
|
inline |
Definition at line 749 of file MaskedImage.h.
|
inline |
Definition at line 752 of file MaskedImage.h.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator-= | ( | ImagePixelT const | rhs | ) |
void 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 424 of file MaskedImage.cc.
|
inline |
Definition at line 759 of file MaskedImage.h.
|
inline |
Definition at line 762 of file MaskedImage.h.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= | ( | ImagePixelT const | rhs | ) |
Definition at line 556 of file MaskedImage.cc.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator/= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > const & | rhs | ) |
Definition at line 527 of file MaskedImage.cc.
|
inline |
Definition at line 778 of file MaskedImage.h.
void 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 377 of file MaskedImage.cc.
image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= | ( | image::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 operator<<=()
rhs | Right hand side |
Definition at line 328 of file MaskedImage.cc.
image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::Pixel const & | rhs | ) |
image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::operator= | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::SinglePixel const & | rhs | ) |
|
inline |
Convert image position to index (see Image::positionToIndex)
pos | image position |
xy | Is this a column or row coordinate? |
Definition at line 983 of file MaskedImage.h.
image::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 722 of file MaskedImage.cc.
|
inlinestatic |
Read a MaskedImage from a regular FITS file.
[in] | filename | Name of the file to read. |
Definition at line 854 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 863 of file MaskedImage.h.
image::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 732 of file MaskedImage.cc.
image::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 742 of file MaskedImage.cc.
image::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 752 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 541 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 436 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 484 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 405 of file MaskedImage.cc.
|
inline |
Set the MaskedImage's origin
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 939 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 951 of file MaskedImage.h.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::swap | ( | MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > & | rhs | ) |
Definition at line 333 of file MaskedImage.cc.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits | ( | std::string const & | fileName, |
boost::shared_ptr< daf::base::PropertySet const > | metadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | imageMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | maskMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | varianceMetadata = boost::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 562 of file MaskedImage.cc.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits | ( | fits::MemFileManager & | manager, |
boost::shared_ptr< daf::base::PropertySet const > | metadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | imageMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | maskMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | varianceMetadata = boost::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 574 of file MaskedImage.cc.
void lsst.afw.image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT >::writeFits | ( | fits::Fits & | fitsfile, |
boost::shared_ptr< daf::base::PropertySet const > | metadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | imageMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | maskMetadata = boost::shared_ptr< daf::base::PropertySet const>() , |
||
boost::shared_ptr< daf::base::PropertySet const > | varianceMetadata = boost::shared_ptr< daf::base::PropertySet const>() |
||
) | const |
Write a MaskedImage to a FITS RAM 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 604 of file MaskedImage.cc.
|
inline |
Return an x_iterator
at the point (x, y)
Definition at line 1006 of file MaskedImage.h.
|
inline |
Return an xy_locator
at the point (x, y)
Definition at line 1039 of file MaskedImage.h.
|
inline |
Return an y_iterator
at the point (x, y)
Definition at line 1024 of file MaskedImage.h.
|
private |
Definition at line 1058 of file MaskedImage.h.
|
private |
Definition at line 1059 of file MaskedImage.h.
|
private |
Definition at line 1060 of file MaskedImage.h.