27 #include "boost/format.hpp"
30 #include "boost/algorithm/string/trim.hpp"
43 namespace afwGeom = lsst::afw::geom;
45 namespace afwDetection = lsst::afw::detection;
46 namespace cameraGeom = lsst::afw::cameraGeom;
83 template<
typename ImageT,
typename MaskT,
typename VarianceT>
89 lsst::daf::base::Citizen(typeid(this)),
90 _maskedImage(width, height),
97 template<
typename ImageT,
typename MaskT,
typename VarianceT>
102 lsst::daf::base::Citizen(typeid(this)),
103 _maskedImage(dimensions),
110 template<
typename ImageT,
typename MaskT,
typename VarianceT>
115 lsst::daf::base::Citizen(typeid(this)),
122 template<
typename ImageT,
typename MaskT,
typename VarianceT>
127 lsst::daf::base::Citizen(typeid(this)),
128 _maskedImage(maskedImage),
135 template<
typename ImageT,
typename MaskT,
typename VarianceT>
140 lsst::daf::base::Citizen(typeid(this)),
141 _maskedImage(src.getMaskedImage(), deep),
150 template<
typename ImageT,
typename MaskT,
typename VarianceT>
157 lsst::daf::base::Citizen(typeid(this)),
158 _maskedImage(src.getMaskedImage(), bbox, origin, deep),
162 template<
typename ImageT,
typename MaskT,
typename VarianceT>
167 lsst::daf::base::Citizen(typeid(this)),
172 _readFits(fitsfile, bbox, origin, conformMasks);
175 template<
typename ImageT,
typename MaskT,
typename VarianceT>
180 lsst::daf::base::Citizen(typeid(this)),
185 _readFits(fitsfile, bbox, origin, conformMasks);
188 template<
typename ImageT,
typename MaskT,
typename VarianceT>
193 lsst::daf::base::Citizen(typeid(this))
195 _readFits(fitsfile, bbox, origin, conformMasks);
198 template<
typename ImageT,
typename MaskT,
typename VarianceT>
205 _maskedImage =
MaskedImageT(fitsfile, metadata, bbox, origin, conformMasks,
false, imageMetadata);
206 _info->_readFits(fitsfile, metadata, imageMetadata);
212 template<
typename ImageT,
typename MaskT,
typename VarianceT>
219 template<
typename ImageT,
typename MaskT,
typename VarianceT>
221 _maskedImage = maskedImage;
224 template<
typename ImageT,
typename MaskT,
typename VarianceT>
228 _info->getWcs()->shiftReferencePixel(origin.getX() - old.getX(), origin.getY() - old.getY());
229 _maskedImage.setXY0(origin);
235 template<
typename ImageT,
typename MaskT,
typename VarianceT>
241 template<
typename ImageT,
typename MaskT,
typename VarianceT>
247 template<
typename ImageT,
typename MaskT,
typename VarianceT>
250 _maskedImage.writeFits(
254 _info->_finishWriteFits(fitsfile, data);
boost::shared_ptr< daf::base::PropertyList > imageMetadata
Class for storing ordered metadata with comments.
A class to contain the data, WCS, and other information needed to describe an image of the sky...
Interface for PropertyList class.
void setXY0(geom::Point2I const &origin)
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
Implementation of the WCS standard for a any projection.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
void _readFits(fits::Fits &fitsfile, geom::Box2I const &bbox, ImageOrigin origin, bool conformMasks)
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
afw::table::PointKey< int > dimensions
A struct passed back and forth between Exposure and ExposureInfo when writing FITS files...
Lifetime-management for memory that goes into FITS memory files.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
boost::shared_ptr< daf::base::PropertyList > maskMetadata
Exposure(unsigned int width, unsigned int height, boost::shared_ptr< Wcs const > wcs=boost::shared_ptr< Wcs const >())
Exposure Class Implementation for LSST: a templated framework class for creating an Exposure from a M...
Class for storing generic metadata.
Interface for PropertySet class.
Include files required for standard LSST Exception handling.
boost::shared_ptr< daf::base::PropertyList > metadata
A collection of all the things that make an Exposure different from a MaskedImage.
boost::shared_ptr< daf::base::PropertyList > varianceMetadata