35template <
typename PixelT>
36void DecoratedImage<PixelT>::init() {
38 std::shared_ptr<daf::base::PropertySet> metadata(
new daf::base::PropertyList);
39 setMetadata(metadata);
43template <
typename PixelT>
45 : _image(new
Image<PixelT>(dimensions)) {
48template <
typename PixelT>
52template <
typename PixelT>
56template <
typename PixelT>
58 : _image(new
Image<PixelT>(*src._image, deep)), _gain(src._gain) {
61template <
typename PixelT>
69template <
typename PixelT>
73 swap(_image, rhs._image);
74 swap(_gain, rhs._gain);
77template <
typename PixelT>
85template <
typename PixelT>
94template <
typename PixelT>
98 writeFits(fileName,
nullptr, metadata, mode);
101template <
typename PixelT>
109 metadata->combine(*metadata_i);
114 getImage()->writeFits(fileName, options, mode, metadata.
get());
A container for an Image and its associated metadata.
DecoratedImage(const lsst::geom::Extent2I &dimensions=lsst::geom::Extent2I())
Create an image of the specified size.
DecoratedImage & operator=(const DecoratedImage &image)
Assignment operator.
void swap(DecoratedImage &rhs)
void setMetadata(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
void writeFits(std::string const &fileName, daf::base::PropertySet const *metadata=nullptr, std::string const &mode="w") const
Write a FITS file.
std::shared_ptr< lsst::daf::base::PropertySet > getMetadata() const
std::shared_ptr< Image< PixelT > > getImage()
Return a shared_ptr to the DecoratedImage's Image.
A class to represent a 2-dimensional array of pixels.
void swap(Image< PixelT > &a, Image< PixelT > &b)
Extent< int, 2 > Extent2I
Options controlling image compression with FITS.