GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GFitsImageUShort Class Reference

Unsigned short FITS image class. More...

#include <GFitsImageUShort.hpp>

Inheritance diagram for GFitsImageUShort:
GFitsImage GFitsHDU GBase

Public Member Functions

 GFitsImageUShort (void)
 Void constructor. More...
 
 GFitsImageUShort (const int &nx, const unsigned short *pixels=NULL)
 1D image constructor More...
 
 GFitsImageUShort (const int &nx, const int &ny, const unsigned short *pixels=NULL)
 2D image constructor More...
 
 GFitsImageUShort (const int &nx, const int &ny, const int &nz, const unsigned short *pixels=NULL)
 3D image constructor More...
 
 GFitsImageUShort (const int &nx, const int &ny, const int &nz, const int &nt, const unsigned short *pixels=NULL)
 4D image constructor More...
 
 GFitsImageUShort (const std::vector< int > &naxes, const unsigned short *pixels=NULL)
 Pixel array constructor. More...
 
 GFitsImageUShort (const GFitsImage &image)
 Type conversion constructor. More...
 
 GFitsImageUShort (const GFitsImageUShort &image)
 Copy constructor. More...
 
virtual ~GFitsImageUShort (void)
 Destructor. More...
 
GFitsImageUShortoperator= (const GFitsImageUShort &image)
 Assignment operator. More...
 
unsigned short & operator() (const int &ix)
 Image pixel access operator. More...
 
unsigned short & operator() (const int &ix, const int &iy)
 2D image pixel access operator More...
 
unsigned short & operator() (const int &ix, const int &iy, const int &iz)
 3D image pixel access operator More...
 
unsigned short & operator() (const int &ix, const int &iy, const int &iz, const int &it)
 4D image pixel access operator More...
 
const unsigned short & operator() (const int &ix) const
 Image pixel access operator (const variant) More...
 
const unsigned short & operator() (const int &ix, const int &iy) const
 2D image pixel access operator (const variant) More...
 
const unsigned short & operator() (const int &ix, const int &iy, const int &iz) const
 3D image pixel access operator (const variant) More...
 
const unsigned short & operator() (const int &ix, const int &iy, const int &iz, const int &it) const
 4D image pixel access operator (const variant) More...
 
void clear (void)
 Clear instance. More...
 
GFitsImageUShortclone (void) const
 Clone FITS image. More...
 
std::string classname (void) const
 Return class name. More...
 
unsigned short & at (const int &ix)
 Image pixel access operator. More...
 
unsigned short & at (const int &ix, const int &iy)
 2D image pixel access operator More...
 
unsigned short & at (const int &ix, const int &iy, const int &iz)
 3D image pixel access operator More...
 
unsigned short & at (const int &ix, const int &iy, const int &iz, const int &it)
 4D image pixel access operator More...
 
const unsigned short & at (const int &ix) const
 Image pixel access operator (const variant) More...
 
const unsigned short & at (const int &ix, const int &iy) const
 2D image pixel access operator (const variant) More...
 
const unsigned short & at (const int &ix, const int &iy, const int &iz) const
 3D image pixel access operator (const variant) More...
 
const unsigned short & at (const int &ix, const int &iy, const int &iz, const int &it) const
 4D image pixel access operator (const variant) More...
 
double pixel (const int &ix) const
 Return value of image pixel. More...
 
double pixel (const int &ix, const int &iy) const
 Return value of image pixel (2D version) More...
 
double pixel (const int &ix, const int &iy, const int &iz) const
 Return value of image pixel (3D version) More...
 
double pixel (const int &ix, const int &iy, const int &iz, const int &it) const
 Return value of image pixel (4D version) More...
 
void * pixels (void)
 Return pointer to image pixel. More...
 
int type (void) const
 Return image type. More...
 
- Public Member Functions inherited from GFitsImage
 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...
 
GFitsImageoperator= (const GFitsImage &image)
 Assignment operator. More...
 
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...
 
- Public Member Functions inherited from GFitsHDU
 GFitsHDU (void)
 Void constructor. More...
 
 GFitsHDU (const GFitsHDU &hdu)
 Copy constructor. More...
 
virtual ~GFitsHDU (void)
 Destructor. More...
 
GFitsHDUoperator= (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 GFitsHeaderheader (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...
 
GFitsHeaderCardcard (const int &cardno)
 Return header card. More...
 
const GFitsHeaderCardcard (const int &cardno) const
 Return header card (const version) More...
 
GFitsHeaderCardcard (const std::string &keyname)
 Return header card. More...
 
const GFitsHeaderCardcard (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...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Private Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GFitsImageUShort &image)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void alloc_data (void)
 Allocate data. More...
 
void init_data (void)
 Initialise data. More...
 
void release_data (void)
 Release data. More...
 
void construct_data (const unsigned short *pixels)
 Construct data from array. More...
 
void load_data (void) const
 Load data. More...
 
void alloc_nulval (const void *value)
 Allocates nul value. More...
 
void * ptr_data (void)
 
void * ptr_nulval (void)
 

Private Attributes

unsigned short * m_pixels
 Pixels. More...
 
unsigned short * m_nulval
 NULL value. More...
 

Additional Inherited Members

- Public Types inherited from GFitsHDU
enum  HDUType { HT_IMAGE = 0, HT_ASCII_TABLE = 1, HT_BIN_TABLE = 2 }
 
- Protected Member Functions inherited from GFitsImage
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...
 
- Protected Member Functions inherited from GFitsHDU
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 inherited from GFitsImage
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...
 
- Protected Attributes inherited from GFitsHDU
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...
 

Detailed Description

Unsigned short FITS image class.

Definition at line 39 of file GFitsImageUShort.hpp.

Constructor & Destructor Documentation

GFitsImageUShort::GFitsImageUShort ( void  )

Void constructor.

Definition at line 55 of file GFitsImageUShort.cpp.

References init_members().

Referenced by clone().

GFitsImageUShort::GFitsImageUShort ( const int &  nx,
const unsigned short *  pixels = NULL 
)

1D image constructor

Parameters
[in]nxNumber of pixels.
[in]pixelsOptional pointer to image pixel array

Construct 1D instance by specifying the number of pixels in the image.

Definition at line 73 of file GFitsImageUShort.cpp.

References construct_data(), and init_members().

GFitsImageUShort::GFitsImageUShort ( const int &  nx,
const int &  ny,
const unsigned short *  pixels = NULL 
)

2D image constructor

Parameters
[in]nxNumber of pixels in first dimension.
[in]nyNumber of pixels in second dimension.
[in]pixelsOptional pointer to image pixel array

Construct 2D image by specifying the number of pixels in each dimension.

Definition at line 97 of file GFitsImageUShort.cpp.

References construct_data(), and init_members().

GFitsImageUShort::GFitsImageUShort ( const int &  nx,
const int &  ny,
const int &  nz,
const unsigned short *  pixels = NULL 
)

3D image constructor

Parameters
[in]nxNumber of pixels in first dimension.
[in]nyNumber of pixels in second dimension.
[in]nzNumber of pixels in third dimension.
[in]pixelsOptional pointer to image pixel array

Construct 3D image by specifying the number of pixels in each dimension.

Definition at line 122 of file GFitsImageUShort.cpp.

References construct_data(), and init_members().

GFitsImageUShort::GFitsImageUShort ( const int &  nx,
const int &  ny,
const int &  nz,
const int &  nt,
const unsigned short *  pixels = NULL 
)

4D image constructor

Parameters
[in]nxNumber of pixels in first dimension.
[in]nyNumber of pixels in second dimension.
[in]nzNumber of pixels in third dimension.
[in]ntNumber of pixels in forth dimension.
[in]pixelsOptional pointer to image pixel array

Construct 4D image by specifying the number of pixels in each dimension.

Definition at line 148 of file GFitsImageUShort.cpp.

References construct_data(), and init_members().

GFitsImageUShort::GFitsImageUShort ( const std::vector< int > &  naxes,
const unsigned short *  pixels = NULL 
)

Pixel array constructor.

Parameters
[in]naxesVector of number of pixels in each dimension.
[in]pixelsOptional pointer to image pixel array

Construct instance of GFitsImageUShort by specifying the image dimension and the number of pixels in each dimension.

Definition at line 173 of file GFitsImageUShort.cpp.

References construct_data(), and init_members().

GFitsImageUShort::GFitsImageUShort ( const GFitsImage image)

Type conversion constructor.

Parameters
[in]imageFITS image.

This constructor performs the conversion of any image type into an unsigned short integer image.

Definition at line 196 of file GFitsImageUShort.cpp.

References GFitsHDU::card(), G_BITPIX, init_members(), GFitsImage::m_bitpix, GFitsImage::m_num_pixels, m_pixels, GFitsImage::pixel(), and GFitsHeaderCard::value().

GFitsImageUShort::GFitsImageUShort ( const GFitsImageUShort image)

Copy constructor.

Parameters
[in]imageFITS image.

Definition at line 226 of file GFitsImageUShort.cpp.

References copy_members(), and init_members().

GFitsImageUShort::~GFitsImageUShort ( void  )
virtual

Destructor.

Definition at line 243 of file GFitsImageUShort.cpp.

References free_members().

Member Function Documentation

void GFitsImageUShort::alloc_data ( void  )
privatevirtual

Allocate data.

Implements GFitsImage.

Definition at line 838 of file GFitsImageUShort.cpp.

References GFitsImage::m_num_pixels, m_pixels, and release_data().

Referenced by construct_data().

void GFitsImageUShort::alloc_nulval ( const void *  value)
privatevirtual

Allocates nul value.

Parameters
[in]valueNul value.

Implements GFitsImage.

Definition at line 944 of file GFitsImageUShort.cpp.

References m_nulval.

Referenced by copy_members().

unsigned short & GFitsImageUShort::at ( const int &  ix)

Image pixel access operator.

Parameters
[in]ixPixel index (starting from 0).

Provides access to a pixel of an image including range checking. Note that this method does not necessarily restrict do 1D images but generally applies to all image dimensions.

Definition at line 522 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

Referenced by pixel().

unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy 
)

2D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 540 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy,
const int &  iz 
)

3D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 559 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy,
const int &  iz,
const int &  it 
)

4D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).
[in]itPixel index in forth dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 579 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::at ( const int &  ix) const

Image pixel access operator (const variant)

Parameters
[in]ixPixel index (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 597 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy 
) const

2D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 615 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy,
const int &  iz 
) const

3D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 634 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::at ( const int &  ix,
const int &  iy,
const int &  iz,
const int &  it 
) const

4D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).
[in]itPixel index in forth dimension (starting from 0).

Provides access to a pixel of an image including range checking.

Definition at line 655 of file GFitsImageUShort.cpp.

References load_data(), m_pixels, and GFitsImage::offset().

std::string GFitsImageUShort::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GFitsImageUShort").

Implements GFitsImage.

Definition at line 109 of file GFitsImageUShort.hpp.

void GFitsImageUShort::clear ( void  )
virtual

Clear instance.

This method properly resets the object to an initial state.

Implements GFitsImage.

Definition at line 483 of file GFitsImageUShort.cpp.

References free_members(), GFitsImage::free_members(), GFitsHDU::free_members(), init_members(), GFitsImage::init_members(), and GFitsHDU::init_members().

GFitsImageUShort * GFitsImageUShort::clone ( void  ) const
virtual

Clone FITS image.

Cloning provides a copy of the FITS file. Cloning is used to allocate derived classes into a base class pointer.

Implements GFitsImage.

Definition at line 506 of file GFitsImageUShort.cpp.

References GFitsImageUShort().

void GFitsImageUShort::construct_data ( const unsigned short *  pixels)
private

Construct data from array.

Parameters
[in]pixelsOptional pointer to pixel array.

Initialise pixel data from an optional pixel array. If the pointer is NULL the image is simply initialised. This method supports all constructors.

Definition at line 895 of file GFitsImageUShort.cpp.

References alloc_data(), init_data(), GFitsImage::m_num_pixels, and m_pixels.

Referenced by GFitsImageUShort().

void GFitsImageUShort::copy_members ( const GFitsImageUShort image)
private

Copy class members.

Parameters
imageFITS image to copy

Copy class members. If the pixel array is linked the pointer to the array is copied. Otherwise a copy of the image pixels will be created.

Definition at line 785 of file GFitsImageUShort.cpp.

References alloc_nulval(), GFitsImage::fetch_data(), m_nulval, GFitsImage::m_num_pixels, m_pixels, and release_data().

Referenced by GFitsImageUShort(), and operator=().

void GFitsImageUShort::free_members ( void  )
private

Delete class members.

Definition at line 820 of file GFitsImageUShort.cpp.

References m_nulval, and m_pixels.

Referenced by clear(), operator=(), and ~GFitsImageUShort().

void GFitsImageUShort::init_data ( void  )
privatevirtual

Initialise data.

Implements GFitsImage.

Definition at line 856 of file GFitsImageUShort.cpp.

References GFitsImage::m_num_pixels, and m_pixels.

Referenced by construct_data().

void GFitsImageUShort::init_members ( void  )
private

Initialise class members.

Definition at line 765 of file GFitsImageUShort.cpp.

References G_BITPIX, GFitsImage::m_bitpix, m_nulval, and m_pixels.

Referenced by clear(), GFitsImageUShort(), and operator=().

void GFitsImageUShort::load_data ( void  ) const
private

Load data.

Load the image data if no pixels have been allocated.

Definition at line 927 of file GFitsImageUShort.cpp.

References GFitsImage::fetch_data(), and m_pixels.

Referenced by at(), operator()(), and pixels().

unsigned short & GFitsImageUShort::operator() ( const int &  ix)

Image pixel access operator.

Parameters
[in]ixPixel index (starting from 0).

Provides access to an image pixel. No range checking is performed. Use the at(ix) method if range checking is required.

Definition at line 296 of file GFitsImageUShort.cpp.

References load_data(), and m_pixels.

unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy 
)

2D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).

Provides access to a pixel of a 2D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 316 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy,
const int &  iz 
)

3D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).

Provides access to a pixel of a 3D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 340 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy,
const int &  iz,
const int &  it 
)

4D image pixel access operator

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).
[in]itPixel index in forth dimension (starting from 0).

Provides access to a pixel of a 4D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 366 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::operator() ( const int &  ix) const

Image pixel access operator (const variant)

Parameters
[in]ixPixel index (starting from 0).

Provides access to an image pixel. No range checking is performed. Use the at(ix) method if range checking is required.

Definition at line 388 of file GFitsImageUShort.cpp.

References load_data(), and m_pixels.

const unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy 
) const

2D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).

Provides access to a pixel of a 2D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 408 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy,
const int &  iz 
) const

3D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).

Provides access to a pixel of a 3D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 432 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

const unsigned short & GFitsImageUShort::operator() ( const int &  ix,
const int &  iy,
const int &  iz,
const int &  it 
) const

4D image pixel access operator (const variant)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).
[in]itPixel index in forth dimension (starting from 0).

Provides access to a pixel of a 4D image. No range checking or image dimension verification is performed. Use the at(ix,iy) method if range checking and image dimension verification is required.

Definition at line 458 of file GFitsImageUShort.cpp.

References load_data(), GFitsImage::m_naxes, m_pixels, and GFitsImage::offset().

GFitsImageUShort & GFitsImageUShort::operator= ( const GFitsImageUShort image)

Assignment operator.

Parameters
[in]imageFITS image.

Definition at line 264 of file GFitsImageUShort.cpp.

References copy_members(), free_members(), init_members(), and GFitsImage::operator=().

double GFitsImageUShort::pixel ( const int &  ix) const
virtual

Return value of image pixel.

Parameters
[in]ixPixel index (starting from 0).

Returns the value of an image pixel as double precision floating point value. This method performs range checking.

Implements GFitsImage.

Definition at line 674 of file GFitsImageUShort.cpp.

References at().

double GFitsImageUShort::pixel ( const int &  ix,
const int &  iy 
) const
virtual

Return value of image pixel (2D version)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).

Returns the value of an image pixel as double precision floating point value. This method performs range checking.

Implements GFitsImage.

Definition at line 690 of file GFitsImageUShort.cpp.

References at().

double GFitsImageUShort::pixel ( const int &  ix,
const int &  iy,
const int &  iz 
) const
virtual

Return value of image pixel (3D version)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).

Returns the value of an image pixel as double precision floating point value. This method performs range checking.

Implements GFitsImage.

Definition at line 707 of file GFitsImageUShort.cpp.

References at().

double GFitsImageUShort::pixel ( const int &  ix,
const int &  iy,
const int &  iz,
const int &  it 
) const
virtual

Return value of image pixel (4D version)

Parameters
[in]ixPixel index in first dimension (starting from 0).
[in]iyPixel index in second dimension (starting from 0).
[in]izPixel index in third dimension (starting from 0).
[in]itPixel index in forth dimension (starting from 0).

Returns the value of an image pixel as double precision floating point value. This method performs range checking.

Implements GFitsImage.

Definition at line 725 of file GFitsImageUShort.cpp.

References at().

void * GFitsImageUShort::pixels ( void  )
virtual

Return pointer to image pixel.

Implements GFitsImage.

Definition at line 736 of file GFitsImageUShort.cpp.

References load_data(), and m_pixels.

void* GFitsImageUShort::ptr_data ( void  )
inlineprivatevirtual

Implements GFitsImage.

Definition at line 94 of file GFitsImageUShort.hpp.

References m_pixels.

void* GFitsImageUShort::ptr_nulval ( void  )
inlineprivatevirtual

Implements GFitsImage.

Definition at line 95 of file GFitsImageUShort.hpp.

References m_nulval.

void GFitsImageUShort::release_data ( void  )
privatevirtual

Release data.

Implements GFitsImage.

Definition at line 873 of file GFitsImageUShort.cpp.

References m_pixels.

Referenced by alloc_data(), and copy_members().

int GFitsImageUShort::type ( void  ) const
virtual

Return image type.

Implements GFitsImage.

Definition at line 749 of file GFitsImageUShort.cpp.

References __TUSHORT.

Member Data Documentation

unsigned short* GFitsImageUShort::m_nulval
private

NULL value.

Definition at line 99 of file GFitsImageUShort.hpp.

Referenced by alloc_nulval(), copy_members(), free_members(), init_members(), and ptr_nulval().

unsigned short* GFitsImageUShort::m_pixels
private

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