Template Class MaskedImage¶
Defined in File MaskedImage.h
Class Documentation¶
-
template<typename
ImagePixelT
, typenameMaskPixelT
= lsst::afw::image::MaskPixel, typenameVariancePixelT
= lsst::afw::image::VariancePixel>
classMaskedImage
¶ A class to manipulate images, masks, and variance as a single object.
Public Types
-
typedef std::shared_ptr<image::Image<VariancePixelT>>
VariancePtr
¶ shared pointer to the variance Image
-
typedef detail::MaskedImage_tag
image_category
¶
-
typedef lsst::afw::image::pixel::Pixel<ImagePixelT, MaskPixelT, VariancePixelT>
Pixel
¶ A Pixel in the MaskedImage.
-
typedef lsst::afw::image::pixel::SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>
SinglePixel
¶ A single Pixel of the same type as those in the MaskedImage.
-
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.
-
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.
-
typedef x_iterator
fast_iterator
¶ A fast STL compliant iterator for contiguous images N.b. The order of pixel access is undefined
-
typedef MaskedImageIterator<typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator>
y_iterator
¶ An iterator to a column of a MaskedImage.
-
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.
-
typedef MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator>
xy_locator
¶ A locator for a MaskedImage.
-
typedef const_MaskedImageLocator<typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator>
const_xy_locator
¶ A const_locator for a MaskedImage.
-
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
-
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
Public 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
- Parameters
width
: number of columnsheight
: number of rowsplaneDict
: Make Mask conform to this mask layout (ignore if empty)
-
MaskedImage
(lsst::geom::Extent2I const &dimensions = lsst::geom::Extent2I(), MaskPlaneDict const &planeDict = MaskPlaneDict())¶ Construct from a supplied dimensions. The Image, Mask, and Variance will be set to zero
- Parameters
dimensions
: Number of columns, rows in imageplaneDict
: Make Mask conform to this mask layout (ignore if empty)
-
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
- Parameters
image
: Imagemask
: Maskvariance
: Variance Mask
-
MaskedImage
(lsst::geom::Box2I const &bbox, MaskPlaneDict const &planeDict = MaskPlaneDict())¶ Create an MaskedImage of the specified size
The Image, Mask, and Variance will be set to zero
- 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- Parameters
bbox
: dimensions of image: width x heightplaneDict
: Make Mask conform to this mask layout (ignore if empty)
Construct a MaskedImage by reading a regular FITS file.
- Parameters
[in] fileName
: File to read.[inout] 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.[inout] imageMetadata
: Metadata read from the image HDU header.[inout] maskMetadata
: Metadata read from the mask HDU header.[inout] varianceMetadata
: Metadata read from the variance HDU header.[in] allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
Construct a MaskedImage by reading a FITS image in memory.
- Parameters
[in] manager
: An object that manages the memory buffer to read.[inout] 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.[inout] imageMetadata
: Metadata read from the image HDU header.[inout] maskMetadata
: Metadata read from the mask HDU header.[inout] varianceMetadata
: Metadata read from the variance HDU header.[in] allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
Construct a MaskedImage from an already-open FITS object.
- Parameters
[in] fitsfile
: A FITS object to read from. Current HDU is ignored.[inout] 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.[inout] imageMetadata
: Metadata read from the image HDU header.[inout] maskMetadata
: Metadata read from the mask HDU header.[inout] varianceMetadata
: Metadata read from the variance HDU header.[in] allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
MaskedImage
(MaskedImage const &rhs, bool const deep = false)¶ Copy constructor; shallow, unless deep is true.
- Parameters
rhs
: Image to copydeep
: Make deep copy?
-
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.
- Parameters
rhs
: MaskedImage to copybbox
: Specify desired regionorigin
: Specify the coordinate system of the bboxdeep
: If false, new ImageBase shares storage with rhs; if true make a new, standalone, MaskedImage
-
template<typename
OtherPixelT
>MaskedImage
(MaskedImage<OtherPixelT, MaskPixelT, VariancePixelT> const &rhs, const bool deep)¶ - Parameters
rhs
: Input imagedeep
: Must be true; needed to disambiguate
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
-
MaskedImage &
operator=
(MaskedImage 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)- Parameters
rhs
: Right hand side
-
MaskedImage &
operator=
(MaskedImage &&rhs)¶
-
virtual
~MaskedImage
()¶
-
void
swap
(MaskedImage &rhs)¶
-
MaskedImage &
operator=
(Pixel const &rhs)¶ Set the pixels in the MaskedImage to the rhs.
-
MaskedImage &
operator=
(SinglePixel const &rhs)¶ Set the pixels in the MaskedImage to the rhs.
-
MaskedImage
subset
(lsst::geom::Box2I const &bbox, ImageOrigin origin = PARENT) const¶ Return a subimage corresponding to the given box.
This method is wrapped as
getitem in Python.- Return
A subimage view into this.
- Parameters
bbox
: Bounding box of the subimage returned.origin
: Origin bbox is rleative to; PARENT accounts for xy0, LOCAL does not.
- 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.
-
MaskedImage
operator[]
(lsst::geom::Box2I const &bbox) const¶ Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
-
MaskedImage &
operator<<=
(MaskedImage const &rhs)¶ Copy the pixels from the rhs to the lhs
- Note
operator=() is not equivalent to this command
-
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.
- Parameters
[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
- Exceptions
lsst::pex::exceptions::LengthError
: if the dimensions of rhs and the specified subregion of this image do not match.
-
MaskedImage &
operator+=
(ImagePixelT const rhs)¶ Add a scalar rhs to a MaskedImage.
-
MaskedImage &
operator+=
(MaskedImage 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
-
void
scaledPlus
(double const c, MaskedImage 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
-
MaskedImage &
operator-=
(ImagePixelT const rhs)¶ Subtract a scalar rhs from a MaskedImage.
-
MaskedImage &
operator-=
(MaskedImage 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
-
void
scaledMinus
(double const c, MaskedImage 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
-
MaskedImage &
operator*=
(ImagePixelT const rhs)¶
-
MaskedImage &
operator*=
(MaskedImage const &rhs)¶
-
void
scaledMultiplies
(double const c, MaskedImage const &rhs)¶
-
MaskedImage &
operator/=
(ImagePixelT const rhs)¶
-
MaskedImage &
operator/=
(MaskedImage const &rhs)¶
-
void
scaledDivides
(double const c, MaskedImage const &rhs)¶
Write a MaskedImage to a regular FITS file.
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.
- Parameters
[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.
Write a MaskedImage to a FITS RAM file.
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.
- Parameters
[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.
Write a MaskedImage to a FITS file.
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.
- Parameters
[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.
Write a MaskedImage to a FITS file.
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.
- Parameters
[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.
Write a MaskedImage to a FITS file.
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.
- Parameters
[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.
Write a MaskedImage to a FITS file.
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.
- Parameters
[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.
-
ImagePtr
getImage
() const¶ Return a (shared_ptr to) the MaskedImage’s image.
-
void
setImage
(Image const &other)¶ Set the image plane’s pixel values to those of another Image.
This copies pixel values, not pointers.
- Exceptions
pex::exceptions::LengthError
: if dimensions do not match.
-
MaskPtr
getMask
() const¶ Return a (shared_ptr to) the MaskedImage’s mask.
-
void
setMask
(Mask const &other)¶ Set the mask plane’s pixel values to those of another Mask.
This copies pixel values, not pointers.
- Exceptions
pex::exceptions::LengthError
: if dimensions do not match.
-
void
setVariance
(Variance const &other)¶ Set the variance plane’s pixel values to those of another Image.
This copies pixel values, not pointers.
- Exceptions
pex::exceptions::LengthError
: if dimensions do not match.
-
VariancePtr
getVariance
() const¶ Return a (shared_ptr to) the MaskedImage’s variance.
-
int
getWidth
() const¶ Return the number of columns in the image.
-
int
getHeight
() const¶ Return the number of rows in the image.
-
lsst::geom::Box2I
getBBox
(ImageOrigin const origin = PARENT) const¶
-
int
getX0
() const¶ Return the image’s column-origin
This will usually be 0 except for images created using the
MaskedImage(fileName, hdu, BBox, mode)
ctor orMaskedImage(ImageBase, BBox)
cctor The origin can be reset with setXY0()
-
int
getY0
() const¶ Return the image’s row-origin
This will usually be 0 except for images created using the
MaskedImage(fileName, hdu, BBox, mode)
ctor orMaskedImage(ImageBase, BBox)
cctor The origin can be reset with setXY0()
-
lsst::geom::Point2I
getXY0
() const¶ Return the image’s origin
This will usually be (0, 0) except for images created using the
MaskedImage(fileName, hdu, BBox, mode)
ctor orMaskedImage(ImageBase, BBox)
cctor The origin can be reset withsetXY0
-
void
setXY0
(int const x0, int const y0)¶ 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.
-
void
setXY0
(lsst::geom::Point2I const origin)¶ 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.
-
double
indexToPosition
(double ind, lsst::afw::image::xOrY const xy) const¶ - Parameters
ind
: image indexxy
: Is this a column or row coordinate?
Convert image index to image position (see Image::indexToPosition)
- Return
image position
-
std::pair<int, double>
positionToIndex
(double const pos, lsst::afw::image::xOrY const xy) const¶ - Parameters
pos
: image positionxy
: Is this a column or row coordinate?
Convert image position to index (see Image::positionToIndex)
- Return
std::pair(nearest integer index, fractional part)
-
reverse_iterator
rbegin
() const¶ Return a
reverse_iterator
to the start of the image.
-
reverse_iterator
rend
() const¶ Return a
reverse_iterator
to the end of the image.
-
fast_iterator
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
contiguous
: Pixels are contiguous (must be true)
- Exceptions
lsst::pex::exceptions::RuntimeError
: Argumentcontiguous
is false, or the pixels are not in fact contiguous
-
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.- Parameters
contiguous
: Pixels are contiguous (must be true)
- Exceptions
lsst::pex::exceptions::RuntimeError
: Argumentcontiguous
is false, or the pixels are not in fact contiguous
-
x_iterator
row_begin
(int y) const¶ Return an
x_iterator
to the start of the image.
-
x_iterator
row_end
(int y) const¶ Return an
x_iterator
to the end of the image.
-
x_iterator
x_at
(int x, int y) const¶ Return an
x_iterator
at the point(x, y)
-
y_iterator
col_begin
(int x) const¶ Return an
y_iterator
to the start of the image.
-
y_iterator
col_end
(int x) const¶ Return an
y_iterator
to the end of the image.
-
y_iterator
y_at
(int x, int y) const¶ Return an
y_iterator
at the point(x, y)
-
xy_locator
xy_at
(int x, int y) const¶ Return an
xy_locator
at the point(x, y)
Public Static Functions
-
static MaskedImage
readFits
(std::string const &filename)¶ Read a MaskedImage from a regular FITS file.
- Parameters
[in] filename
: Name of the file to read.
-
static MaskedImage
readFits
(fits::MemFileManager &manager)¶ Read a MaskedImage from a FITS RAM file.
- Parameters
[in] manager
: Object that manages the memory to be read.
-
template<typename
ImageIterator
, typenameMaskIterator
, typenameVarianceIterator
>
classconst_MaskedImageIterator
: public lsst::afw::image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>::MaskedImageIteratorBase<detail::const_iterator_type<ImageIterator>::type, detail::const_iterator_type<MaskIterator>::type, detail::const_iterator_type<VarianceIterator>::type, ConstReference>¶ An const iterator to the MaskedImage.
An const iterator for a MaskedImage.
Public Functions
-
template<>
const_MaskedImageIterator
(MaskedImageIterator<ImageIterator, MaskIterator, VarianceIterator> const &iter)¶
-
template<>
const_MaskedImageIterator &operator+
(std::ptrdiff_t delta)¶ Return a const_MaskedImageIterator that’s delta beyond this.
-
template<>
-
template<typename
ImageLocator
, typenameMaskLocator
, typenameVarianceLocator
>
classconst_MaskedImageLocator
: public lsst::afw::image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>::MaskedImageLocatorBase<detail::const_locator_type<ImageLocator>::type, detail::const_locator_type<MaskLocator>::type, detail::const_locator_type<VarianceLocator>::type, ConstReference>¶ A const locator for the MaskedImage.
A const locator for a MaskedImage.
Public Functions
-
template<>
const_MaskedImageLocator
(MaskedImageLocator<ImageLocator, MaskLocator, VarianceLocator> const &iter)¶
-
template<>
-
template<typename
ImagePT
= ImagePixelT, typenameMaskPT
= MaskPixelT, typenameVarPT
= VariancePixelT>
structImageTypeFactory
¶ A templated class to return this classes’ type (present in Image/Mask/MaskedImage)
Public Types
-
template<>
typedef MaskedImage<ImagePT, MaskPT, VarPT>type
¶ Return the desired type.
-
template<>
-
template<typename
ImageIterator
, typenameMaskIterator
, typenameVarianceIterator
>
classMaskedImageIterator
: public lsst::afw::image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>::MaskedImageIteratorBase<ImageIterator, MaskIterator, VarianceIterator>¶ An iterator to the MaskedImage.
An iterator for a MaskedImage.
Subclassed by lsst::afw::math::MaskedVector< EntryT >::iterator
Public Functions
-
template<>
MaskedImageIterator
(ImageIterator &img, MaskIterator &msk, VarianceIterator &var)¶
-
template<>
MaskedImageIteratoroperator+
(std::ptrdiff_t delta)¶ Return a MaskedImageIterator that’s delta beyond this.
-
template<>
-
template<typename
ImageIterator
, typenameMaskIterator
, typenameVarianceIterator
, template<typename> classRef
= Reference>
classMaskedImageIteratorBase
¶ The base class for MaskedImageIterators (const and non-const)
Public Types
-
template<>
typedef boost::zip_iterator<IMV_iterator_tuple>::referenceIMV_tuple
¶ The underlying iterator tuple
- Note
not really for public consumption; could be made protected
-
template<>
typedef Pixeltype
¶ Type pointed to by the iterator.
Public Functions
-
template<>
MaskedImageIteratorBase
(ImageIterator const &img, MaskIterator const &msk, VarianceIterator const &var)¶ Construct a MaskedImageIteratorBase from the image/mask/variance iterators.
-
template<>
Ref<ImagePixelT>::typeimage
()¶ Return (a reference to) the image part of the Pixel pointed at by the iterator.
-
template<>
Ref<MaskPixelT>::typemask
()¶ Return (a reference to) the mask part of the Pixel pointed at by the iterator.
-
template<>
Ref<VariancePixelT>::typevariance
()¶ Return (a reference to) the variance part of the Pixel pointed at by the iterator.
-
template<>
const IMV_iterator_tupleget_iterator_tuple
() const¶ Return the underlying iterator tuple
- Note
not really for public consumption; could be made protected
-
template<>
MaskedImageIteratorBase &operator+=
(std::ptrdiff_t delta)¶ Increment the iterator by
delta
- Parameters
delta
: how far to move the iterator
-
template<>
MaskedImageIteratorBase &operator-=
(std::ptrdiff_t delta)¶ Decrement the iterator by
delta
- Parameters
delta
: how far to move the iterator
-
template<>
MaskedImageIteratorBase &operator++
()¶ Increment the iterator (prefix)
-
template<>
MaskedImageIteratorBaseoperator++
(int)¶ Increment the iterator (postfix)
-
template<>
std::ptrdiff_toperator-
(MaskedImageIteratorBase const &rhs)¶ Return the distance between two iterators.
-
template<>
booloperator==
(MaskedImageIteratorBase const &rhs)¶ Return true if the lhs equals the rhs.
-
template<>
booloperator!=
(MaskedImageIteratorBase const &rhs)¶ Return true if the lhs doesn’t equal the rhs.
-
template<>
booloperator<
(MaskedImageIteratorBase const &rhs)¶ Return true if the lhs is less than the rhs.
-
template<>
operator Pixel
() const¶ Convert an iterator to a Pixel.
-
template<>
Pixeloperator*
()¶ Dereference the iterator, returning a Pixel.
-
template<>
const Pixeloperator*
() const¶ Dereference the iterator, returning a const Pixel.
Protected Attributes
-
template<>
boost::zip_iterator<IMV_iterator_tuple>_iter
¶
Friends
-
friend
lsst::afw::image::MaskedImage::const_MaskedImageIterator
The underlying const iterator tuple
- Note
not really for public consumption; could be made protected
-
template<>
-
template<typename
ImageLocator
, typenameMaskLocator
, typenameVarianceLocator
>
classMaskedImageLocator
: public lsst::afw::image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>::MaskedImageLocatorBase<ImageLocator, MaskLocator, VarianceLocator>¶ A locator for the MaskedImage.
A locator for a MaskedImage.
Public Functions
-
template<>
MaskedImageLocator
(ImageLocator &img, MaskLocator &msk, VarianceLocator &var)¶
-
template<>
-
template<typename
ImageLocator
, typenameMaskLocator
, typenameVarianceLocator
, template<typename> classRef
= Reference>
classMaskedImageLocatorBase
¶ The base class for MaskedImageLocators (const and non-const)
Public Types
-
template<>
typedef boost::tuple<typename ImageLocator::cached_location_t, typename MaskLocator::cached_location_t, typename VarianceLocator::cached_location_t>IMVCachedLocation
¶
-
template<>
typedef _x_or_y_iterator<apply_x>x_iterator
¶ An x_iterator that provides a view of the xy_locator (i.e. advancing one advances the other)
-
template<>
typedef _x_or_y_iterator<apply_y>y_iterator
¶ A y_iterator that provides a view of the xy_locator (i.e. advancing one advances the other)
-
template<>
typedef boost::mpl::vector<ImagePixelT, MaskPixelT, VariancePixelT>PixelTVec
¶
Public Functions
-
template<>
MaskedImageLocatorBase
(ImageLocator const &img, MaskLocator const &msk, VarianceLocator const &var)¶ Construct a MaskedImageLocator from image/mask/variance locators.
-
template<>
Pixeloperator*
()¶ Dereference a locator, returning a Pixel.
-
template<>
Pixeloperator()
(int x, int y)¶ Dereference a locator, returning a Pixel offset by
(x, y)
from the locator.
-
template<>
Pixeloperator[]
(cached_location_t const &cached_loc)¶ Dereference a locator, returning a Pixel offset by the amount set when we created the
cached_location_t
-
template<>
x_iteratorx
()¶ Return an iterator that can be used to move (or dereference) a locator
- Note
this x_locator is xy_locator::x_locator, not MaskedImage::x_locator
-
template<>
y_iteratory
()¶ Return an iterator that can be used to move (or dereference) a locator
- Note
this y_locator is xy_locator::y_locator, not MaskedImage::y_locator
-
template<>
cached_location_tcache_location
(int x, int y) const¶ Create a cached_location_t offset by
(x, y)
from locator.
-
template<typename
N
>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::typeapply_IMV
(cached_location_t const &cached_loc)¶
-
template<typename
N
>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::typeapply_IMV
()¶
-
template<typename
N
>
Ref<typename boost::mpl::at<PixelTVec, N>::type>::typeapply_IMV
(int x, int y)¶
-
template<>
Ref<ImagePixelT>::typeimage
(cached_location_t const &cached_loc)¶ Return a reference to the image at the offset set when we created the
cached_location_t
-
template<>
Ref<ImagePixelT>::typeimage
()¶ Return a reference to the image at the current position of the locator.
-
template<>
Ref<ImagePixelT>::typeimage
(int x, int y)¶ Return a reference to the image offset by
(x, y)
from the current position of the locator.
-
template<>
Ref<MaskPixelT>::typemask
(cached_location_t const &cached_loc)¶ Return a reference to the mask at the offset set when we created the
cached_location_t
-
template<>
Ref<MaskPixelT>::typemask
()¶ Return a reference to the mask at the current position of the locator.
-
template<>
Ref<MaskPixelT>::typemask
(int x, int y)¶ Return a reference to the mask offset by
(x, y)
from the current position of the locator.
-
template<>
Ref<VariancePixelT>::typevariance
(cached_location_t const &cached_loc)¶ Return a reference to the variance at the offset set when we created the
cached_location_t
-
template<>
Ref<VariancePixelT>::typevariance
()¶ Return a reference to the variance at the current position of the locator.
-
template<>
Ref<VariancePixelT>::typevariance
(int x, int y)¶ Return a reference to the variance offset by
(x, y)
from the current position of the locator.
-
template<>
booloperator==
(MaskedImageLocatorBase const &rhs)¶ Return true iff two locators are equal.
-
template<>
booloperator!=
(MaskedImageLocatorBase const &rhs)¶ Return true iff two locators are not equal.
-
template<>
booloperator<
(MaskedImageLocatorBase const &rhs)¶ Return true iff lhs is less than rhs.
-
template<>
MaskedImageLocatorBase &operator+=
(pair2I const &p)¶ Increment the locator’s
x
andy
positions byp
-
template<>
MaskedImageLocatorBase &operator+=
(detail::difference_type p)¶ Increment the locator’s
x
andy
positions byp
-
template<>
IMVLocator const &getLoc
() const¶
Protected Attributes
-
template<>
IMVLocator_loc
¶
-
class
cached_location_t
¶ A saved relative position, providing efficient access to neighbouring pixels.
Public Functions
-
template<>
template<>cached_location_t
(IMVLocator const &loc, int x, int y)¶ Create a cached_location_t that can be used to access pixels
(x, y)
away fromloc
Public Members
-
template<>
template<>
IMVCachedLocation_imv
¶
Friends
-
friend
lsst::afw::image::MaskedImage::const_MaskedImageLocator
-
template<>
-
template<>
-
typedef std::shared_ptr<image::Image<VariancePixelT>>