27 #include "boost/cstdint.hpp"
28 #include "boost/format.hpp"
29 #include "boost/shared_ptr.hpp"
30 #include "boost/algorithm/string/trim.hpp"
44 namespace afwGeom = lsst::afw::geom;
46 namespace afwDetection = lsst::afw::detection;
47 namespace cameraGeom = lsst::afw::cameraGeom;
84 template<
typename ImageT,
typename MaskT,
typename VarianceT>
90 lsst::daf::base::Citizen(typeid(this)),
91 _maskedImage(width, height),
98 template<
typename ImageT,
typename MaskT,
typename VarianceT>
103 lsst::daf::base::Citizen(typeid(this)),
104 _maskedImage(dimensions),
111 template<
typename ImageT,
typename MaskT,
typename VarianceT>
116 lsst::daf::base::Citizen(typeid(this)),
123 template<
typename ImageT,
typename MaskT,
typename VarianceT>
128 lsst::daf::base::Citizen(typeid(this)),
129 _maskedImage(maskedImage),
136 template<
typename ImageT,
typename MaskT,
typename VarianceT>
141 lsst::daf::base::Citizen(typeid(this)),
142 _maskedImage(src.getMaskedImage(), deep),
151 template<
typename ImageT,
typename MaskT,
typename VarianceT>
158 lsst::daf::base::Citizen(typeid(this)),
159 _maskedImage(src.getMaskedImage(), bbox, origin, deep),
163 template<
typename ImageT,
typename MaskT,
typename VarianceT>
168 lsst::daf::base::Citizen(typeid(this)),
173 _readFits(fitsfile, bbox, origin, conformMasks);
176 template<
typename ImageT,
typename MaskT,
typename VarianceT>
181 lsst::daf::base::Citizen(typeid(this)),
186 _readFits(fitsfile, bbox, origin, conformMasks);
189 template<
typename ImageT,
typename MaskT,
typename VarianceT>
194 lsst::daf::base::Citizen(typeid(this))
196 _readFits(fitsfile, bbox, origin, conformMasks);
199 template<
typename ImageT,
typename MaskT,
typename VarianceT>
206 _maskedImage =
MaskedImageT(fitsfile, metadata, bbox, origin, conformMasks,
false, imageMetadata);
207 _info->_readFits(fitsfile, metadata, imageMetadata);
213 template<
typename ImageT,
typename MaskT,
typename VarianceT>
220 template<
typename ImageT,
typename MaskT,
typename VarianceT>
222 _maskedImage = maskedImage;
225 template<
typename ImageT,
typename MaskT,
typename VarianceT>
229 _info->getWcs()->shiftReferencePixel(origin.getX() - old.getX(), origin.getY() - old.getY());
230 _maskedImage.setXY0(origin);
236 template<
typename ImageT,
typename MaskT,
typename VarianceT>
242 template<
typename ImageT,
typename MaskT,
typename VarianceT>
248 template<
typename ImageT,
typename MaskT,
typename VarianceT>
251 _maskedImage.writeFits(
255 _info->_finishWriteFits(fitsfile, data);
boost::shared_ptr< daf::base::PropertyList > varianceMetadata
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.
definition of the Trace messaging facilities
void _readFits(fits::Fits &fitsfile, geom::Box2I const &bbox, ImageOrigin origin, bool conformMasks)
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...
boost::shared_ptr< daf::base::PropertyList > imageMetadata
An integer coordinate rectangle.
boost::shared_ptr< daf::base::PropertyList > maskMetadata
table::Key< table::Array< Kernel::Pixel > > image
afw::table::PointKey< int > dimensions
void writeFits(std::string const &fileName) const
Write an Exposure to a regular multi-extension FITS file.
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 setXY0(geom::Point2I const &origin)
boost::shared_ptr< daf::base::PropertyList > metadata
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.
A collection of all the things that make an Exposure different from a MaskedImage.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
Include files required for standard LSST Exception handling.