LSSTApplications
17.0+11,17.0+34,17.0+56,17.0+57,17.0+59,17.0+7,17.0-1-g377950a+33,17.0.1-1-g114240f+2,17.0.1-1-g4d4fbc4+28,17.0.1-1-g55520dc+49,17.0.1-1-g5f4ed7e+52,17.0.1-1-g6dd7d69+17,17.0.1-1-g8de6c91+11,17.0.1-1-gb9095d2+7,17.0.1-1-ge9fec5e+5,17.0.1-1-gf4e0155+55,17.0.1-1-gfc65f5f+50,17.0.1-1-gfc6fb1f+20,17.0.1-10-g87f9f3f+1,17.0.1-11-ge9de802+16,17.0.1-16-ga14f7d5c+4,17.0.1-17-gc79d625+1,17.0.1-17-gdae4c4a+8,17.0.1-2-g26618f5+29,17.0.1-2-g54f2ebc+9,17.0.1-2-gf403422+1,17.0.1-20-g2ca2f74+6,17.0.1-23-gf3eadeb7+1,17.0.1-3-g7e86b59+39,17.0.1-3-gb5ca14a,17.0.1-3-gd08d533+40,17.0.1-30-g596af8797,17.0.1-4-g59d126d+4,17.0.1-4-gc69c472+5,17.0.1-6-g5afd9b9+4,17.0.1-7-g35889ee+1,17.0.1-7-gc7c8782+18,17.0.1-9-gc4bbfb2+3,w.2019.22
LSSTDataManagementBasePackage
|
A class to represent a 2-dimensional array of pixels. More...
#include <Image.h>
Classes | |
struct | ImageTypeFactory |
A templated class to return this classes' type (present in Image/Mask/MaskedImage) More... | |
Public Types | |
typedef detail::Image_tag | image_category |
typedef PixelT | SinglePixel |
A single Pixel of the same type as those in the ImageBase. More... | |
typedef PixelT | Pixel |
A pixel in this ImageBase. More... | |
typedef Reference< PixelT >::type | PixelReference |
A Reference to a PixelT. More... | |
typedef ConstReference< PixelT >::type | PixelConstReference |
A ConstReference to a PixelT. More... | |
typedef _view_t::xy_locator | xy_locator |
An xy_locator. More... | |
typedef _view_t::xy_locator::const_t | const_xy_locator |
A const_xy_locator. More... | |
typedef _view_t::iterator | iterator |
An STL compliant iterator. More... | |
typedef _const_view_t::iterator | const_iterator |
An STL compliant const iterator. More... | |
typedef _view_t::reverse_iterator | reverse_iterator |
An STL compliant reverse iterator. More... | |
typedef _const_view_t::reverse_iterator | const_reverse_iterator |
An STL compliant const reverse iterator. More... | |
typedef _view_t::x_iterator | x_iterator |
An iterator for traversing the pixels in a row. More... | |
typedef x_iterator | fast_iterator |
A fast STL compliant iterator for contiguous images N.b. More... | |
typedef _view_t::x_iterator | xy_x_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. More... | |
typedef _const_view_t::x_iterator | const_x_iterator |
A const iterator for traversing the pixels in a row. More... | |
typedef _view_t::y_iterator | y_iterator |
An iterator for traversing the pixels in a column. More... | |
typedef _view_t::y_iterator | xy_y_iterator |
An iterator for traversing the pixels in a row, created from an xy_locator. More... | |
typedef _const_view_t::y_iterator | const_y_iterator |
A const iterator for traversing the pixels in a column. More... | |
typedef ndarray::Array< PixelT, 2, 1 > | Array |
A mutable ndarray representation of the image. More... | |
typedef ndarray::Array< PixelT const, 2, 1 > | ConstArray |
An immutable ndarray representation of the image. More... | |
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 | |
Image (unsigned int width, unsigned int height, PixelT initialValue=0) | |
Create an initialised Image of the specified size. More... | |
Image (lsst::geom::Extent2I const &dimensions=lsst::geom::Extent2I(), PixelT initialValue=0) | |
Create an initialised Image of the specified size. More... | |
Image (lsst::geom::Box2I const &bbox, PixelT initialValue=0) | |
Create an initialized Image of the specified size. More... | |
Image (Image const &rhs, lsst::geom::Box2I const &bbox, ImageOrigin const origin=PARENT, const bool deep=false) | |
Copy constructor to make a copy of part of an Image. More... | |
Image (const Image &rhs, const bool deep=false) | |
Copy constructor. More... | |
Image (Image &&rhs) | |
Image (std::string const &fileName, int hdu=fits::DEFAULT_HDU, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool allowUnsafe=false) | |
Construct an Image by reading a regular FITS file. More... | |
Image (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool allowUnsafe=false) | |
Construct an Image by reading a FITS image in memory. More... | |
Image (fits::Fits &fitsfile, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT, bool allowUnsafe=false) | |
Construct an Image from an already-open FITS object. More... | |
template<typename OtherPixelT > | |
Image (Image< OtherPixelT > const &rhs, const bool deep) | |
Image (ndarray::Array< PixelT, 2, 1 > const &array, bool deep=false, lsst::geom::Point2I const &xy0=lsst::geom::Point2I()) | |
~Image () override=default | |
Image & | operator= (const PixelT rhs) |
Set the image's pixels to rhs. More... | |
Image & | operator= (const Image &rhs) |
Assignment operator. More... | |
Image & | operator= (Image &&rhs) |
Image | subset (lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT) const |
Return a subimage corresponding to the given box. More... | |
Image | operator[] (lsst::geom::Box2I const &bbox) const |
Return a subimage corresponding to the given box (interpreted as PARENT coordinates). More... | |
void | writeFits (std::string const &fileName, std::shared_ptr< lsst::daf::base::PropertySet const > metadata=std::shared_ptr< lsst::daf::base::PropertySet const >(), std::string const &mode="w") const |
Write an image to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, std::shared_ptr< lsst::daf::base::PropertySet const > metadata=std::shared_ptr< lsst::daf::base::PropertySet const >(), std::string const &mode="w") const |
Write an image to a FITS RAM file. More... | |
void | writeFits (fits::Fits &fitsfile, std::shared_ptr< lsst::daf::base::PropertySet const > metadata=std::shared_ptr< lsst::daf::base::PropertySet const >()) const |
Write an image to an open FITS file object. More... | |
void | writeFits (std::string const &filename, fits::ImageWriteOptions const &options, std::string const &mode="w", std::shared_ptr< daf::base::PropertySet const > header=nullptr, std::shared_ptr< Mask< MaskPixel > const > mask=nullptr) const |
Write an image to a regular FITS file. More... | |
void | writeFits (fits::MemFileManager &manager, fits::ImageWriteOptions const &options, std::string const &mode="w", std::shared_ptr< daf::base::PropertySet const > header=nullptr, std::shared_ptr< Mask< MaskPixel > const > mask=nullptr) const |
Write an image to a FITS RAM file. More... | |
void | writeFits (fits::Fits &fitsfile, fits::ImageWriteOptions const &options, std::shared_ptr< daf::base::PropertySet const > header=nullptr, std::shared_ptr< Mask< MaskPixel > const > mask=nullptr) const |
Write an image to an open FITS file object. More... | |
void | swap (Image &rhs) |
Image & | operator+= (PixelT const rhs) |
Add scalar rhs to lhs. More... | |
virtual Image & | operator+= (Image< PixelT > const &rhs) |
Add Image rhs to lhs. More... | |
Image & | operator+= (lsst::afw::math::Function2< double > const &function) |
Add a Function2(x, y) to an Image. More... | |
void | scaledPlus (double const c, Image< PixelT > const &rhs) |
Add Image c*rhs to lhs. More... | |
Image & | operator-= (PixelT const rhs) |
Subtract scalar rhs from lhs. More... | |
Image & | operator-= (Image< PixelT > const &rhs) |
Subtract Image rhs from lhs. More... | |
Image & | operator-= (lsst::afw::math::Function2< double > const &function) |
Subtract a Function2(x, y) from an Image. More... | |
void | scaledMinus (double const c, Image< PixelT > const &rhs) |
Subtract Image c*rhs from lhs. More... | |
Image & | operator*= (PixelT const rhs) |
Multiply lhs by scalar rhs. More... | |
Image & | operator*= (Image< PixelT > const &rhs) |
Multiply lhs by Image rhs (i.e. pixel-by-pixel multiplication) More... | |
void | scaledMultiplies (double const c, Image< PixelT > const &rhs) |
Multiply lhs by Image c*rhs (i.e. pixel-by-pixel multiplication) More... | |
Image & | operator/= (PixelT const rhs) |
Divide lhs by scalar rhs. More... | |
Image & | operator/= (Image< PixelT > const &rhs) |
Divide lhs by Image rhs (i.e. pixel-by-pixel division) More... | |
void | scaledDivides (double const c, Image< PixelT > const &rhs) |
Divide lhs by Image c*rhs (i.e. pixel-by-pixel division) More... | |
void | sqrt () |
template<> | |
Image< double > & | operator/= (double const rhs) |
template<> | |
Image< float > & | operator/= (float const rhs) |
ImageBase & | operator<<= (const ImageBase &rhs) |
Set the lhs's pixel values to equal the rhs's. More... | |
void | assign (ImageBase const &rhs, lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT) |
Copy pixels from another image to a specified subregion of this image. More... | |
PixelReference | get (lsst::geom::Point2I const &index, ImageOrigin origin) |
Return a reference to a single pixel (with no bounds check). More... | |
PixelConstReference | get (lsst::geom::Point2I const &index, ImageOrigin origin) const |
Return a const reference to a single pixel (with no bounds check). More... | |
PixelReference | operator[] (lsst::geom::Point2I const &index) |
Return a reference to a single pixel in PARENT coordinates (with no bounds check). More... | |
PixelConstReference | operator[] (lsst::geom::Point2I const &index) const |
Return a reference to a single pixel in PARENT coordinates (with no bounds check). 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... | |
int | getX0 () const |
Return the image's column-origin. More... | |
int | getY0 () const |
Return the image's row-origin. More... | |
lsst::geom::Point2I | getXY0 () const |
Return the image's origin. More... | |
std::pair< int, double > | positionToIndex (double const pos, lsst::afw::image::xOrY const xy) const |
Convert image position to index (nearest integer and fractional parts) More... | |
double | indexToPosition (double ind, lsst::afw::image::xOrY const xy) const |
Convert image index to image position. More... | |
lsst::geom::Extent2I | getDimensions () const |
Return the image's size; useful for passing to constructors. More... | |
void | swap (ImageBase &rhs) |
Array | getArray () |
ConstArray | getArray () const |
iterator | begin () const |
Return an STL compliant iterator to the start of the image. More... | |
fast_iterator | begin (bool contiguous) const |
Return a fast STL compliant iterator to the start of the image which must be contiguous. More... | |
iterator | end () const |
Return an STL compliant iterator to the end of the image. More... | |
fast_iterator | end (bool contiguous) const |
Return a fast STL compliant iterator to the end of the image which must be contiguous. More... | |
reverse_iterator | rbegin () const |
Return an STL compliant reverse iterator to the start of the image. More... | |
reverse_iterator | rend () const |
Return an STL compliant reverse iterator to the end of the image. More... | |
iterator | at (int x, int y) const |
Return an STL compliant iterator at the point (x, y) More... | |
x_iterator | row_begin (int y) const |
Return an x_iterator to the start of the y 'th row. More... | |
x_iterator | row_end (int y) const |
Return an x_iterator to the end of the y 'th row. More... | |
x_iterator | x_at (int x, int y) const |
Return an x_iterator to the point (x, y) in the image. More... | |
y_iterator | col_begin (int x) const |
Return an y_iterator to the start of the y 'th row. More... | |
y_iterator | col_end (int x) const |
Return an y_iterator to the start of the y 'th row. More... | |
y_iterator | y_at (int x, int y) const |
Return an y_iterator to the point (x, y) in the image. More... | |
xy_locator | xy_at (int x, int y) const |
Return an xy_locator at the point (x, y) in the image. More... | |
void | setXY0 (lsst::geom::Point2I const origin) |
Set the ImageBase's origin. More... | |
void | setXY0 (int const x0, int const y0) |
Set the ImageBase's origin. More... | |
lsst::geom::Box2I | getBBox (ImageOrigin origin=PARENT) 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... | |
PixelReference | operator() (int x, int y) |
PixelReference | operator() (int x, int y, CheckIndices const &) |
Return a reference to the pixel (x, y) with bounds checking. More... | |
PixelConstReference | operator() (int x, int y) const |
Return a const reference to the pixel (x, y) More... | |
PixelConstReference | operator() (int x, int y, CheckIndices const &) const |
Return a const reference to the pixel (x, y) with bounds checking. More... | |
PixelConstReference | get0 (int x, int y) const |
PixelConstReference | get0 (int x, int y, CheckIndices const &check) const |
void | set0 (int x, int y, const PixelT v) |
void | set0 (int x, int y, const PixelT v, CheckIndices const &check) |
Static Public Member Functions | |
static Image | readFits (std::string const &filename, int hdu=fits::DEFAULT_HDU) |
Read an Image from a regular FITS file. More... | |
static Image | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an Image from a FITS RAM file. More... | |
template<typename SinglePixelT > | |
static SinglePixel | PixelCast (SinglePixelT rhs) |
Convert a type to our SinglePixel type. More... | |
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... | |
Census | |
Provide a list of current Citizens | |
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... | |
callbackIDs | |
Set callback Ids. The old Id is returned | |
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... | |
callbacks | |
Set the New/Delete callback functions; in each case the previously installed callback is returned. These callback functions return a value which is Added to the previously registered id. The default callback functions are called default{New,Delete}Callback; you may want to set a break point in these callbacks from your favourite debugger | |
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... | |
Protected Member Functions | |
_view_t | _getRawView () const |
bool | isContiguous () const |
Static Protected Member Functions | |
static _view_t | _allocateView (lsst::geom::Extent2I const &dimensions, Manager::Ptr &manager) |
static _view_t | _makeSubView (lsst::geom::Extent2I const &dimensions, lsst::geom::Extent2I const &offset, const _view_t &view) |
Friends | |
template<typename , typename , typename > | |
class | MaskedImage |
template<typename OtherPixelT > | |
class | Image |
Related Functions | |
(Note that these are not member functions.) | |
template<typename ImageT > | |
ImageT::SinglePixel | badPixel (typename ImageT::Pixel bad=0) |
Return a value indicating a bad pixel for the given Image type. More... | |
A class to represent a 2-dimensional array of pixels.
|
inherited |
A mutable ndarray representation of the image.
Definition at line 150 of file ImageBase.h.
|
inherited |
An STL compliant const iterator.
Definition at line 128 of file ImageBase.h.
|
inherited |
An STL compliant const reverse iterator.
Definition at line 132 of file ImageBase.h.
|
inherited |
A const iterator for traversing the pixels in a row.
Definition at line 142 of file ImageBase.h.
|
inherited |
A const_xy_locator.
Definition at line 124 of file ImageBase.h.
|
inherited |
A const iterator for traversing the pixels in a column.
Definition at line 148 of file ImageBase.h.
|
inherited |
An immutable ndarray representation of the image.
Definition at line 152 of file ImageBase.h.
|
inherited |
A fast STL compliant iterator for contiguous images N.b.
The order of pixel access is undefined
Definition at line 138 of file ImageBase.h.
typedef detail::Image_tag lsst::afw::image::Image< PixelT >::image_category |
|
inherited |
An STL compliant iterator.
Definition at line 126 of file ImageBase.h.
|
inherited |
|
inherited |
A pixel in this ImageBase.
Definition at line 116 of file ImageBase.h.
|
inherited |
A ConstReference to a PixelT.
Definition at line 120 of file ImageBase.h.
|
inherited |
A Reference to a PixelT.
Definition at line 118 of file ImageBase.h.
|
inherited |
An STL compliant reverse iterator.
Definition at line 130 of file ImageBase.h.
|
inherited |
A single Pixel of the same type as those in the ImageBase.
Definition at line 114 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row.
Definition at line 134 of file ImageBase.h.
|
inherited |
An xy_locator.
Definition at line 122 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row, created from an xy_locator.
Definition at line 140 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a row, created from an xy_locator.
Definition at line 146 of file ImageBase.h.
|
inherited |
An iterator for traversing the pixels in a column.
Definition at line 144 of file ImageBase.h.
|
explicit |
Create an initialised Image of the specified size.
width | number of columns |
height | number of rows |
initialValue | Initial value |
dimensions
member which may be conveniently used to make objects of an appropriate size Definition at line 334 of file Image.cc.
|
explicit |
Create an initialised Image of the specified size.
dimensions | Number of columns, rows |
initialValue | Initial value |
dimensions
member which may be conveniently used to make objects of an appropriate size Definition at line 340 of file Image.cc.
|
explicit |
|
explicit |
Copy constructor to make a copy of part of an Image.
The bbox ignores X0/Y0 if origin == LOCAL, and uses it if origin == PARENT.
rhs | Right-hand-side Image |
bbox | Specify desired region |
origin | Coordinate system of the bbox |
deep | If false, new ImageBase shares storage with rhs; if true make a new, standalone, ImageBase |
deep
is true
, the new image will share the old image's pixels; this is probably what you want Definition at line 357 of file Image.cc.
lsst::afw::image::Image< PixelT >::Image | ( | const Image< PixelT > & | rhs, |
const bool | deep = false |
||
) |
Copy constructor.
rhs | Right-hand-side Image |
deep | If false, new Image shares storage with rhs; if true make a new, standalone, ImageBase |
deep
is true
, the new image will share the old image's pixels; this may not be what you want. See also assign(rhs) to copy pixels between Images lsst::afw::image::Image< PixelT >::Image | ( | Image< PixelT > && | rhs | ) |
|
explicit |
Construct an Image by reading a regular FITS file.
[in] | fileName | File to read. |
[in] | hdu | HDU to read, 0-indexed (i.e. 0=Primary HDU). The special value of afw::fits::DEFAULT_HDU reads the Primary HDU unless it is empty, in which case it reads the first extension HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[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] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
|
explicit |
Construct an Image by reading a FITS image in memory.
[in] | manager | An object that manages the memory buffer to read. |
[in] | hdu | HDU to read, 0-indexed (i.e. 0=Primary HDU). The special value of afw::fits::DEFAULT_HDU reads the Primary HDU unless it is empty, in which case it reads the first extension HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[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] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
|
explicit |
Construct an Image from an already-open FITS object.
[in] | fitsfile | A FITS object to read from, already at the desired HDU. |
[in,out] | metadata | Metadata read from the header (may be null). |
[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] | allowUnsafe | Permit reading into the requested pixel type even when on-disk values may overflow or truncate. |
|
inline |
Definition at line 190 of file Image.h.
|
inlineexplicit |
Definition at line 192 of file Image.h.
|
overridedefault |
|
staticprotectedinherited |
Definition at line 58 of file Image.cc.
|
inlineprotectedinherited |
Definition at line 483 of file ImageBase.h.
|
staticprotectedinherited |
Definition at line 78 of file Image.cc.
|
inherited |
Copy pixels from another image to a specified subregion of this image.
[in] | rhs | source image whose pixels are to be copied into this image (the destination) |
[in] | bbox | subregion of this image to set; if empty (the default) then all pixels are set |
[in] | origin | origin of bbox: if PARENT then the lower left pixel of this image is at xy0 if LOCAL then the lower left pixel of this image is at 0,0 |
lsst::pex::exceptions::LengthError | if the dimensions of rhs and the specified subregion of this image do not match. |
Definition at line 177 of file Image.cc.
|
inherited |
|
inherited |
Return an STL compliant iterator to the start of the image.
Note that this isn't especially efficient; see imageIterators for a discussion
|
inherited |
Return a fast STL compliant iterator to the start of the image which must be contiguous.
contiguous | Pixels are contiguous (must be true) |
lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 300 of file Image.cc.
|
staticinherited |
How many active Citizens are there?
startingMemId | Don't print Citizens with lower IDs |
Definition at line 238 of file Citizen.cc.
|
staticinherited |
Print a list of all active Citizens to stream, sorted by ID.
stream | stream to print to |
startingMemId | Don't print Citizens with lower IDs |
Definition at line 259 of file Citizen.cc.
|
staticinherited |
Return a (newly allocated) std::vector of active Citizens sorted by ID.
You are responsible for deleting it; or you can say std::unique_ptr<std::vector<Citizen const*> const> leaks(Citizen::census()); and not bother (that becomes std::unique_ptr in C++11)
Definition at line 287 of file Citizen.cc.
|
inlineinherited |
Return an y_iterator
to the start of the y
'th row.
Incrementing an y_iterator
moves it up the column
Definition at line 431 of file ImageBase.h.
|
inlineinherited |
|
inherited |
|
inherited |
Return a fast STL compliant iterator to the end of the image which must be contiguous.
contiguous | Pixels are contiguous (must be true) |
lsst::pex::exceptions::RuntimeError | Argument contiguous is false, or the pixels are not in fact contiguous |
Definition at line 312 of file Image.cc.
|
inherited |
Return a reference to a single pixel (with no bounds check).
Definition at line 234 of file Image.cc.
|
inherited |
Return a const reference to a single pixel (with no bounds check).
Definition at line 246 of file Image.cc.
|
inlineinherited |
No timeline for removal. Replaced by get(Point2I, ImageOrigin).Return a reference to the pixel (x, y)
Definition at line 291 of file ImageBase.h.
|
inlineinherited |
No timeline for removal. Replaced by get(Point2I, ImageOrigin).Return a reference to the pixel (x, y)
Definition at line 292 of file ImageBase.h.
|
inherited |
Definition at line 494 of file ImageBase.h.
|
inherited |
Definition at line 502 of file ImageBase.h.
|
inlineinherited |
Definition at line 463 of file ImageBase.h.
|
inlineinherited |
Return the image's size; useful for passing to constructors.
Definition at line 374 of file ImageBase.h.
|
inlineinherited |
Return the number of rows in the image.
Definition at line 316 of file ImageBase.h.
|
inherited |
|
staticinherited |
Return the memId of the next object to be allocated.
Definition at line 209 of file Citizen.cc.
|
inlineinherited |
Return the number of columns in the image.
Definition at line 314 of file ImageBase.h.
|
inlineinherited |
Return the image's column-origin.
This will usually be 0 except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 324 of file ImageBase.h.
|
inlineinherited |
Return the image's origin.
This will usually be (0, 0) except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 341 of file ImageBase.h.
|
inlineinherited |
Return the image's row-origin.
This will usually be 0 except for images created using the ImageBase(fileName, hdu, BBox, mode)
ctor or ImageBase(ImageBase, BBox)
cctor The origin can be reset with setXY0
Definition at line 332 of file ImageBase.h.
|
staticinherited |
Check all allocated blocks for corruption.
Definition at line 316 of file Citizen.cc.
|
inlineinherited |
Convert image index to image position.
The LSST indexing convention is:
ind | image index |
xy | Is this a column or row coordinate? |
Definition at line 367 of file ImageBase.h.
|
staticinherited |
Called once when the memory system is being initialised.
Definition at line 196 of file Citizen.cc.
|
inlineprotectedinherited |
Definition at line 485 of file ImageBase.h.
|
inherited |
Mark a Citizen as persistent and not destroyed until process end.
Definition at line 225 of file Citizen.cc.
|
inherited |
No timeline for removal. Replaced by get(Point2I, ImageOrigin).Return a reference to the pixel (x, y)
Definition at line 195 of file Image.cc.
|
inherited |
Return a reference to the pixel (x, y)
with bounds checking.
Definition at line 201 of file Image.cc.
|
inherited |
|
inherited |
Return a const reference to the pixel (x, y)
with bounds checking.
Definition at line 220 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator*= | ( | PixelT const | rhs | ) |
Multiply lhs by scalar rhs.
Definition at line 573 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator*= | ( | Image< PixelT > const & | rhs | ) |
Multiply lhs by Image rhs (i.e. pixel-by-pixel multiplication)
Definition at line 579 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator+= | ( | PixelT const | rhs | ) |
Add scalar rhs to lhs.
Definition at line 483 of file Image.cc.
|
virtual |
Add Image rhs to lhs.
Definition at line 489 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator+= | ( | lsst::afw::math::Function2< double > const & | function | ) |
Add a Function2(x, y) to an Image.
function | function to add |
Definition at line 502 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= | ( | PixelT const | rhs | ) |
Subtract scalar rhs from lhs.
Definition at line 528 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= | ( | Image< PixelT > const & | rhs | ) |
Subtract Image rhs from lhs.
Definition at line 534 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= | ( | lsst::afw::math::Function2< double > const & | function | ) |
Subtract a Function2(x, y) from an Image.
function | function to add |
Definition at line 560 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator/= | ( | PixelT const | rhs | ) |
Divide lhs by scalar rhs.
Definition at line 605 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator/= | ( | Image< PixelT > const & | rhs | ) |
Divide lhs by Image rhs (i.e. pixel-by-pixel division)
Definition at line 627 of file Image.cc.
Image< double > & lsst::afw::image::Image< double >::operator/= | ( | double const | rhs | ) |
Image< float > & lsst::afw::image::Image< float >::operator/= | ( | float const | rhs | ) |
|
inherited |
Set the lhs's pixel values to equal the rhs's.
Definition at line 171 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator= | ( | const PixelT | rhs | ) |
Set the image's pixels to rhs.
Definition at line 362 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator= | ( | const Image< PixelT > & | rhs | ) |
Assignment operator.
Definition at line 369 of file Image.cc.
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator= | ( | Image< PixelT > && | rhs | ) |
|
inline |
Return a subimage corresponding to the given box (interpreted as PARENT coordinates).
Definition at line 232 of file Image.h.
|
inlineinherited |
Return a reference to a single pixel in PARENT coordinates (with no bounds check).
Definition at line 308 of file ImageBase.h.
|
inlineinherited |
Return a reference to a single pixel in PARENT coordinates (with no bounds check).
Definition at line 311 of file ImageBase.h.
|
inlinestaticinherited |
Convert a type to our SinglePixel type.
Definition at line 159 of file ImageBase.h.
|
inlineinherited |
Convert image position to index (nearest integer and fractional parts)
pos | image position |
xy | Is this a column or row coordinate? |
Definition at line 348 of file ImageBase.h.
|
inherited |
|
inlinestatic |
Read an Image from a regular FITS file.
[in] | filename | Name of the file to read. |
[in] | hdu | Number of the "header-data unit" to read (where 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU is interpreted as "the first HDU with NAXIS != 0". |
|
inlinestatic |
Read an Image from a FITS RAM file.
[in] | manager | Object that manages the memory to be read. |
[in] | hdu | Number of the "header-data unit" to read (where 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU is interpreted as "the first HDU with NAXIS != 0". |
|
inherited |
|
inherited |
Return a string representation of a Citizen.
Definition at line 219 of file Citizen.cc.
|
inlineinherited |
Return an x_iterator
to the start of the y
'th row.
Incrementing an x_iterator
moves it across the row
Definition at line 419 of file ImageBase.h.
|
inlineinherited |
void lsst::afw::image::Image< PixelT >::scaledDivides | ( | double const | c, |
Image< PixelT > const & | rhs | ||
) |
Divide lhs by Image c*rhs (i.e. pixel-by-pixel division)
Definition at line 640 of file Image.cc.
void lsst::afw::image::Image< PixelT >::scaledMinus | ( | double const | c, |
Image< PixelT > const & | rhs | ||
) |
Subtract Image c*rhs from lhs.
Definition at line 547 of file Image.cc.
void lsst::afw::image::Image< PixelT >::scaledMultiplies | ( | double const | c, |
Image< PixelT > const & | rhs | ||
) |
Multiply lhs by Image c*rhs (i.e. pixel-by-pixel multiplication)
Definition at line 592 of file Image.cc.
void lsst::afw::image::Image< PixelT >::scaledPlus | ( | double const | c, |
Image< PixelT > const & | rhs | ||
) |
Add Image c*rhs to lhs.
Definition at line 515 of file Image.cc.
|
inlineinherited |
No timeline for removal. Replaced by get(Point2I, ImageOrigin).Return a reference to the pixel (x, y)
Definition at line 295 of file ImageBase.h.
|
inlineinherited |
No timeline for removal. Replaced by get(Point2I, ImageOrigin).Return a reference to the pixel (x, y)
Definition at line 296 of file ImageBase.h.
|
staticinherited |
Set the CorruptionCallback function.
func | function be called when block is found to be corrupted |
Definition at line 391 of file Citizen.cc.
|
staticinherited |
Set the DeleteCallback function.
func | function be called when desired block is deleted |
Definition at line 381 of file Citizen.cc.
|
staticinherited |
Call the current DeleteCallback when block is deleted.
id | Desired ID |
Definition at line 347 of file Citizen.cc.
|
staticinherited |
Set the NewCallback function.
func | The new function to be called when a designated block is allocated |
Definition at line 371 of file Citizen.cc.
|
staticinherited |
Call the NewCallback when block is allocated.
id | Desired ID |
Definition at line 337 of file Citizen.cc.
|
inlineinherited |
Set the ImageBase's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 452 of file ImageBase.h.
|
inlineinherited |
Set the ImageBase's origin.
The origin is usually set by the constructor, so you shouldn't need this function
Definition at line 461 of file ImageBase.h.
void lsst::afw::image::Image< PixelT >::sqrt | ( | ) |
|
inline |
Return a subimage corresponding to the given box.
bbox | Bounding box of the subimage returned. |
origin | Origin bbox is rleative to; PARENT accounts for xy0, LOCAL does not. |
This method is wrapped as getitem in Python.
Definition at line 227 of file Image.h.
void lsst::afw::image::Image< PixelT >::swap | ( | Image< PixelT > & | rhs | ) |
|
inherited |
void lsst::afw::image::Image< PixelT >::writeFits | ( | std::string const & | fileName, |
std::shared_ptr< lsst::daf::base::PropertySet const > | metadata = std::shared_ptr< lsst::daf::base::PropertySet const >() , |
||
std::string const & | mode = "w" |
||
) | const |
Write an image to a regular FITS file.
[in] | fileName | Name of the file to write. |
[in] | metadata | Additional values to write to the header (may be null). |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
void lsst::afw::image::Image< PixelT >::writeFits | ( | fits::MemFileManager & | manager, |
std::shared_ptr< lsst::daf::base::PropertySet const > | metadata = std::shared_ptr< lsst::daf::base::PropertySet const >() , |
||
std::string const & | mode = "w" |
||
) | const |
Write an image to a FITS RAM file.
[in] | manager | Manager object for the memory block to write to. |
[in] | metadata | Additional values to write to the header (may be null). |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
void lsst::afw::image::Image< PixelT >::writeFits | ( | fits::Fits & | fitsfile, |
std::shared_ptr< lsst::daf::base::PropertySet const > | metadata = std::shared_ptr< lsst::daf::base::PropertySet const >() |
||
) | const |
Write an image to an open FITS file object.
[in] | fitsfile | A FITS file already open to the desired HDU. |
[in] | metadata | Additional values to write to the header (may be null). |
void lsst::afw::image::Image< PixelT >::writeFits | ( | std::string const & | filename, |
fits::ImageWriteOptions const & | options, | ||
std::string const & | mode = "w" , |
||
std::shared_ptr< daf::base::PropertySet const > | header = nullptr , |
||
std::shared_ptr< Mask< MaskPixel > const > | mask = nullptr |
||
) | const |
Write an image to a regular FITS file.
[in] | filename | Name of the file to write. |
[in] | options | Options controlling writing of FITS image. |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
[in] | header | Additional values to write to the header (may be null). |
[in] | mask | Mask, for calculation of statistics. |
void lsst::afw::image::Image< PixelT >::writeFits | ( | fits::MemFileManager & | manager, |
fits::ImageWriteOptions const & | options, | ||
std::string const & | mode = "w" , |
||
std::shared_ptr< daf::base::PropertySet const > | header = nullptr , |
||
std::shared_ptr< Mask< MaskPixel > const > | mask = nullptr |
||
) | const |
Write an image to a FITS RAM file.
[in] | manager | Manager object for the memory block to write to. |
[in] | options | Options controlling writing of FITS image. |
[in] | header | Additional values to write to the header (may be null). |
[in] | mode | "w"=Create a new file; "a"=Append a new HDU. |
[in] | mask | Mask, for calculation of statistics. |
void lsst::afw::image::Image< PixelT >::writeFits | ( | fits::Fits & | fitsfile, |
fits::ImageWriteOptions const & | options, | ||
std::shared_ptr< daf::base::PropertySet const > | header = nullptr , |
||
std::shared_ptr< Mask< MaskPixel > const > | mask = nullptr |
||
) | const |
Write an image to an open FITS file object.
[in] | fitsfile | A FITS file already open to the desired HDU. |
[in] | options | Options controlling writing of FITS image. |
[in] | header | Additional values to write to the header (may be null). |
[in] | mask | Mask, for calculation of statistics. |
|
inlineinherited |
|
inlineinherited |
Return an xy_locator
at the point (x, y)
in the image.
Locators may be used to access a patch in an image
Definition at line 443 of file ImageBase.h.
|
inlineinherited |
|
related |