EleFits  4.0.1
A modern C++ API on top of CFitsIO

◆ access() [1/2]

template<class T = Hdu>
const T& Euclid::Fits::MefFile::access ( long  index)

Access the HDU at given 0-based index.

Template Parameters
TThe type of HDU: ImageHdu, BintableHdu, or Hdu to just handle metadata.
Returns
A reference to the HDU reader-writer.

The type can be ImageHdu, BintableHdu or unspecified (i.e. base class Hdu, the metadata reader-writer.). In the latter case, if needs be, the returned HDU can still be cast to an ImageHdu or BintableHdu:

const auto &ext = f.access<>(1);
ext.as<ImageHdu>().readRaster<float>();
See also
operator[]