30 #ifndef LSST_IMAGE_MASKEDIMAGE_H
31 #define LSST_IMAGE_MASKEDIMAGE_H
38 #include "boost/shared_ptr.hpp"
39 #include "boost/mpl/at.hpp"
40 #include "boost/iterator/zip_iterator.hpp"
68 namespace formatters {
69 template<
typename ImagePixelT,
typename MaskPixelT,
typename VariancePixelT>
class MaskedImageFormatter;
87 typedef boost::shared_ptr<MaskedImage>
Ptr;
88 typedef boost::shared_ptr<const MaskedImage>
ConstPtr;
99 template<
typename ImagePT=ImagePixelT,
typename MaskPT=MaskPixelT,
typename VarPT=VariancePixelT>
115 template<
typename,
typename,
typename>
class const_MaskedImageLocator;
127 template<
typename ImageIterator,
typename MaskIterator,
typename VarianceIterator,
135 typedef typename boost::zip_iterator<IMV_iterator_tuple>::reference
IMV_tuple;
144 _iter(boost::make_zip_iterator(boost::make_tuple(img, msk, var))) {
147 typename Ref<ImagePixelT>::type
image() {
148 return _iter->template get<0>()[0];
152 typename Ref<MaskPixelT>::type
mask() {
153 return _iter->template get<1>()[0];
158 return _iter->template get<2>()[0];
164 return _iter.get_iterator_tuple();
187 return &this->
_iter->template get<0>() - &rhs.
_iter->template get<0>();
191 return &this->
_iter->template get<0>() == &rhs.
_iter->template get<0>();
195 return &this->
_iter->template get<0>() != &rhs.
_iter->template get<0>();
199 return &this->
_iter->template get<0>() < &rhs.
_iter->template get<0>();
204 _iter->template get<1>()[0],
205 _iter->template get<2>()[0]);
218 typename boost::zip_iterator<IMV_iterator_tuple>
_iter;
222 template<
typename ImageIterator,
typename MaskIterator,
typename VarianceIterator>
240 template<
typename ImageIterator,
typename MaskIterator,
typename VarianceIterator>
241 class const_MaskedImageIterator :
242 public MaskedImageIteratorBase<typename detail::const_iterator_type<ImageIterator>::type,
243 typename detail::const_iterator_type<MaskIterator>::type,
244 typename detail::const_iterator_type<VarianceIterator>::type,
272 template<
typename ImageLocator,
typename MaskLocator,
typename VarianceLocator,
275 typedef typename boost::tuple<ImageLocator, MaskLocator, VarianceLocator>
IMVLocator;
281 template<
template<
typename>
class X_OR_Y >
288 X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())() += di;
289 X_OR_Y<MaskLocator>(
_mil->
_loc.template get<1>())() += di;
290 X_OR_Y<VarianceLocator>(
_mil->
_loc.template get<2>())() += di;
295 ++X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())();
296 ++X_OR_Y<MaskLocator>(
_mil->
_loc.template get<1>())();
297 ++X_OR_Y<VarianceLocator>(
_mil->
_loc.template get<2>())();
302 X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())() ==
303 X_OR_Y<ImageLocator>(rhs.
_mil->
_loc.template get<0>())();
308 X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())() !=
309 X_OR_Y<ImageLocator>(rhs.
_mil->
_loc.template get<0>())();
314 X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())() <
315 X_OR_Y<ImageLocator>(rhs.
_mil->
_loc.template get<0>())();
320 return Pixel((*(X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())()))[0],
321 (*(X_OR_Y<MaskLocator>(
_mil->
_loc.template get<1>())()))[0],
322 (*(X_OR_Y<VarianceLocator>(
_mil->
_loc.template get<2>())()))[0]);
325 typename Ref<ImagePixelT>::type
image() {
328 return (*(X_OR_Y<ImageLocator>(
_mil->
_loc.template get<0>())()))[0];
330 typename Ref<MaskPixelT>::type
mask() {
331 return (*(X_OR_Y<MaskLocator>(
_mil->
_loc.template get<1>())()))[0];
334 return (*(X_OR_Y<VarianceLocator>(
_mil->
_loc.template get<2>())()))[0];
341 template<
typename LocT>
343 typedef typename LocT::x_iterator
IterT;
351 template<
typename LocT>
353 typedef typename LocT::y_iterator
IterT;
364 typedef typename boost::tuple<
typename ImageLocator::cached_location_t,
365 typename MaskLocator::cached_location_t,
389 _loc(img, msk, var) {
395 return Pixel(
_loc.template get<0>().x()[0][0],
396 _loc.template get<1>().
x()[0][0],
397 _loc.template get<2>().
x()[0][0]);
402 return Pixel(
_loc.template get<0>()(x, y)[0],
403 _loc.template get<1>()(x, y)[0],
404 _loc.template get<2>()(x, y)[0]);
409 return Pixel(
_loc.template get<0>()[cached_loc._imv.template get<0>()][0],
410 _loc.template get<1>()[cached_loc._imv.template get<1>()][0],
411 _loc.template get<2>()[cached_loc._imv.template get<2>()][0]);
429 return cached_location_t(
_loc, x, y);
436 typedef typename boost::mpl::vector<ImagePixelT, MaskPixelT, VariancePixelT>
PixelTVec;
439 typename Ref<typename boost::mpl::at<PixelTVec, N>::type>::type
apply_IMV(cached_location_t
const& cached_loc) {
440 return _loc.template get<N::value>()[cached_loc._imv.template get<N::value>()][0];
444 typename Ref<typename boost::mpl::at<PixelTVec, N>::type>::type
apply_IMV() {
445 return _loc.template get<N::value>()[0][0];
449 typename Ref<typename boost::mpl::at<PixelTVec, N>::type>::type
apply_IMV(
int x,
int y) {
450 return _loc.template get<N::value>()(x, y)[0];
456 typename Ref<ImagePixelT>::type
image(cached_location_t
const& cached_loc) {
457 return apply_IMV<boost::mpl::int_<0> >(cached_loc);
460 typename Ref<ImagePixelT>::type
image() {
461 return apply_IMV<boost::mpl::int_<0> >();
464 typename Ref<ImagePixelT>::type
image(
int x,
int y) {
465 return apply_IMV<boost::mpl::int_<0> >(
x,
y);
469 typename Ref<MaskPixelT>::type
mask(cached_location_t
const& cached_loc) {
470 return apply_IMV<boost::mpl::int_<1> >(cached_loc);
473 typename Ref<MaskPixelT>::type
mask() {
474 return apply_IMV<boost::mpl::int_<1> >();
477 typename Ref<MaskPixelT>::type
mask(
int x,
int y) {
478 return apply_IMV<boost::mpl::int_<1> >(
x,
y);
482 typename Ref<VariancePixelT>::type
variance(cached_location_t
const& cached_loc) {
483 return apply_IMV<boost::mpl::int_<2> >(cached_loc);
487 return apply_IMV<boost::mpl::int_<2> >();
491 return apply_IMV<boost::mpl::int_<2> >(
x,
y);
496 return _loc.template get<0>() == rhs.
_loc.template get<0>();
500 return !(*
this == rhs);
504 return _loc.template get<0>() < rhs.
_loc.template get<0>();
509 return operator+=(detail::difference_type(p.first, p.second));
514 _loc.template get<0>() += p;
515 _loc.template get<1>() += p;
516 _loc.template get<2>() += p;
525 template<
typename ImageLocator,
typename MaskLocator,
typename VarianceLocator>
536 template<
typename ImageLocator,
typename MaskLocator,
typename VarianceLocator>
537 class const_MaskedImageLocator :
538 public MaskedImageLocatorBase<typename detail::const_locator_type<ImageLocator>::type,
539 typename detail::const_locator_type<MaskLocator>::type,
540 typename detail::const_locator_type<VarianceLocator>::type,
559 #endif // !defined(SWIG)
571 #if 0 // doesn't compile. I should fix this, but it's low priority. RHL
643 std::string
const & fileName,
646 bool conformMasks=
false,
bool needAllHdus=
false,
671 bool conformMasks=
false,
bool needAllHdus=
false,
696 bool conformMasks=
false,
bool needAllHdus=
false,
704 bool const deep=
false
710 bool const deep=
false
716 template<
typename OtherPixelT>
724 throw LSST_EXCEPT(lsst::pex::exceptions::InvalidParameterError,
725 "Only deep copies are permitted for MaskedImages with different pixel types");
800 std::string
const & fileName,
870 if (!
_image && !noThrow) {
872 lsst::pex::exceptions::RuntimeError,
873 "MaskedImage's Image is NULL"
880 if (!
_mask && !noThrow) {
882 lsst::pex::exceptions::RuntimeError,
883 "MaskedImage's Mask is NULL"
893 lsst::pex::exceptions::RuntimeError,
894 "MaskedImage's Variance is NULL"
957 _mask->setXY0(origin);
975 return getImage()->indexToPosition(ind, xy);
987 return getImage()->positionToIndex(pos, xy);
1011 #else // bypass checks for non-NULL pointers
1017 return x_iterator(imageEnd, maskEnd, varianceEnd);
1029 #else // bypass checks for non-NULL pointers
1034 return y_iterator(imageEnd, maskEnd, varianceEnd);
1044 #else // bypass checks for non-NULL pointers
1050 return xy_locator(imageEnd, maskEnd, varianceEnd);
1066 template<typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
1068 typename
Image<ImagePixelT>::
Ptr image,
1069 typename
Mask<MaskPixelT>::
Ptr mask = typename
Mask<MaskPixelT>::
Ptr(),
1070 typename
Image<VariancePixelT>::Ptr variance = typename
Image<VariancePixelT>::Ptr()
1092 template<
typename ImageT,
typename TagT>
1094 typedef ImageT type;
1095 static typename type::Ptr
getImage(
typename ImageT::Ptr image) {
1100 template<
typename ImageT>
1101 struct GetImage_<ImageT, typename image::detail::MaskedImage_tag> {
1102 typedef typename ImageT::Image type;
1103 static typename type::Ptr
getImage(
typename ImageT::Ptr image) {
1104 return image->getImage();
1109 template<
typename ImageT>
1110 struct GetImage :
public GetImage_<ImageT, typename ImageT::image_category> {
1115 #endif // LSST_IMAGE_MASKEDIMAGE_H
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
MaskedImageLocatorBase & operator+=(detail::difference_type p)
Increment the locator's x and y positions by p.
MaskedImageLocatorBase * _mil
Ref< ImagePixelT >::type image(int x, int y)
Return a reference to the image offset by (x, y) from the current position of the locator...
Image< VariancePixelT >::Ptr VariancePtr
shared pointer to the variance Image
Ref< ImagePixelT >::type image(cached_location_t const &cached_loc)
Return a reference to the image at the offset set when we created the cached_location_t.
void scaledDivides(double const c, MaskedImage const &rhs)
Ref< MaskPixelT >::type mask()
Return (a reference to) the mask part of the Pixel pointed at by the iterator.
MaskedImageIterator(ImageIterator &img, MaskIterator &msk, VarianceIterator &var)
Ref< MaskPixelT >::type mask()
Return a reference to the mask at the current position of the locator.
const_MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator > const_xy_locator
A const_locator for a MaskedImage.
detail::const_iterator_type< ImageIterator >::type const_ImageIterator
MaskedImageIteratorBase(ImageIterator const &img, MaskIterator const &msk, VarianceIterator const &var)
Construct a MaskedImageIteratorBase from the image/mask/variance iterators.
The base class for MaskedImageLocators (const and non-const)
void operator-=(lsst::afw::math::Function2< double > const &function)
MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > * makeMaskedImage(typename Image< ImagePixelT >::Ptr image, typename Mask< MaskPixelT >::Ptr mask=typename Mask< MaskPixelT >::Ptr(), typename Image< VariancePixelT >::Ptr variance=typename Image< VariancePixelT >::Ptr())
boost::tuple< ImageLocator, MaskLocator, VarianceLocator > IMVLocator
Ref< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV(int x, int y)
boost::mpl::vector< ImagePixelT, MaskPixelT, VariancePixelT > PixelTVec
_view_t::reverse_iterator reverse_iterator
An STL compliant reverse iterator.
const_MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iterator > const_iterator
boost::zip_iterator< IMV_iterator_tuple > _iter
Pixel type
Type pointed to by the iterator.
A templated class to return this classes' type (present in Image/Mask/MaskedImage) ...
Pixel operator()(int x, int y)
Dereference a locator, returning a Pixel offset by (x, y) from the locator.
iterator begin() const
Return an iterator to the start of the image.
lsst::afw::image::pixel::Pixel< ImagePixelT, MaskPixelT, VariancePixelT > Pixel
A Pixel in the MaskedImage.
void operator<<=(MaskedImage const &rhs)
detail::const_locator_type< MaskLocator >::type const_MaskLocator
void operator/=(ImagePixelT const rhs)
boost::tuple< typename ImageLocator::cached_location_t, typename MaskLocator::cached_location_t, typename VarianceLocator::cached_location_t > IMVCachedLocation
boost::uint16_t MaskPixel
int getHeight() const
Return the number of rows in the image.
void scaledPlus(double const c, MaskedImage const &rhs)
Pixel operator*()
Dereference a locator, returning a Pixel.
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.
Ref< MaskPixelT >::type mask()
iterator at(int const x, int const y) const
Return an iterator at the point (x, y)
detail::const_iterator_type< VarianceIterator >::type const_VarianceIterator
Ref< VariancePixelT >::type variance(int x, int y)
Return a reference to the variance offset by (x, y) from the current position of the locator...
bool operator==(MaskedImageIteratorBase const &rhs)
Return true if the lhs equals the rhs.
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Pixel operator[](cached_location_t const &cached_loc)
Dereference a locator, returning a Pixel offset by the amount set when we created the cached_location...
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
MaskedImageLocatorBase< ImageLocator, MaskLocator, VarianceLocator > MaskedImageLocatorBase_t
Ref< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV(cached_location_t const &cached_loc)
The base class for MaskedImageIterators (const and non-const)
detail::const_iterator_type< MaskIterator >::type const_MaskIterator
geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
detail::MaskPlaneDict MaskPlaneDict
void operator+=(lsst::afw::math::Function2< double > const &function)
MaskedImageIterator< typename Image::x_iterator, typename Mask::x_iterator, typename Variance::x_iterator > x_iterator
An iterator to a row of a MaskedImage.
Ref< MaskPixelT >::type mask(cached_location_t const &cached_loc)
Return a reference to the mask at the offset set when we created the cached_location_t.
detail::const_locator_type< ImageLocator >::type const_ImageLocator
boost::shared_ptr< const MaskedImage > ConstPtr
lsst::afw::image::pixel::SinglePixel< ImagePixelT, MaskPixelT, VariancePixelT > SinglePixel
A single Pixel of the same type as those in the MaskedImage.
ImagePtr getImage(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage's image.
A single pixel of the same type as a MaskedImage.
void setXY0(geom::Point2I const origin)
void operator+=(std::ptrdiff_t delta)
Increment the iterator by delta.
void operator++(int)
Increment the iterator (postfix)
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 from loc.
void swap(MaskedImage &rhs)
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
lsst::afw::image::Mask< MaskPixelT > Mask
void operator+=(lsst::afw::image::Image< ImagePixelT > const &rhs)
geom::Extent2I getDimensions() const
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...
boost::tuple< ImageIterator, MaskIterator, VarianceIterator > IMV_iterator_tuple
void operator-=(ImagePixelT const rhs)
Subtract a scalar rhs from a MaskedImage.
void operator+=(ImagePixelT const rhs)
Add a scalar rhs to a MaskedImage.
MaskedImageIterator< typename Image::iterator, typename Mask::iterator, typename Variance::iterator > iterator
An integer coordinate rectangle.
Ref< VariancePixelT >::type variance()
Return (a reference to) the variance part of the Pixel pointed at by the iterator.
bool operator==(MaskedImageLocatorBase const &rhs)
Return true iff two locators are equal.
Mask< MaskPixelT >::MaskPlaneDict MaskPlaneDict
The Mask's MaskPlaneDict.
xy_locator xy_at(int x, int y) const
Return an xy_locator at the point (x, y)
VariancePtr getVariance(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage's variance.
table::Key< table::Array< Kernel::Pixel > > image
An iterator to the MaskedImage.
bool operator!=(MaskedImageIteratorBase const &rhs)
Return true if the lhs doesn't equal the rhs.
_view_t::iterator iterator
An STL compliant iterator.
void operator+=(const int di)
const_MaskedImageIterator & operator+(std::ptrdiff_t delta)
Return a const_MaskedImageIterator that's delta beyond this.
A locator for the MaskedImage.
_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) ...
double indexToPosition(double ind, lsst::afw::image::xOrY const xy) const
Convert image index to image position (see Image::indexToPosition)
x_iterator x_at(int x, int y) const
Return an x_iterator at the point (x, y)
afw::table::PointKey< int > dimensions
MaskedImageIteratorBase< ImageIterator, MaskIterator, VarianceIterator > MaskedImageIteratorBase_t
MaskedImageLocator(ImageLocator &img, MaskLocator &msk, VarianceLocator &var)
reverse_iterator rbegin() const
Return a reverse_iterator to the start of the image.
Ref< VariancePixelT >::type variance()
MaskedImage(MaskedImage< OtherPixelT, MaskPixelT, VariancePixelT > const &rhs, const bool deep)
void ImageT ImageT int float saturatedPixelValue int const width
bool operator<(_x_or_y_iterator const &rhs)
static MaskedImage readFits(fits::MemFileManager &manager)
Read a MaskedImage from a FITS RAM file.
Represent a 2-dimensional array of bitmask pixels.
MaskedImageIterator< typename Image::y_iterator, typename Mask::y_iterator, typename Variance::y_iterator > y_iterator
An iterator to a column of a MaskedImage.
Lifetime-management for memory that goes into FITS memory files.
iterator end() const
Return an iterator to the end of the image.
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.
A traits class for MaskedImage.
_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) ...
void operator-=(std::ptrdiff_t delta)
Decrement the iterator by delta.
MaskPtr getMask(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage's mask.
void operator*=(lsst::afw::image::Image< ImagePixelT > const &rhs)
void operator/=(lsst::afw::image::Image< ImagePixelT > const &rhs)
const_MaskedImageIterator(MaskedImageIterator< ImageIterator, MaskIterator, VarianceIterator > const &iter)
A class to manipulate images, masks, and variance as a single object.
_view_t::y_iterator y_iterator
An iterator for traversing the pixels in a column.
boost::shared_ptr< MaskedImage > Ptr
shared pointer to a MaskedImage
MaskedImageIterator< typename Image::reverse_iterator, typename Mask::reverse_iterator, typename Variance::reverse_iterator > reverse_iterator
Classes to provide utility functions for a "Pixel" to get at image/mask/variance operators.
detail::MaskedImage_tag image_category
MaskedImageLocatorBase< const_ImageLocator, const_MaskLocator, const_VarianceLocator, ConstReference > MaskedImageLocatorBase_t
Ref< ImagePixelT >::type image()
boost::shared_ptr< Image< ImagePixelT > > Ptr
void operator++()
Increment the iterator (prefix)
boost::zip_iterator< IMV_iterator_tuple >::reference IMV_tuple
reverse_iterator rend() const
Return a reverse_iterator to the end of the image.
bool operator!=(_x_or_y_iterator const &rhs)
Ref< ImagePixelT >::type image()
Return (a reference to) the image part of the Pixel pointed at by the iterator.
A saved relative position, providing efficient access to neighbouring pixels.
#define LSST_PERSIST_FORMATTER(formatter...)
detail::const_locator_type< VarianceLocator >::type const_VarianceLocator
y_iterator col_end(int x) const
Return an y_iterator to the end of the image.
Pixel operator*()
Dereference the iterator, returning a Pixel.
void scaledMultiplies(double const c, MaskedImage const &rhs)
void ImageT ImageT int float saturatedPixelValue int const height
const Pixel operator*() const
Dereference the iterator, returning a const Pixel.
Interface for Persistable base class.
Image< ImagePixelT >::Ptr ImagePtr
shared pointer to the Image
bool operator!=(MaskedImageLocatorBase const &rhs)
Return true iff two locators are not equal.
lsst::afw::image::Image< VariancePixelT > Variance
std::string const compressedFileNoMEF_RE
be written as MEFs
MaskedImageIterator operator+(std::ptrdiff_t delta)
Return a MaskedImageIterator that's delta beyond this.
std::ptrdiff_t operator-(MaskedImageIteratorBase const &rhs)
Return the distance between two iterators.
boost::shared_ptr< Mask > Ptr
#define LSST_EXCEPT(type,...)
Ref< ImagePixelT >::type image()
Return a reference to the image at the current position of the locator.
A pixel of a MaskedImage.
Mask< MaskPixelT >::Ptr MaskPtr
shared pointer to the Mask
An const iterator to the MaskedImage.
std::string const fitsFile_RE
Citizen(const std::type_info &)
cached_location_t cache_location(int x, int y) const
Create a cached_location_t offset by (x, y) from locator.
void setXY0(int const x0, int const y0)
geom::Point2I getXY0() const
bool operator<(MaskedImageLocatorBase const &rhs)
Return true iff lhs is less than rhs.
Class for storing generic metadata.
Ref< MaskPixelT >::type mask(int x, int y)
Return a reference to the mask offset by (x, y) from the current position of the locator.
Ref< VariancePixelT >::type variance()
Return a reference to the variance at the current position of the locator.
int getWidth() const
Return the number of columns in the image.
const IMV_iterator_tuple get_iterator_tuple() const
void operator*=(ImagePixelT const rhs)
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
static MaskedImage readFits(std::string const &filename)
Read a MaskedImage from a regular FITS file.
MaskedImage< ImagePT, MaskPT, VarPT > type
Return the desired type.
y_iterator col_begin(int x) const
Return an y_iterator to the start of the image.
Base class for all persistable classes.
MaskedImageIteratorBase< const_ImageIterator, const_MaskIterator, const_VarianceIterator, ConstReference > MaskedImageIteratorBase_t
lsst::afw::image::Image< ImagePixelT > Image
MaskedImageLocator< typename Image::xy_locator, typename Mask::xy_locator, typename Variance::xy_locator > xy_locator
A locator for a MaskedImage.
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
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
void operator-=(lsst::afw::image::Image< ImagePixelT > const &rhs)
bool operator<(MaskedImageIteratorBase const &rhs)
Return true if the lhs is less than the rhs.
Ref< VariancePixelT >::type variance(cached_location_t const &cached_loc)
Return a reference to the variance at the offset set when we created the cached_location_t.
float VariancePixel
! default type for Masks and MaskedImage Masks
A class used to identify classes that represent MaskedImage pixels.
MaskedImageLocatorBase(ImageLocator const &img, MaskLocator const &msk, VarianceLocator const &var)
Construct a MaskedImageLocator from image/mask/variance locators.
_view_t::xy_locator xy_locator
An xy_locator.
y_iterator y_at(int x, int y) const
Return an y_iterator at the point (x, y)
MaskedImage & operator=(MaskedImage const &rhs)
Make the lhs use the rhs's pixels.
Definition of default types for Masks and Variance Images.
bool operator==(_x_or_y_iterator const &rhs)
MaskedImageLocatorBase & operator+=(pair2I const &p)
Increment the locator's x and y positions by p.
const_MaskedImageLocator(MaskedImageLocator< ImageLocator, MaskLocator, VarianceLocator > const &iter)
void scaledMinus(double const c, MaskedImage const &rhs)
_x_or_y_iterator(MaskedImageLocatorBase *mil)
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.
std::pair< int, double > positionToIndex(double const pos, lsst::afw::image::xOrY const xy) const
Convert image position to index (see Image::positionToIndex)
A const locator for the MaskedImage.
metafunction to extract reference type from PixelT
Ref< typename boost::mpl::at< PixelTVec, N >::type >::type apply_IMV()
metafunction to extract const reference type from PixelT