22#ifndef LSST_AFW_IMAGE_IMAGEBASEFITSREADER_H
23#define LSST_AFW_IMAGE_IMAGEBASEFITSREADER_H
126 template <
typename T>
130 bool allowUnsafe=
false
136 int getHdu() const noexcept {
return _hdu; }
155 fits::Fits * _fitsFile;
157 std::shared_ptr<
daf::
base::PropertyList> _metadata;
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Lifetime-management for memory that goes into FITS memory files.
ImageBaseFitsReader(ImageBaseFitsReader &&)=delete
ImageBaseFitsReader & operator=(ImageBaseFitsReader const &)=delete
lsst::geom::Point2I readXY0(lsst::geom::Box2I const &bbox=lsst::geom::Box2I(), ImageOrigin origin=PARENT)
Read the image origin from the on-disk image or a subimage thereof.
std::shared_ptr< daf::base::PropertyList > readMetadata()
Read the image's FITS header.
ImageBaseFitsReader & operator=(ImageBaseFitsReader &&)=delete
ndarray::Array< T, 2, 2 > readArray(lsst::geom::Box2I const &bbox, ImageOrigin origin=PARENT, bool allowUnsafe=false)
Read the image's data array.
std::string getFileName() const
Return the name of the file this reader targets.
int getHdu() const noexcept
Return the HDU this reader targets.
lsst::geom::Box2I readBBox(ImageOrigin origin=PARENT)
Read the bounding box of the on-disk image.
friend class MaskedImageFitsReader
~ImageBaseFitsReader() noexcept
std::string readDType() const
Read a string describing the pixel type of the on-disk image.
ImageBaseFitsReader(std::string const &fileName, int hdu=fits::DEFAULT_HDU)
Construct a FITS reader object.
ImageBaseFitsReader(ImageBaseFitsReader const &)=delete
const int DEFAULT_HDU
Specify that the default HDU should be read.