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 > imageMetadata
Class for storing ordered metadata with comments.
Include files required for standard LSST Exception handling.
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 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...
void ImageT ImageT int float saturatedPixelValue int const width
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...
void ImageT ImageT int float saturatedPixelValue int const height
Class for storing generic metadata.
Interface for PropertySet class.
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