25 #ifndef LSST_AFW_IMAGE_EXPOSURE_H 26 #define LSST_AFW_IMAGE_EXPOSURE_H 38 namespace formatters {
39 template <
typename ImageT,
typename MaskT,
typename VarianceT>
40 class ExposureFormatter;
88 explicit Exposure(
unsigned int width,
unsigned int height,
114 explicit Exposure(MaskedImageT& maskedImage,
181 bool const deep =
false);
187 template <
typename OtherPixelT>
191 :
lsst::daf::base::Citizen(typeid(this)),
192 _maskedImage(rhs.getMaskedImage(), deep),
196 "Exposure's converting copy constructor must make a deep copy");
218 return _info->getDetector();
227 int getWidth()
const {
return _maskedImage.getWidth(); }
229 int getHeight()
const {
return _maskedImage.getHeight(); }
238 int getX0()
const {
return _maskedImage.getX0(); }
244 int getY0()
const {
return _maskedImage.getY0(); }
269 void setMaskedImage(MaskedImageT& maskedImage);
273 _info->setDetector(detector);
292 bool hasPsf()
const {
return _info->hasPsf(); }
295 bool hasWcs()
const {
return _info->hasWcs(); }
408 MaskedImageT _maskedImage;
415 template <
typename ImagePixelT,
typename MaskPixelT,
typename VariancePixelT>
427 #endif // LSST_AFW_IMAGE_EXPOSURE_H int getWidth() const
Return the Exposure's width.
void setFilter(Filter const &filter)
Set the Exposure's filter.
std::shared_ptr< Calib const > getCalib() const
Return the Exposure's Calib object.
geom::Box2I getBBox(ImageOrigin const origin=PARENT) const
void setInfo(std::shared_ptr< ExposureInfo > exposureInfo)
Set the ExposureInfo that aggregates all the non-image components.
int getHeight() const
Return the Exposure's height.
int getY0() const
Return the Exposure's row-origin.
void setCalib(std::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...
Options for writing an image to FITS.
std::shared_ptr< ExposureInfo > getInfo()
Get the ExposureInfo that aggregates all the non-image components. Never null.
void setMetadata(std::shared_ptr< lsst::daf::base::PropertySet > metadata)
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
MaskedImage< ImageT, MaskT, VarianceT > MaskedImageT
bool hasWcs() const
Does this Exposure have a Wcs?
std::shared_ptr< ExposureInfo const > getInfo() const
Get the ExposureInfo that aggregates all the non-image components. Never null.
static Exposure readFits(fits::MemFileManager &manager)
Read an Exposure from a FITS RAM file.
An integer coordinate rectangle.
afw::table::PointKey< int > dimensions
std::shared_ptr< Wcs > getWcs()
MaskedImageT getMaskedImage() const
Return the MaskedImage.
A base class for image defects.
std::shared_ptr< Exposure< ImagePixelT, MaskPixelT, VariancePixelT > > makeExposure(MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > &mimage, std::shared_ptr< Wcs const > wcs=std::shared_ptr< Wcs const >())
A function to return an Exposure of the correct type (cf.
MaskedImageT getMaskedImage()
Return the MaskedImage.
int getX0() const
Return the Exposure's column-origin.
Lifetime-management for memory that goes into FITS memory files.
std::shared_ptr< Wcs const > getWcs() const
std::shared_ptr< lsst::daf::base::PropertySet > getMetadata() const
Return flexible metadata.
bool hasPsf() const
Does this Exposure have a Psf?
std::int32_t MaskPixel
default type for Masks and MaskedImage Masks
Holds an integer identifier for an LSST filter.
geom::Point2I getXY0() const
Return the Exposure's origin.
std::shared_ptr< Calib > getCalib()
Return the Exposure's Calib object.
#define LSST_EXCEPT(type,...)
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)/...
Filter getFilter() const
Return the Exposure's filter.
std::shared_ptr< lsst::afw::detection::Psf > getPsf()
Return the Exposure's Psf object.
void setDetector(std::shared_ptr< lsst::afw::cameraGeom::Detector const > detector)
Set the Exposure's Detector information.
#define LSST_PERSIST_FORMATTER(formatter...)
std::shared_ptr< lsst::afw::detection::Psf const > getPsf() const
Return the Exposure's Psf object.
geom::Extent2I getDimensions() const
Return the Exposure's size.
void setPsf(std::shared_ptr< lsst::afw::detection::Psf const > psf)
Set the Exposure's Psf.
A collection of all the things that make an Exposure different from a MaskedImage.
float VariancePixel
default type for MaskedImage variance images
std::shared_ptr< lsst::afw::cameraGeom::Detector const > getDetector() const
Return the Exposure's Detector information.
void setWcs(std::shared_ptr< Wcs > wcs)