lsst.afw  13.0-92-g8ecf155+1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | Related Functions | List of all members
lsst::afw::image::Image< PixelT > Class Template Reference

A class to represent a 2-dimensional array of pixels. More...

#include <Image.h>

Inheritance diagram for lsst::afw::image::Image< PixelT >:
lsst::afw::image::ImageBase< PixelT > lsst::afw::image::ImageSlice< PixelT >

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
 
- Public Types inherited from lsst::afw::image::ImageBase< PixelT >
typedef detail::basic_tag image_category
 trait class to identify type of image More...
 
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...
 

Public Member Functions

 Image (unsigned int width, unsigned int height, PixelT initialValue=0)
 Create an initialised Image of the specified size. More...
 
 Image (geom::Extent2I const &dimensions=geom::Extent2I(), PixelT initialValue=0)
 Create an initialised Image of the specified size. More...
 
 Image (geom::Box2I const &bbox, PixelT initialValue=0)
 Create an initialized Image of the specified size. More...
 
 Image (Image const &rhs, 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 (std::string const &fileName, int hdu=INT_MIN, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT)
 Construct an Image by reading a regular FITS file. More...
 
 Image (fits::MemFileManager &manager, int hdu=INT_MIN, std::shared_ptr< lsst::daf::base::PropertySet > metadata=std::shared_ptr< lsst::daf::base::PropertySet >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT)
 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 >(), geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT)
 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, geom::Point2I const &xy0=geom::Point2I())
 
virtual ~Image ()
 
Image & operator= (const PixelT rhs)
 Set the image's pixels to rhs. More...
 
Image & operator= (const Image &rhs)
 Assignment operator. 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 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)
 
- Public Member Functions inherited from lsst::afw::image::ImageBase< PixelT >
 ImageBase (const geom::Extent2I &dimensions=geom::Extent2I())
 Allocator Constructor. More...
 
 ImageBase (const geom::Box2I &bbox)
 Allocator Constructor. More...
 
 ImageBase (const ImageBase &src, const bool deep=false)
 Copy constructor. More...
 
 ImageBase (const ImageBase &src, const geom::Box2I &bbox, const ImageOrigin origin=PARENT, const bool deep=false)
 Copy constructor to make a copy of part of an image. More...
 
template<typename OtherPixelT >
 ImageBase (const ImageBase< OtherPixelT > &rhs, const bool deep)
 generalised copy constructor More...
 
 ImageBase (Array const &array, bool deep=false, geom::Point2I const &xy0=geom::Point2I())
 Construction from ndarray::Array and NumPy. More...
 
virtual ~ImageBase ()
 
ImageBase & operator= (const ImageBase &rhs)
 Shallow assignment operator. More...
 
ImageBase & operator= (const PixelT rhs)
 Set the image's pixels to rhs. More...
 
ImageBase & operator<<= (const ImageBase &rhs)
 Set the lhs's pixel values to equal the rhs's. More...
 
void assign (ImageBase const &rhs, geom::Box2I const &bbox=geom::Box2I(), ImageOrigin origin=PARENT)
 Copy pixels from another image to a specified subregion of this image. More...
 
PixelReference operator() (int x, int y)
 Return a reference to the pixel (x, y) More...
 
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)
 
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...
 
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...
 
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...
 
iterator end () const
 Return an STL compliant iterator to the end of the image. 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...
 
fast_iterator begin (bool) const
 Return a fast STL compliant iterator to the start of the image which must be contiguous. More...
 
fast_iterator end (bool) const
 Return a fast STL compliant iterator to the end of the image which must be contiguous. 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 (geom::Point2I const origin)
 Set the ImageBase's origin. More...
 
void setXY0 (int const x0, int const y0)
 Set the ImageBase's origin. More...
 
geom::Box2I getBBox (ImageOrigin origin=PARENT) const
 

Static Public Member Functions

static Image readFits (std::string const &filename, int hdu=INT_MIN)
 Read an Image from a regular FITS file. More...
 
static Image readFits (fits::MemFileManager &manager, int hdu=INT_MIN)
 Read an Image from a FITS RAM file. More...
 
- Static Public Member Functions inherited from lsst::afw::image::ImageBase< PixelT >
template<typename SinglePixelT >
static SinglePixel PixelCast (SinglePixelT rhs)
 Convert a type to our SinglePixel type. More...
 

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...
 

Additional Inherited Members

- Protected Member Functions inherited from lsst::afw::image::ImageBase< PixelT >
_view_t _getRawView () const
 
bool isContiguous () const
 
- Static Protected Member Functions inherited from lsst::afw::image::ImageBase< PixelT >
static _view_t _allocateView (geom::Extent2I const &dimensions, Manager::Ptr &manager)
 
static _view_t _makeSubView (geom::Extent2I const &dimensions, geom::Extent2I const &offset, const _view_t &view)
 

Detailed Description

template<typename PixelT>
class lsst::afw::image::Image< PixelT >

A class to represent a 2-dimensional array of pixels.

Examples:
forEachPixel.cc, image1.cc, image2.cc, imageStatistics.cc, and statistics.cc.

Definition at line 486 of file Image.h.

Member Typedef Documentation

template<typename PixelT>
typedef detail::Image_tag lsst::afw::image::Image< PixelT >::image_category

Definition at line 491 of file Image.h.

Constructor & Destructor Documentation

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( unsigned int  width,
unsigned int  height,
PixelT  initialValue = 0 
)
explicit

Create an initialised Image of the specified size.

Parameters
widthnumber of columns
heightnumber of rows
initialValueInitial value
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

Definition at line 309 of file Image.cc.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( geom::Extent2I const &  dimensions = geom::Extent2I(),
PixelT  initialValue = 0 
)
explicit

Create an initialised Image of the specified size.

Parameters
dimensionsNumber of columns, rows
initialValueInitial value
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

Definition at line 315 of file Image.cc.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( geom::Box2I const &  bbox,
PixelT  initialValue = 0 
)
explicit

Create an initialized Image of the specified size.

Parameters
bboxdimensions and origin of desired Image
initialValueInitial value

Definition at line 320 of file Image.cc.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( Image< PixelT > const &  rhs,
geom::Box2I const &  bbox,
ImageOrigin const  origin = PARENT,
const bool  deep = false 
)
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.

Parameters
rhsRight-hand-side Image
bboxSpecify desired region
originCoordinate system of the bbox
deepIf false, new ImageBase shares storage with rhs; if true make a new, standalone, ImageBase
Note
Unless deep is true, the new image will share the old image's pixels; this is probably what you want

Definition at line 328 of file Image.cc.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( const Image< PixelT > &  rhs,
const bool  deep = false 
)

Copy constructor.

Parameters
rhsRight-hand-side Image
deepIf false, new Image shares storage with rhs; if true make a new, standalone, ImageBase
Note
Unless 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

Definition at line 325 of file Image.cc.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( std::string const &  fileName,
int  hdu = INT_MIN,
std::shared_ptr< lsst::daf::base::PropertySet >  metadata = std::shared_ptr< lsst::daf::base::PropertySet >(),
geom::Box2I const &  bbox = geom::Box2I(),
ImageOrigin  origin = PARENT 
)
explicit

Construct an Image by reading a regular FITS file.

Parameters
[in]fileNameFile to read.
[in]hduHDU to read, 0-indexed (i.e. 0=Primary HDU). The special value of INT_MIN reads the Primary HDU unless it is empty, in which case it reads the first extension HDU.
[in,out]metadataMetadata read from the header (may be null).
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( fits::MemFileManager &  manager,
int  hdu = INT_MIN,
std::shared_ptr< lsst::daf::base::PropertySet >  metadata = std::shared_ptr< lsst::daf::base::PropertySet >(),
geom::Box2I const &  bbox = geom::Box2I(),
ImageOrigin  origin = PARENT 
)
explicit

Construct an Image by reading a FITS image in memory.

Parameters
[in]managerAn object that manages the memory buffer to read.
[in]hduHDU to read, 0-indexed (i.e. 0=Primary HDU). The special value of INT_MIN reads the Primary HDU unless it is empty, in which case it reads the first extension HDU.
[in,out]metadataMetadata read from the header (may be null).
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( fits::Fits &  fitsfile,
std::shared_ptr< lsst::daf::base::PropertySet >  metadata = std::shared_ptr< lsst::daf::base::PropertySet >(),
geom::Box2I const &  bbox = geom::Box2I(),
ImageOrigin  origin = PARENT 
)
explicit

Construct an Image from an already-open FITS object.

Parameters
[in]fitsfileA FITS object to read from, already at the desired HDU.
[in,out]metadataMetadata read from the header (may be null).
[in]bboxIf non-empty, read only the pixels within the bounding box.
[in]originCoordinate system of the bounding box; if PARENT, the bounding box should take into account the xy0 saved with the image.
template<typename PixelT>
template<typename OtherPixelT >
lsst::afw::image::Image< PixelT >::Image ( Image< OtherPixelT > const &  rhs,
const bool  deep 
)
inline

Definition at line 606 of file Image.h.

template<typename PixelT>
lsst::afw::image::Image< PixelT >::Image ( ndarray::Array< PixelT, 2, 1 > const &  array,
bool  deep = false,
geom::Point2I const &  xy0 = geom::Point2I() 
)
inlineexplicit

Definition at line 608 of file Image.h.

template<typename PixelT>
virtual lsst::afw::image::Image< PixelT >::~Image ( )
inlinevirtual

Definition at line 612 of file Image.h.

Member Function Documentation

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator*= ( PixelT const  rhs)

Multiply lhs by scalar rhs.

Definition at line 533 of file Image.cc.

template<typename PixelT>
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 539 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator+= ( PixelT const  rhs)

Add scalar rhs to lhs.

Definition at line 443 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator+= ( Image< PixelT > const &  rhs)
virtual

Add Image rhs to lhs.

Definition at line 449 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator+= ( lsst::afw::math::Function2< double > const &  function)

Add a Function2(x, y) to an Image.

Parameters
functionfunction to add

Definition at line 462 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= ( PixelT const  rhs)

Subtract scalar rhs from lhs.

Definition at line 488 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= ( Image< PixelT > const &  rhs)

Subtract Image rhs from lhs.

Definition at line 494 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator-= ( lsst::afw::math::Function2< double > const &  function)

Subtract a Function2(x, y) from an Image.

Parameters
functionfunction to add

Definition at line 520 of file Image.cc.

template<>
Image< double > & lsst::afw::image::Image< double >::operator/= ( double const  rhs)

Definition at line 573 of file Image.cc.

template<>
Image< float > & lsst::afw::image::Image< float >::operator/= ( float const  rhs)

Definition at line 580 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator/= ( PixelT const  rhs)

Divide lhs by scalar rhs.

Note
Floating point types implement this by multiplying by the 1/rhs

Definition at line 565 of file Image.cc.

template<typename PixelT>
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 587 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator= ( const PixelT  rhs)

Set the image's pixels to rhs.

Definition at line 334 of file Image.cc.

template<typename PixelT>
Image< PixelT > & lsst::afw::image::Image< PixelT >::operator= ( const Image< PixelT > &  rhs)

Assignment operator.

Note
that this has the effect of making the lhs share pixels with the rhs which may not be what you intended; to copy the pixels, use assign(rhs)
this behaviour is required to make the swig interface work, otherwise I'd declare this function private

Definition at line 341 of file Image.cc.

template<typename PixelT>
static Image lsst::afw::image::Image< PixelT >::readFits ( std::string const &  filename,
int  hdu = INT_MIN 
)
inlinestatic

Read an Image from a regular FITS file.

Parameters
[in]filenameName of the file to read.
[in]hduNumber of the "header-data unit" to read (where 0 is the Primary HDU). The default value of INT_MIN is interpreted as "the first HDU with NAXIS != 0".

Definition at line 669 of file Image.h.

template<typename PixelT>
static Image lsst::afw::image::Image< PixelT >::readFits ( fits::MemFileManager &  manager,
int  hdu = INT_MIN 
)
inlinestatic

Read an Image from a FITS RAM file.

Parameters
[in]managerObject that manages the memory to be read.
[in]hduNumber of the "header-data unit" to read (where 0 is the Primary HDU). The default value of INT_MIN is interpreted as "the first HDU with NAXIS != 0".

Definition at line 681 of file Image.h.

template<typename PixelT>
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 600 of file Image.cc.

template<typename PixelT>
void lsst::afw::image::Image< PixelT >::scaledMinus ( double const  c,
Image< PixelT > const &  rhs 
)

Subtract Image c*rhs from lhs.

Definition at line 507 of file Image.cc.

template<typename PixelT>
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 552 of file Image.cc.

template<typename PixelT>
void lsst::afw::image::Image< PixelT >::scaledPlus ( double const  c,
Image< PixelT > const &  rhs 
)

Add Image c*rhs to lhs.

Definition at line 475 of file Image.cc.

template<typename PixelT >
void lsst::afw::image::Image< PixelT >::sqrt ( )

Definition at line 437 of file Image.cc.

template<typename PixelT >
void lsst::afw::image::Image< PixelT >::swap ( Image< PixelT > &  rhs)

Definition at line 424 of file Image.cc.

template<typename PixelT>
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.

Parameters
[in]fileNameName of the file to write.
[in]metadataAdditional values to write to the header (may be null).
[in]mode"w"=Create a new file; "a"=Append a new HDU.
template<typename PixelT>
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.

Parameters
[in]managerManager object for the memory block to write to.
[in]metadataAdditional values to write to the header (may be null).
[in]mode"w"=Create a new file; "a"=Append a new HDU.
template<typename PixelT>
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.

Parameters
[in]fitsfileA FITS file already open to the desired HDU.
[in]metadataAdditional values to write to the header (may be null).

Friends And Related Function Documentation

template<typename PixelT>
template<typename OtherPixelT >
friend class Image
friend

Definition at line 500 of file Image.h.

template<typename ImageT >
ImageT::SinglePixel badPixel ( typename ImageT::Pixel  bad = 0)
related

Return a value indicating a bad pixel for the given Image type.

A quiet NaN is returned for types that support it otherwise bad

Parameters
badThe bad value if NaN isn't supported

Definition at line 77 of file Utils.h.

template<typename PixelT>
template<typename , typename , typename >
friend class MaskedImage
friend

Definition at line 489 of file Image.h.


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