Template Class DecoratedImage¶
Defined in File Image.h
Class Documentation¶
-
template<typename
PixelT
>
classDecoratedImage
¶ A container for an Image and its associated metadata
Public Functions
-
DecoratedImage
(const lsst::geom::Extent2I &dimensions = lsst::geom::Extent2I())¶ Create an image of the specified size
- Parameters
dimensions
: desired number of columns. rows
-
DecoratedImage
(const lsst::geom::Box2I &bbox)¶ Create an image of the specified size
- 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
: (width, height) and origin of the desired Image
Create a DecoratedImage wrapping
rhs
Note that this ctor shares pixels with the rhs; it isn’t a deep copy
- Parameters
rhs
: Image to go into DecoratedImage
-
DecoratedImage
(DecoratedImage const &rhs, const bool deep = false)¶ Copy constructor
Note that the lhs will share memory with the rhs unless
deep
is true- Parameters
rhs
: right hand sidedeep
: Make deep copy?
-
DecoratedImage
(std::string const &fileName, const int hdu = fits::DEFAULT_HDU, lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin const origin = PARENT, bool allowUnsafe = false)¶ Create a DecoratedImage from a FITS file
- Parameters
fileName
: File to readhdu
: The HDU to readbbox
: Only read these pixelsorigin
: Coordinate system of the bboxallowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
DecoratedImage &
operator=
(const DecoratedImage &image)¶ Assignment operator
N.b. this is a shallow assignment; use set(src) if you want to copy the pixels
-
int
getWidth
() const¶ Return the number of columns in the image.
-
int
getHeight
() const¶ Return the number of rows in the image.
-
int
getX0
() const¶ Return the image’s column-origin.
-
int
getY0
() const¶ Return the image’s row-origin.
-
const lsst::geom::Extent2I
getDimensions
() const¶ Return the image’s size; useful for passing to constructors.
-
void
swap
(DecoratedImage &rhs)¶
Write a FITS file
- Parameters
fileName
: the file to writemetadata
: metadata to write to header; or NULLmode
: “w” to write a new file; “a” to append
Write a FITS file
- Parameters
[in] fileName
: the file to write[in] options
: Options controlling writing of FITS image.[in] metadata
: metadata to write to header; or NULL[in] mode
: “w” to write a new file; “a” to append
-
std::shared_ptr<Image<PixelT>>
getImage
()¶ Return a shared_ptr to the DecoratedImage’s Image.
-
std::shared_ptr<Image<PixelT> const>
getImage
() const¶ Return a shared_ptr to the DecoratedImage’s Image as const.
-
double
getGain
() const¶ Return the DecoratedImage’s gain
- Note
This is mostly just a place holder for other properties that we might want to associate with a DecoratedImage
-
void
setGain
(double gain)¶ Set the DecoratedImage’s gain.
-