29 #include "boost/format.hpp"
30 #include "boost/mpl/vector.hpp"
31 #include "boost/gil/gil_all.hpp"
33 #include "lsst/pex/exceptions.h"
42 template <
typename PixelT>
43 void DecoratedImage<PixelT>::init() {
46 setMetadata(metadata);
50 template <
typename PixelT>
52 : daf::base::Citizen(typeid(this)), _image(new
Image<PixelT>(dimensions)) {
55 template <
typename PixelT>
57 : daf::base::Citizen(typeid(this)), _image(new
Image<PixelT>(bbox)) {
60 template <
typename PixelT>
62 : daf::base::Citizen(typeid(this)), _image(rhs) {
65 template <
typename PixelT>
67 : daf::base::Citizen(typeid(this)), _image(new
Image<PixelT>(*src._image, deep)), _gain(src._gain) {
70 template <
typename PixelT>
78 template <
typename PixelT>
82 swap(_image, rhs._image);
83 swap(_gain, rhs._gain);
86 template <
typename PixelT>
94 template <
typename PixelT>
97 : daf::base::Citizen(typeid(this)) {
102 template <
typename PixelT>
104 std::shared_ptr<daf::base::PropertySet const> metadata_i,
105 std::string
const& mode)
const {
106 std::shared_ptr<daf::base::PropertySet> metadata;
109 metadata = getMetadata()->deepCopy();
110 metadata->combine(metadata_i);
112 metadata = getMetadata();
115 getImage()->writeFits(fileName, metadata, mode);
afw::table::PointKey< int > dimensions
DecoratedImage(const geom::Extent2I &dimensions=geom::Extent2I())
Create an image of the specified size.
void swap(DecoratedImage &rhs)
void setMetadata(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
An integer coordinate rectangle.
DecoratedImage & operator=(const DecoratedImage &image)
Assignment operator.
std::shared_ptr< lsst::daf::base::PropertySet > getMetadata() const
void swap(Image< PixelT > &a, Image< PixelT > &b)
A class to represent a 2-dimensional array of pixels.
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 a FITS file.
A container for an Image and its associated metadata.
lsst::daf::base::PropertyList PropertyList