GammaLib
2.0.0
|
Abstract FITS image base class. More...
#include <GFitsImage.hpp>
Public Member Functions | |
GFitsImage (void) | |
Void constructor. More... | |
GFitsImage (const int &bitpix, const int &nx) | |
1D image constructor More... | |
GFitsImage (const int &bitpix, const int &nx, const int &ny) | |
2D image constructor More... | |
GFitsImage (const int &bitpix, const int &nx, const int &ny, const int &nz) | |
3D image constructor More... | |
GFitsImage (const int &bitpix, const int &nx, const int &ny, const int &nz, const int &nt) | |
4D image constructor More... | |
GFitsImage (const int &bitpix, const std::vector< int > &naxes) | |
Constructor. More... | |
GFitsImage (const GFitsImage &image) | |
Copy constructor. More... | |
virtual | ~GFitsImage (void) |
Destructor. More... | |
GFitsImage & | operator= (const GFitsImage &image) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GFitsImage * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual void * | pixels (void)=0 |
virtual double | pixel (const int &ix) const =0 |
virtual double | pixel (const int &ix, const int &iy) const =0 |
virtual double | pixel (const int &ix, const int &iy, const int &iz) const =0 |
virtual double | pixel (const int &ix, const int &iy, const int &iz, const int &it) const =0 |
virtual int | type (void) const =0 |
HDUType | exttype (void) const |
Return extension type. More... | |
const int & | npix (void) const |
Return size of pixel array. More... | |
const int & | bitpix (void) const |
Return number of Bits per pixel (negative=floating point) More... | |
const int & | naxis (void) const |
Return dimension of image. More... | |
int | naxes (const int &axis) const |
Return dimension of an image axis. More... | |
const int & | anynul (void) const |
Return number of nul values encountered during loading. More... | |
void | nulval (const void *value) |
Set nul value. More... | |
const void * | nulval (void) const |
Return nul value. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print column information. More... | |
![]() | |
GFitsHDU (void) | |
Void constructor. More... | |
GFitsHDU (const GFitsHDU &hdu) | |
Copy constructor. More... | |
virtual | ~GFitsHDU (void) |
Destructor. More... | |
GFitsHDU & | operator= (const GFitsHDU &hdu) |
Assignment operator. More... | |
int | cards (void) const |
Return number of cards in HDU header. More... | |
const std::string & | extname (void) const |
Return extension name. More... | |
void | extname (const std::string &extname) |
Set HDU extension name (EXTNAME keyword) More... | |
const int & | extno (void) const |
Return extension number. More... | |
void | extno (const int &extno) |
Set extension number. More... | |
const GFitsHeader & | header (void) const |
Return extension header. More... | |
void | header (const GFitsHeader &header) |
Set extension header. More... | |
bool | has_card (const int &cardno) const |
Check existence of header card. More... | |
bool | has_card (const std::string &keyname) const |
Checks for presence of header card. More... | |
GFitsHeaderCard & | card (const int &cardno) |
Return header card. More... | |
const GFitsHeaderCard & | card (const int &cardno) const |
Return header card (const version) More... | |
GFitsHeaderCard & | card (const std::string &keyname) |
Return header card. More... | |
const GFitsHeaderCard & | card (const std::string &keyname) const |
Return header card (const version) More... | |
void | card (const GFitsHeaderCard &card) |
Append or update header card. More... | |
void | card (const std::string &keyname, const std::string &value, const std::string &comment) |
Append or update string value header card. More... | |
void | card (const std::string &keyname, const double &value, const std::string &comment) |
Append or update double precision value header card. More... | |
void | card (const std::string &keyname, const int &value, const std::string &comment) |
Append or update integer value header card. More... | |
void | card (const std::string &keyname, const bool &value, const std::string &comment) |
Append or update boolean value header card. More... | |
void | card (const std::string &keyname, const char *value, const std::string &comment) |
Append or update character value header card. More... | |
std::string | string (const std::string &keyname) const |
Return card value as string. More... | |
double | real (const std::string &keyname) const |
Return card value as double precision. More... | |
int | integer (const std::string &keyname) const |
Return card value as integer. More... | |
![]() | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFitsImage &image) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | data_open (void *vptr) |
Open FITS image. More... | |
void | data_save (void) |
Save FITS image. More... | |
void | data_close (void) |
Close FITS image. More... | |
void | data_connect (void *vptr) |
Connect FITS image. More... | |
void | init_image_header (void) |
Initialise image header. More... | |
void | open_image (void *vptr) |
Open Image. More... | |
void | load_image (int datatype, const void *pixels, const void *nulval, int *anynul) |
Load FITS image. More... | |
void | save_image (int datatype, const void *pixels) |
Save FITS image. More... | |
void | fetch_data (void) |
Fetch image pixels. More... | |
int | offset (const int &ix) const |
Return pixel offset. More... | |
int | offset (const int &ix, const int &iy) const |
Return 2D pixel offset. More... | |
int | offset (const int &ix, const int &iy, const int &iz) const |
Return 3D pixel offset. More... | |
int | offset (const int &ix, const int &iy, const int &iz, const int &it) const |
Return 4D pixel offset. More... | |
virtual void | alloc_data (void)=0 |
virtual void | init_data (void)=0 |
virtual void | release_data (void)=0 |
virtual void | alloc_nulval (const void *value)=0 |
virtual void * | ptr_data (void)=0 |
virtual void * | ptr_nulval (void)=0 |
![]() | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFitsHDU &hdu) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | connect (void *fptr) |
Connect HDU to FITS file. More... | |
void | move_to_hdu (void) |
Move FITS file pointer to HDU. More... | |
HDUType | get_hdu_type (void) const |
Get HDU type from FITS file. More... | |
void | open (void *vptr, int hdunum) |
Open HDU. More... | |
void | save (void) |
Saves HDU. More... | |
std::string | print_hdu (const GChatter &chatter=NORMAL) const |
Print basic HDU information. More... | |
std::string | typecode (int type) const |
Return typecode as string. More... | |
Protected Attributes | |
int | m_bitpix |
Number of Bits/pixel. More... | |
int | m_naxis |
Image dimension. More... | |
long * | m_naxes |
Number of pixels in each dimension. More... | |
int | m_num_pixels |
Number of image pixels. More... | |
int | m_anynul |
Number of NULLs encountered. More... | |
![]() | |
void * | m_fitsfile |
FITS file pointer pointing on actual HDU. More... | |
int | m_hdunum |
HDU number (starting from 0) More... | |
std::string | m_name |
HDU name (extname) More... | |
GFitsHeader | m_header |
HDU header. More... | |
Additional Inherited Members | |
![]() | |
enum | HDUType { HT_IMAGE = 0, HT_ASCII_TABLE = 1, HT_BIN_TABLE = 2 } |
Abstract FITS image base class.
This class defines the abstract interface for a FITS image.
Definition at line 43 of file GFitsImage.hpp.
GFitsImage::GFitsImage | ( | void | ) |
Void constructor.
Construct instance of an empty image. No header cards are present in an empty image.
Definition at line 66 of file GFitsImage.cpp.
References init_members().
GFitsImage::GFitsImage | ( | const int & | bitpix, |
const int & | nx | ||
) |
1D image constructor
[in] | bitpix | Number of Bits per pixel (negative is floating point). |
[in] | nx | Number of pixels. |
Construct 1D instance of GFitsImage by specifying the number of pixels. This method also adds the relevant header cards.
Definition at line 85 of file GFitsImage.cpp.
References bitpix(), init_image_header(), init_members(), m_bitpix, m_naxes, m_naxis, and m_num_pixels.
GFitsImage::GFitsImage | ( | const int & | bitpix, |
const int & | nx, | ||
const int & | ny | ||
) |
2D image constructor
[in] | bitpix | Number of Bits per pixel (negative is floating point). |
[in] | nx | Number of pixels in first dimension. |
[in] | ny | Number of pixels in second dimension. |
Construct 2D instance of GFitsImage by specifying the number of pixels in each dimension. This method also adds the relevant header cards.
Definition at line 119 of file GFitsImage.cpp.
References bitpix(), init_image_header(), init_members(), m_bitpix, m_naxes, m_naxis, and m_num_pixels.
GFitsImage::GFitsImage | ( | const int & | bitpix, |
const int & | nx, | ||
const int & | ny, | ||
const int & | nz | ||
) |
3D image constructor
[in] | bitpix | Number of Bits per pixel (negative is floating point). |
[in] | nx | Number of pixels in first dimension. |
[in] | ny | Number of pixels in second dimension. |
[in] | nz | Number of pixels in third dimension. |
Construct 3D instance of GFitsImage by specifying the number of pixels in each dimension. This method also adds the relevant header cards.
Definition at line 156 of file GFitsImage.cpp.
References bitpix(), init_image_header(), init_members(), m_bitpix, m_naxes, m_naxis, and m_num_pixels.
GFitsImage::GFitsImage | ( | const int & | bitpix, |
const int & | nx, | ||
const int & | ny, | ||
const int & | nz, | ||
const int & | nt | ||
) |
4D image constructor
[in] | bitpix | Number of Bits per pixel (negative is floating point). |
[in] | nx | Number of pixels in first dimension. |
[in] | ny | Number of pixels in second dimension. |
[in] | nz | Number of pixels in third dimension. |
[in] | nt | Number of pixels in forth dimension. |
Construct 4D instance of GFitsImage by specifying the number of pixels in each dimension. This method also adds the relevant header cards.
Definition at line 195 of file GFitsImage.cpp.
References bitpix(), init_image_header(), init_members(), m_bitpix, m_naxes, m_naxis, and m_num_pixels.
GFitsImage::GFitsImage | ( | const int & | bitpix, |
const std::vector< int > & | naxes | ||
) |
Constructor.
[in] | bitpix | Number of Bits per pixel (negative is floating point). |
[in] | naxes | Vector of number of pixels in each dimension. |
Construct instance of GFitsImage by specifying the image dimension and the number of pixels in each dimension. This method also adds the relevant header cards.
Definition at line 233 of file GFitsImage.cpp.
References bitpix(), init_image_header(), init_members(), m_bitpix, m_naxes, m_naxis, and m_num_pixels.
GFitsImage::GFitsImage | ( | const GFitsImage & | image | ) |
Copy constructor.
[in] | image | FITS image. |
Definition at line 268 of file GFitsImage.cpp.
References copy_members(), and init_members().
|
virtual |
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by fetch_data().
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by nulval().
|
inline |
Return number of nul values encountered during loading.
Definition at line 166 of file GFitsImage.hpp.
References m_anynul.
|
inline |
Return number of Bits per pixel (negative=floating point)
Definition at line 146 of file GFitsImage.hpp.
References m_bitpix.
Referenced by GFitsImage(), and init_image_header().
|
pure virtual |
Return class name.
Returns the class name for non-abstract classes in a human readable way.
Implements GFitsHDU.
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
pure virtual |
Clear object.
Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.
Implements GFitsHDU.
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GFitsHDU.
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
protected |
Copy class members.
[in] | image | FITS image to copy |
Definition at line 461 of file GFitsImage.cpp.
References m_anynul, m_bitpix, m_naxes, m_naxis, and m_num_pixels.
Referenced by GFitsImage(), and operator=().
|
protectedvirtual |
Close FITS image.
Closing a FITS image resets the object into its initial state. Closing does NOT save the image into the FITS file. Use the save method for this purpose.
Implements GFitsHDU.
Definition at line 542 of file GFitsImage.cpp.
References free_members(), and init_members().
|
protectedvirtual |
Connect FITS image.
[in] | vptr | FITS file pointer |
Connects a FITS file pointer to an image. This method actually does nothing since any GFitsImage can directly access the FITS file pointer that is stored in the GFitsHDU base class.
Implements GFitsHDU.
Definition at line 564 of file GFitsImage.cpp.
|
protectedvirtual |
Open FITS image.
[in] | vptr | FITS file pointer |
Open FITS image in FITS file. Opening means connecting the FITS file pointer to the image and reading the image and axes dimensions.
Implements GFitsHDU.
Definition at line 507 of file GFitsImage.cpp.
References open_image().
|
protectedvirtual |
Save FITS image.
Saves the image into the FITS file.
Implements GFitsHDU.
Definition at line 522 of file GFitsImage.cpp.
References pixels(), save_image(), and type().
|
inlinevirtual |
Return extension type.
Implements GFitsHDU.
Definition at line 126 of file GFitsImage.hpp.
References GFitsHDU::HT_IMAGE.
Referenced by save_image().
|
protected |
Fetch image pixels.
Fetch the image pixels. This function is in general called if pixel values should be read or written yet no pixel array is allocated. In case that pixels existed already before they will be deleted before fetching new ones. There are two possibilities to fetch the pixels: (1) In case that a FITS file is attached to the image, the pixel array will be loaded from the FITS file using the load_image() method. (2) In case that no FITS file is attached, a new pixel array will be allocated that is initalised to zero.
Definition at line 818 of file GFitsImage.cpp.
References alloc_data(), FPTR, init_data(), load_image(), m_anynul, GFitsHDU::m_fitsfile, m_num_pixels, ptr_data(), ptr_nulval(), and type().
Referenced by GFitsImageByte::copy_members(), GFitsImageFloat::copy_members(), GFitsImageLongLong::copy_members(), GFitsImageUShort::copy_members(), GFitsImageULong::copy_members(), GFitsImageSByte::copy_members(), GFitsImageDouble::copy_members(), GFitsImageShort::copy_members(), GFitsImageLong::copy_members(), GFitsImageLongLong::load_data(), GFitsImageDouble::load_data(), GFitsImageUShort::load_data(), GFitsImageSByte::load_data(), GFitsImageFloat::load_data(), GFitsImageULong::load_data(), GFitsImageLong::load_data(), GFitsImageByte::load_data(), and GFitsImageShort::load_data().
|
protected |
Delete class members.
Definition at line 486 of file GFitsImage.cpp.
References m_naxes.
Referenced by GFitsImageByte::clear(), GFitsImageDouble::clear(), GFitsImageULong::clear(), GFitsImageLongLong::clear(), GFitsImageSByte::clear(), GFitsImageShort::clear(), GFitsImageLong::clear(), GFitsImageUShort::clear(), GFitsImageFloat::clear(), data_close(), operator=(), and ~GFitsImage().
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by fetch_data().
|
protected |
Initialise image header.
Initialises the image header by setting the default header cards. This method requires the members m_bitpix, m_naxis, and m_naxes to be set previously.
Definition at line 578 of file GFitsImage.cpp.
References GFitsHeader::append(), bitpix(), GFitsHDU::m_header, naxes(), and naxis().
Referenced by GFitsImage().
|
protected |
Initialise class members.
Definition at line 442 of file GFitsImage.cpp.
References m_anynul, m_bitpix, m_naxes, m_naxis, and m_num_pixels.
Referenced by GFitsImageByte::clear(), GFitsImageDouble::clear(), GFitsImageULong::clear(), GFitsImageLongLong::clear(), GFitsImageSByte::clear(), GFitsImageShort::clear(), GFitsImageLong::clear(), GFitsImageUShort::clear(), GFitsImageFloat::clear(), data_close(), GFitsImage(), and operator=().
|
protected |
Load FITS image.
[in] | datatype | Datatype of pixels to be saved. |
[in] | pixels | Pixel array to be saved. |
[in] | nulval | Pointer to pixel nul value. |
[out] | anynul | Number of nul values encountered during loading. |
GException::fits_error | FITS error. |
Load image pixels from FITS file.
Definition at line 674 of file GFitsImage.cpp.
References __ffgsv, FPTR, G_LOAD_IMAGE, GFitsHDU::m_fitsfile, m_naxes, m_naxis, and GFitsHDU::move_to_hdu().
Referenced by fetch_data().
int GFitsImage::naxes | ( | const int & | axis | ) | const |
Return dimension of an image axis.
[in] | axis | Image axis [0,...,naxis()-1]. |
GException::out_of_range | Image axis not valid. |
Definition at line 344 of file GFitsImage.cpp.
References G_NAXES, m_naxes, and naxis().
Referenced by GCOMIaq::compton_kinematics(), init_image_header(), GCOMIaq::klein_nishina(), GCOMIaq::location_smearing(), GCOMIaq::location_spread(), GCOMIaq::print(), print(), GCOMResponse::read(), GSkyMap::read_wcs(), and GCOMIaq::weight_iaq().
|
inline |
Return dimension of image.
Definition at line 156 of file GFitsImage.hpp.
References m_naxis.
Referenced by init_image_header(), naxes(), GCOMIaq::print(), print(), GCOMResponse::read(), and GSkyMap::read_wcs().
|
inline |
Return size of pixel array.
Definition at line 136 of file GFitsImage.hpp.
References m_num_pixels.
Referenced by GCOMIaq::print(), print(), and GCOMIaq::set().
void GFitsImage::nulval | ( | const void * | value | ) |
Set nul value.
[in] | value | Nul value. |
Definition at line 372 of file GFitsImage.cpp.
References alloc_nulval().
|
inline |
|
protected |
Return pixel offset.
[in] | ix | Pixel index [0,...,m_num_pixels-1]. |
GException::out_of_range | Pixel index is outside valid range. |
Definition at line 847 of file GFitsImage.cpp.
References G_OFFSET_1D, and m_num_pixels.
Referenced by GFitsImageByte::at(), GFitsImageDouble::at(), GFitsImageLong::at(), GFitsImageULong::at(), GFitsImageUShort::at(), GFitsImageLongLong::at(), GFitsImageFloat::at(), GFitsImageSByte::at(), GFitsImageShort::at(), GFitsImageFloat::operator()(), GFitsImageUShort::operator()(), GFitsImageLongLong::operator()(), GFitsImageDouble::operator()(), GFitsImageShort::operator()(), GFitsImageULong::operator()(), GFitsImageByte::operator()(), GFitsImageSByte::operator()(), and GFitsImageLong::operator()().
|
protected |
Return 2D pixel offset.
[in] | ix | Pixel index in first dimension (starting from 0). |
[in] | iy | Pixel index in second dimension (starting from 0). |
GException::invalid_argument | Pixel array has less than 2 dimensions. |
GException::out_of_range | Image axis not valid. |
Computes of offset in the pixel array of a 2D coordinate. This method is only applicable to pixels arrays that have at least 2 dimenions.
Definition at line 875 of file GFitsImage.cpp.
References G_OFFSET_2D, m_naxes, m_naxis, and gammalib::str().
|
protected |
Return 3D pixel offset.
[in] | ix | Pixel index in first dimension (starting from 0). |
[in] | iy | Pixel index in second dimension (starting from 0). |
[in] | iz | Pixel index in third dimension (starting from 0). |
GException::invalid_argument | Pixel array has less than 3 dimensions. |
GException::out_of_range | Image axis not valid. |
Computes of offset in the pixel array of a 3D coordinate. This method is only applicable to pixels arrays that have at least 3 dimenions.
Definition at line 919 of file GFitsImage.cpp.
References G_OFFSET_3D, m_naxes, m_naxis, and gammalib::str().
|
protected |
Return 4D pixel offset.
[in] | ix | Pixel index in first dimension (starting from 0). |
[in] | iy | Pixel index in second dimension (starting from 0). |
[in] | iz | Pixel index in third dimension (starting from 0). |
[in] | it | Pixel index in forth dimension (starting from 0). |
GException::invalid_argument | Pixel array has less than 4 dimensions. |
GException::out_of_range | Image axis not valid. |
Computes of offset in the pixel array of a 4D coordinate. This method is only applicable to pixels arrays that have at least 4 dimenions.
Definition at line 969 of file GFitsImage.cpp.
References G_OFFSET_4D, m_naxes, m_naxis, and gammalib::str().
|
protected |
Open Image.
[in] | vptr | FITS file void pointer. |
GException::fits_error | FITS error. |
Open FITS image in FITS file. Opening means connecting the FITS file pointer to the image and reading the image and axes dimensions.
Definition at line 616 of file GFitsImage.cpp.
References __ffgidm, __ffgisz, gammalib::fits_move_to_hdu(), FPTR, FPTR_COPY, G_OPEN_IMAGE, GFitsHDU::m_fitsfile, GFitsHDU::m_hdunum, m_naxes, m_naxis, and m_num_pixels.
Referenced by data_open().
GFitsImage & GFitsImage::operator= | ( | const GFitsImage & | image | ) |
Assignment operator.
[in] | image | FITS image. |
Definition at line 306 of file GFitsImage.cpp.
References copy_members(), free_members(), init_members(), and GFitsHDU::operator=().
Referenced by GFitsImageByte::operator=(), GFitsImageUShort::operator=(), GFitsImageULong::operator=(), GFitsImageShort::operator=(), GFitsImageSByte::operator=(), GFitsImageLongLong::operator=(), GFitsImageLong::operator=(), GFitsImageFloat::operator=(), and GFitsImageDouble::operator=().
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by GFitsImageByte::GFitsImageByte(), GFitsImageDouble::GFitsImageDouble(), GFitsImageFloat::GFitsImageFloat(), GFitsImageLong::GFitsImageLong(), GFitsImageLongLong::GFitsImageLongLong(), GFitsImageSByte::GFitsImageSByte(), GFitsImageShort::GFitsImageShort(), GFitsImageULong::GFitsImageULong(), GFitsImageUShort::GFitsImageUShort(), GSPIResponse::load_irf(), GCOMResponse::read(), and GSkyMap::read_wcs().
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by data_save().
Print column information.
[in] | chatter | Chattiness. |
Implements GFitsHDU.
Definition at line 395 of file GFitsImage.cpp.
References GFitsHDU::m_header, naxes(), naxis(), NORMAL, npix(), gammalib::parformat(), GFitsHeader::print(), GFitsHDU::print_hdu(), gammalib::reduce(), SILENT, gammalib::str(), type(), and GFitsHDU::typecode().
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by fetch_data().
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by fetch_data(), and nulval().
|
protectedpure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
|
protected |
Save FITS image.
[in] | datatype | Datatype of pixels to be saved |
[in] | pixels | Pixel array to be saved |
GException::runtime_error | No FITS file has been opened. |
GException::fits_error | FITS error. |
Save image pixels into FITS file. In case that the HDU does not exist it is created. In case that the pixel array is empty no data are saved; all image pixels will be empty in this case.
Definition at line 721 of file GFitsImage.cpp.
References __ffcrim, __ffdhdu, __ffghsp, __ffiimg, __ffmahd, __ffpss, __ffrsim, exttype(), FPTR, G_SAVE_IMAGE, m_bitpix, GFitsHDU::m_fitsfile, GFitsHDU::m_hdunum, m_naxes, m_naxis, and type().
Referenced by data_save().
|
pure virtual |
Implemented in GFitsImageByte, GFitsImageDouble, GFitsImageFloat, GFitsImageLong, GFitsImageLongLong, GFitsImageSByte, GFitsImageShort, GFitsImageULong, and GFitsImageUShort.
Referenced by data_save(), fetch_data(), print(), and save_image().
|
protected |
Number of NULLs encountered.
Definition at line 116 of file GFitsImage.hpp.
Referenced by anynul(), copy_members(), fetch_data(), and init_members().
|
protected |
Number of Bits/pixel.
Definition at line 112 of file GFitsImage.hpp.
Referenced by bitpix(), copy_members(), GFitsImage(), GFitsImageByte::GFitsImageByte(), GFitsImageDouble::GFitsImageDouble(), GFitsImageFloat::GFitsImageFloat(), GFitsImageLong::GFitsImageLong(), GFitsImageLongLong::GFitsImageLongLong(), GFitsImageSByte::GFitsImageSByte(), GFitsImageShort::GFitsImageShort(), GFitsImageULong::GFitsImageULong(), GFitsImageUShort::GFitsImageUShort(), init_members(), GFitsImageLongLong::init_members(), GFitsImageLong::init_members(), GFitsImageShort::init_members(), GFitsImageUShort::init_members(), GFitsImageDouble::init_members(), GFitsImageULong::init_members(), GFitsImageByte::init_members(), GFitsImageFloat::init_members(), GFitsImageSByte::init_members(), and save_image().
|
protected |
Number of pixels in each dimension.
Definition at line 114 of file GFitsImage.hpp.
Referenced by copy_members(), free_members(), GFitsImage(), init_members(), load_image(), naxes(), offset(), open_image(), GFitsImageDouble::operator()(), GFitsImageByte::operator()(), GFitsImageULong::operator()(), GFitsImageLong::operator()(), GFitsImageLongLong::operator()(), GFitsImageSByte::operator()(), GFitsImageUShort::operator()(), GFitsImageShort::operator()(), GFitsImageFloat::operator()(), and save_image().
|
protected |
Image dimension.
Definition at line 113 of file GFitsImage.hpp.
Referenced by copy_members(), GFitsImage(), init_members(), load_image(), naxis(), offset(), open_image(), and save_image().
|
protected |
Number of image pixels.
Definition at line 115 of file GFitsImage.hpp.
Referenced by GFitsImageByte::alloc_data(), GFitsImageFloat::alloc_data(), GFitsImageSByte::alloc_data(), GFitsImageShort::alloc_data(), GFitsImageULong::alloc_data(), GFitsImageDouble::alloc_data(), GFitsImageLong::alloc_data(), GFitsImageUShort::alloc_data(), GFitsImageLongLong::alloc_data(), GFitsImageLongLong::construct_data(), GFitsImageSByte::construct_data(), GFitsImageDouble::construct_data(), GFitsImageShort::construct_data(), GFitsImageFloat::construct_data(), GFitsImageULong::construct_data(), GFitsImageLong::construct_data(), GFitsImageUShort::construct_data(), GFitsImageByte::construct_data(), copy_members(), GFitsImageSByte::copy_members(), GFitsImageFloat::copy_members(), GFitsImageShort::copy_members(), GFitsImageByte::copy_members(), GFitsImageULong::copy_members(), GFitsImageUShort::copy_members(), GFitsImageLong::copy_members(), GFitsImageLongLong::copy_members(), GFitsImageDouble::copy_members(), fetch_data(), GFitsImage(), GFitsImageByte::GFitsImageByte(), GFitsImageDouble::GFitsImageDouble(), GFitsImageFloat::GFitsImageFloat(), GFitsImageLong::GFitsImageLong(), GFitsImageLongLong::GFitsImageLongLong(), GFitsImageSByte::GFitsImageSByte(), GFitsImageShort::GFitsImageShort(), GFitsImageULong::GFitsImageULong(), GFitsImageUShort::GFitsImageUShort(), GFitsImageUShort::init_data(), GFitsImageFloat::init_data(), GFitsImageSByte::init_data(), GFitsImageShort::init_data(), GFitsImageDouble::init_data(), GFitsImageULong::init_data(), GFitsImageByte::init_data(), GFitsImageLongLong::init_data(), GFitsImageLong::init_data(), init_members(), npix(), offset(), and open_image().