LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Classes | Public Types | Public Member Functions | List of all members
lsst::afw::math::MaskedVector< EntryT > Class Template Reference

#include <MaskedVector.h>

Inheritance diagram for lsst::afw::math::MaskedVector< EntryT >:
lsst::afw::image::MaskedImage< EntryT >

Classes

class  iterator
 

Public Types

typedef
lsst::afw::image::MaskedImage
< EntryT >::Pixel 
Pixel
 

Public Member Functions

 MaskedVector (int width=0)
 
boost::shared_ptr< std::vector
< EntryT > > 
getVector (bool const noThrow=false) const
 Return a (Ptr to) the MaskedImage's image. More...
 
Pixeloperator[] (int const i)
 
lsst::afw::image::MaskedImage
< EntryT >::Image::Pixel
value (int const i)
 
lsst::afw::image::MaskedImage
< EntryT >::Mask::Pixel
mask (int const i)
 
lsst::afw::image::MaskedImage
< EntryT >::Variance::Pixel
variance (int const i)
 
lsst::afw::image::MaskedImage
< EntryT >::ImagePtr 
getImage () const
 
lsst::afw::image::MaskedImage
< EntryT >::MaskPtr 
getMask () const
 
lsst::afw::image::MaskedImage
< EntryT >::VariancePtr 
getVariance () const
 
int size ()
 
bool empty ()
 
iterator begin ()
 
iterator end ()
 

Additional Inherited Members

- Private Types inherited from lsst::afw::image::MaskedImage< EntryT >
typedef Image< EntryT >::Ptr ImagePtr
 shared pointer to the Image More...
 
typedef Mask
< lsst::afw::image::MaskPixel >
::Ptr 
MaskPtr
 shared pointer to the Mask More...
 
typedef Image
< lsst::afw::image::VariancePixel >
::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
< lsst::afw::image::MaskPixel >
::MaskPlaneDict 
MaskPlaneDict
 The Mask's MaskPlaneDict. More...
 
typedef
lsst::afw::image::Image
< lsst::afw::image::VariancePixel
Variance
 
typedef
lsst::afw::image::Image
< EntryT > 
Image
 
typedef lsst::afw::image::Mask
< lsst::afw::image::MaskPixel
Mask
 
typedef detail::MaskedImage_tag image_category
 
typedef
lsst::afw::image::pixel::Pixel
< EntryT,
lsst::afw::image::MaskPixel,
lsst::afw::image::VariancePixel
Pixel
 A Pixel in the MaskedImage. More...
 
typedef
lsst::afw::image::pixel::SinglePixel
< EntryT,
lsst::afw::image::MaskPixel,
lsst::afw::image::VariancePixel
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...
 
- Private Types inherited from lsst::daf::base::Persistable
typedef boost::shared_ptr
< Persistable
Ptr
 
- Private 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)
 
- Private Member Functions inherited from lsst::afw::image::MaskedImage< EntryT >
 MaskedImage (unsigned int width, unsigned int height, MaskPlaneDict const &planeDict=MaskPlaneDict())
 
 MaskedImage (geom::Extent2I const &dimensions=geom::Extent2I(), MaskPlaneDict const &planeDict=MaskPlaneDict())
 
 MaskedImage (ImagePtr image, MaskPtr mask=MaskPtr(), VariancePtr variance=VariancePtr())
 
 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)
 
 MaskedImage (MaskedImage const &rhs, geom::Box2I const &bbox, ImageOrigin const origin=PARENT, bool const deep=false)
 
 MaskedImage (MaskedImage< OtherPixelT, lsst::afw::image::MaskPixel, lsst::afw::image::VariancePixel > const &rhs, const bool deep)
 
MaskedImageoperator= (MaskedImage const &rhs)
 
MaskedImageoperator= (Pixel const &rhs)
 
MaskedImageoperator= (SinglePixel const &rhs)
 
virtual ~MaskedImage ()
 
void swap (MaskedImage &rhs)
 
void operator<<= (MaskedImage const &rhs)
 
void operator+= (EntryTconst rhs)
 
void operator+= (MaskedImage const &rhs)
 
void operator+= (lsst::afw::image::Image< EntryT > const &rhs)
 
void operator+= (lsst::afw::math::Function2< double > const &function)
 
void scaledPlus (double const c, MaskedImage const &rhs)
 
void operator-= (EntryTconst rhs)
 
void operator-= (MaskedImage const &rhs)
 
void operator-= (lsst::afw::image::Image< EntryT > const &rhs)
 
void operator-= (lsst::afw::math::Function2< double > const &function)
 
void scaledMinus (double const c, MaskedImage const &rhs)
 
void operator*= (EntryTconst rhs)
 
void operator*= (MaskedImage const &rhs)
 
void operator*= (lsst::afw::image::Image< EntryT > const &rhs)
 
void scaledMultiplies (double const c, MaskedImage const &rhs)
 
void operator/= (EntryTconst rhs)
 
void operator/= (MaskedImage const &rhs)
 
void operator/= (lsst::afw::image::Image< EntryT > 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
 
fast_iterator begin (bool) const
 
iterator end () const
 
fast_iterator end (bool) const
 
iterator at (int const x, int const y) const
 
reverse_iterator rbegin () const
 
reverse_iterator rend () const
 
x_iterator row_begin (int y) const
 
x_iterator row_end (int y) const
 
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
 
y_iterator col_end (int x) const
 
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...
 
- Private Member Functions inherited from lsst::daf::base::Persistable
 Persistable (void)
 
virtual ~Persistable (void)
 
template<class Archive >
void serialize (Archive &, unsigned int const)
 
- Private Member Functions inherited from lsst::daf::base::Citizen
 Citizen (const std::type_info &)
 
 Citizen (Citizen const &)
 
 ~Citizen ()
 
Citizenoperator= (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 Private Member Functions inherited from lsst::afw::image::MaskedImage< EntryT >
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 Private 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...
 

Detailed Description

template<typename EntryT>
class lsst::afw::math::MaskedVector< EntryT >

Examples:
imageStatistics.cc.

Definition at line 37 of file MaskedVector.h.

Member Typedef Documentation

template<typename EntryT>
typedef lsst::afw::image::MaskedImage<EntryT>::Pixel lsst::afw::math::MaskedVector< EntryT >::Pixel

Definition at line 40 of file MaskedVector.h.

Constructor & Destructor Documentation

template<typename EntryT>
lsst::afw::math::MaskedVector< EntryT >::MaskedVector ( int  width = 0)
inlineexplicit

Definition at line 42 of file MaskedVector.h.

42  : //, MaskPlaneDict const& planeDict=MaskPlaneDict()) :
Extent< int, 2 > Extent2I
Definition: Extent.h:355
void ImageT ImageT int float saturatedPixelValue int const width
Definition: saturated.cc:44

Member Function Documentation

template<typename EntryT>
iterator lsst::afw::math::MaskedVector< EntryT >::begin ( )
inline

Definition at line 117 of file MaskedVector.h.

117 { return this->row_begin(0); }
template<typename EntryT>
bool lsst::afw::math::MaskedVector< EntryT >::empty ( )
inline

Definition at line 98 of file MaskedVector.h.

98 { return this->getWidth(0) == 0; }
int getWidth() const
Return the number of columns in the image.
Definition: MaskedImage.h:901
template<typename EntryT>
iterator lsst::afw::math::MaskedVector< EntryT >::end ( )
inline

Definition at line 118 of file MaskedVector.h.

118 { return this->row_end(0); }
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::ImagePtr lsst::afw::math::MaskedVector< EntryT >::getImage ( ) const
inline

Definition at line 83 of file MaskedVector.h.

83  {
85  }
ImagePtr getImage(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage&#39;s image.
Definition: MaskedImage.h:869
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::MaskPtr lsst::afw::math::MaskedVector< EntryT >::getMask ( ) const
inline

Definition at line 86 of file MaskedVector.h.

86  {
88  }
MaskPtr getMask(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage&#39;s mask.
Definition: MaskedImage.h:879
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::VariancePtr lsst::afw::math::MaskedVector< EntryT >::getVariance ( ) const
inline

Definition at line 89 of file MaskedVector.h.

89  {
91  }
VariancePtr getVariance(bool const noThrow=false) const
Return a (Ptr to) the MaskedImage&#39;s variance.
Definition: MaskedImage.h:890
template<typename EntryT>
boost::shared_ptr<std::vector<EntryT> > lsst::afw::math::MaskedVector< EntryT >::getVector ( bool const  noThrow = false) const
inline

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

Definition at line 47 of file MaskedVector.h.

47  {
48  if (!this->getImage() && !noThrow) {
49  throw LSST_EXCEPT(lsst::pex::exceptions::RuntimeError, "MaskedVector's Image is NULL");
50  }
51 
52  boost::shared_ptr<std::vector<EntryT> > imgcp(new std::vector<EntryT>(0));
53  for (int i_y = 0; i_y < this->getImage()->getHeight(); ++i_y) {
54  for (typename lsst::afw::image::Image<EntryT>::x_iterator ptr = this->getImage()->row_begin(i_y);
55  ptr != this->getImage()->row_end(i_y); ++ptr) {
56  imgcp->push_back(*ptr);
57  }
58  }
59  return imgcp;
60  }
x_iterator row_begin(int y) const
Return an x_iterator to the start of the image.
Definition: MaskedImage.cc:742
int getHeight() const
Return the number of rows in the image.
Definition: MaskedImage.h:903
_view_t::x_iterator x_iterator
An iterator for traversing the pixels in a row.
Definition: Image.h:151
x_iterator row_end(int y) const
Return an x_iterator to the end of the image.
Definition: MaskedImage.cc:752
#define LSST_EXCEPT(type,...)
Definition: Exception.h:46
lsst::afw::image::MaskedImage< EntryT >::ImagePtr getImage() const
Definition: MaskedVector.h:83
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::Mask::Pixel& lsst::afw::math::MaskedVector< EntryT >::mask ( int const  i)
inline

Definition at line 75 of file MaskedVector.h.

75  {
77  }
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:77
template<typename EntryT>
Pixel& lsst::afw::math::MaskedVector< EntryT >::operator[] ( int const  i)
inline

Definition at line 64 of file MaskedVector.h.

64  {
68  );
69  }
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:77
lsst::afw::image::MaskedImage< EntryT >::Pixel Pixel
Definition: MaskedVector.h:40
template<typename EntryT>
int lsst::afw::math::MaskedVector< EntryT >::size ( )
inline

Definition at line 97 of file MaskedVector.h.

97 { return this->getWidth(0); }
int getWidth() const
Return the number of columns in the image.
Definition: MaskedImage.h:901
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::Image::Pixel& lsst::afw::math::MaskedVector< EntryT >::value ( int const  i)
inline

Definition at line 72 of file MaskedVector.h.

72  {
74  }
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:77
template<typename EntryT>
lsst::afw::image::MaskedImage<EntryT>::Variance::Pixel& lsst::afw::math::MaskedVector< EntryT >::variance ( int const  i)
inline

Definition at line 78 of file MaskedVector.h.

78  {
80  }
A class to manipulate images, masks, and variance as a single object.
Definition: MaskedImage.h:77

The documentation for this class was generated from the following file: