CCfits  2.5
Public Member Functions
CCfits::ImageExt< T > Class Template Reference
Inheritance diagram for CCfits::ImageExt< T >:
Inheritance diagram CCfits::ExtHDU CCfits::HDU

List of all members.

Public Member Functions

virtual ~ImageExt ()
 destructor
virtual ImageExt< T > * clone (FITSBase *p) const
 virtual copy constructor
virtual void readData (bool readFlag=false, const std::vector< String > &keys=std::vector< String >())
 read Image extension HDU data
virtual void resetImageRead ()
 force next image reading operation to read from file instead of object cache.
virtual void scale (double value)
 set the BSCALE keyword value for images (see warning for images of int type)
virtual double scale () const
 return the BSCALE keyword value
virtual void suppressScaling (bool toggle=true)
 turn off image scaling regardless of the BSCALE and BZERO keyword values
virtual void zero (double value)
 set the BZERO keyword value for images (see warning for images of int type)
virtual double zero () const
 return the BZERO keyword value

Detailed Description

template<typename T>
class CCfits::ImageExt< T >

ImageExt<T> is a subclass of ExtHDU that contains image data of type T.


Member Function Documentation

template<typename T >
void CCfits::ImageExt< T >::readData ( bool  readFlag = false,
const std::vector< String > &  keys = std::vector<String>() 
) [virtual]

read Image extension HDU data

Called by FITS ctor, not intended for general use. parameters control how much gets read on initialization.

Parameters:
readFlagread the image data if true
keya vector of strings of keyword names to be read from the HDU

Implements CCfits::ExtHDU.

template<typename T >
void CCfits::ImageExt< T >::resetImageRead ( ) [virtual]

force next image reading operation to read from file instead of object cache.

[Note: It is not necessary to call this function for normal image reading operations.] For primary HDUs and image extensions, this forces the next read operation to retrieve data from the file regardless of whether the data has already been read and stored in the HDU's internal arrays. This does nothing if the HDU does not contain an image.

Reimplemented from CCfits::HDU.

template<typename T >
void CCfits::ImageExt< T >::scale ( double  value) [virtual]

set the BSCALE keyword value for images (see warning for images of int type)

For primary HDUs and image extensions, this will add (or update) the BSCALE keyword in the header. The new setting will affect future image array read/writes as described in section 4.7 Data Scaling of the CFITSIO manual. For table extensions this function does nothing.

WARNING: If the image contains integer-type data (as indicated by the bitpix() return value), the new scale and zero value combination must not be such that the scaled data would require a floating-point type (this uses the CFITSIO function fits_get_img_equivtype to make the determination). If this situation occurs, the function will throw a FitsException.

Reimplemented from CCfits::HDU.

template<typename T >
void CCfits::ImageExt< T >::suppressScaling ( bool  toggle = true) [virtual]

turn off image scaling regardless of the BSCALE and BZERO keyword values

For toggle = true, this turns off image scaling for future read/writes by resetting the scale and zero to 1.0 and 0.0 respectively. It does NOT modify the BSCALE and BZERO keywords. If toggle = false, the scale and zero values will be restored to the keyword values.

Reimplemented from CCfits::HDU.

template<typename T >
void CCfits::ImageExt< T >::zero ( double  value) [virtual]

set the BZERO keyword value for images (see warning for images of int type)

For primary HDUs and image extensions, this will add (or update) the BZERO keyword in the header. The new setting will affect future image array read/writes as described in section 4.7 Data Scaling of the CFITSIO manual. For table extensions this function does nothing.

WARNING: If the image contains integer-type data (as indicated by the bitpix() return value), the new scale and zero value combination must not be such that the scaled data would require a floating-point type (this uses the CFITSIO function fits_get_img_equivtype to make the determination). If this situation occurs, the function will throw a FitsException.

Reimplemented from CCfits::HDU.


The documentation for this class was generated from the following file: