25 #ifndef LSST_AFW_IMAGE_EXPOSURE_H
26 #define LSST_AFW_IMAGE_EXPOSURE_H
35 namespace lsst {
namespace afw {
37 namespace formatters {
38 template<
typename ImageT,
typename MaskT,
typename VarianceT>
class ExposureFormatter;
50 typedef std::shared_ptr<Exposure>
Ptr;
51 typedef std::shared_ptr<Exposure const>
ConstPtr;
121 bool const deep=
false
128 bool const deep=
false
135 template<
typename OtherPixelT>
139 lsst::daf::base::
Citizen(typeid(this)),
144 throw LSST_EXCEPT(lsst::pex::exceptions::InvalidParameterError,
145 "Exposure's converting copy constructor must make a deep copy");
260 void writeFits(std::string
const & fileName)
const;
302 fits::Fits & fitsfile, geom::Box2I const & bbox,
313 template <typename ImagePixelT, typename MaskPixelT, typename VariancePixelT>
315 MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT> & mimage,
324 #endif // LSST_AFW_IMAGE_EXPOSURE_H
int getHeight() const
Return the Exposure's height.
void setFilter(Filter const &filter)
Set the Exposure's filter.
virtual ~Exposure()
Destructor.
geom::Point2I getXY0() const
Return the Exposure's origin.
geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
#define LSST_PERSIST_FORMATTER(formatter...)
Macro used to connect the persistable class with the Formatter and boost::serialization.
Citizen(const std::type_info &)
void setPsf(boost::shared_ptr< lsst::afw::detection::Psf const > psf)
Set the Exposure's Psf.
void setCalib(boost::shared_ptr< Calib > calib)
Set the Exposure's Calib object.
A class to contain the data, WCS, and other information needed to describe an image of the sky...
int getHeight() const
Return the number of rows in the image.
bool hasWcs() const
Does this Exposure have a Wcs?
boost::shared_ptr< Calib > getCalib()
Return the Exposure's Calib object.
int getX0() const
Return the image's column-origin.
void setXY0(geom::Point2I const &origin)
Set the Exposure's origin (including correcting the Wcs)
bool hasPsf() const
Does this Exposure have a Psf?
geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
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.
std::shared_ptr< Exposure > Ptr
int getX0() const
Return the Exposure's column-origin.
std::shared_ptr< Exposure const > ConstPtr
geom::Extent2I getDimensions() const
Return the Exposure's size.
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)
MaskedImage< ImageT, MaskT, VarianceT > MaskedImageT
MaskedImageT getMaskedImage() const
Return the MaskedImage.
geom::Extent2I getDimensions() const
static Exposure readFits(fits::MemFileManager &manager)
Read an Exposure from a FITS RAM file.
Describe an exposure's calibration.
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
boost::shared_ptr< lsst::afw::cameraGeom::Detector const > getDetector() const
Return the Exposure's Detector information.
afw::table::PointKey< int > dimensions
void ImageT ImageT int float saturatedPixelValue int const width
MaskedImageT getMaskedImage()
Return the MaskedImage.
void setWcs(boost::shared_ptr< Wcs > wcs)
lsst::daf::base::PropertySet::Ptr getMetadata() const
Return flexible metadata.
Lifetime-management for memory that goes into FITS memory files.
boost::shared_ptr< ExposureInfo > getInfo()
Get the ExposureInfo that aggregates all the non-image components. Never null.
void setMaskedImage(MaskedImageT &maskedImage)
Set the MaskedImage of the Exposure.
Filter getFilter() const
Return the Exposure's filter.
MaskedImageT _maskedImage
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...
Holds an integer identifier for an LSST filter.
int getY0() const
Return the Exposure's row-origin.
void ImageT ImageT int float saturatedPixelValue int const height
boost::shared_ptr< Wcs const > getWcs() const
boost::shared_ptr< lsst::afw::detection::Psf > getPsf()
Return the Exposure's Psf object.
#define LSST_EXCEPT(type,...)
Create an exception with a given type and message and optionally other arguments (dependent on the ty...
Information about a CCD or other imaging detector.
static Exposure readFits(std::string const &filename)
Read an Exposure from a regular FITS file.
Exposure(Exposure< OtherPixelT, MaskT, VarianceT > const &rhs, const bool deep)
generalised copy constructor; defined here in the header so that the compiler can instantiate N(N-1)/...
boost::shared_ptr< ExposureInfo > _info
int getWidth() const
Return the Exposure's width.
geom::Point2I getXY0() const
Return the image's origin.
int getWidth() const
Return the number of columns in the image.
int getY0() const
Return the image's row-origin.
Exposure< ImagePixelT, MaskPixelT, VariancePixelT >::Ptr makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, boost::shared_ptr< Wcs const > wcs=boost::shared_ptr< Wcs const >())
A function to return an Exposure of the correct type (cf.
Base class for all persistable classes.
Implementation of the Class MaskedImage.
void setMetadata(lsst::daf::base::PropertySet::Ptr metadata)
Citizen is a class that should be among all LSST classes base classes, and handles basic memory manag...
void setInfo(boost::shared_ptr< ExposureInfo > exposureInfo)
Set the ExposureInfo that aggregates all the non-image components.
#define CONST_PTR(...)
A shared pointer to a const object.
std::shared_ptr< PropertySet > Ptr
A collection of all the things that make an Exposure different from a MaskedImage.
A polymorphic base class for representing an image's Point Spread Function.
float VariancePixel
! default type for Masks and MaskedImage Masks
void setDetector(boost::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
Set the Exposure's Detector information.