Commit e808ebf6ccc4f254bc1ce0806cd70dfc393630a5
1 parent
fb457cc0
Finalise FITS module review.
GFitsAsciiTable GFitsBinTable The table constructors now take a const reference as argument. GFitsImage All constructors and methods now take const references as arguments. The size(), bitpix(), naxis() and anynul() methods return const references, nulval() returns a const pointer. GFitsImageByte GFitsImageDouble GFitsImageFloat GFitsImageLong GFitsImageLongLong GFitsImageSByte GFitsImageShort GFitsImageULong GFitsImageUShort All constructors now take const references as arguments.
Showing
35 changed files
with
715 additions
and
694 deletions
NEWS
| ... | ... | @@ -43,6 +43,10 @@ GFits |
| 43 | 43 | returned as const references. HDU access operators[] have been |
| 44 | 44 | implemented to access FITS extensions without range checking. |
| 45 | 45 | |
| 46 | +GFitsAsciiTable | |
| 47 | +GFitsBinTable | |
| 48 | + The table constructors now take a const reference as argument. | |
| 49 | + | |
| 46 | 50 | GFitsHDU |
| 47 | 51 | The card() methods now return a reference instead of a pointer. |
| 48 | 52 | |
| ... | ... | @@ -56,6 +60,22 @@ GFitsHeader |
| 56 | 60 | reference. Card access operators[] have been implemented to access |
| 57 | 61 | header cards without range checking. |
| 58 | 62 | |
| 63 | +GFitsImage | |
| 64 | + All constructors and methods now take const references as arguments. | |
| 65 | + The size(), bitpix(), naxis() and anynul() methods return const | |
| 66 | + references, nulval() returns a const pointer. | |
| 67 | + | |
| 68 | +GFitsImageByte | |
| 69 | +GFitsImageDouble | |
| 70 | +GFitsImageFloat | |
| 71 | +GFitsImageLong | |
| 72 | +GFitsImageLongLong | |
| 73 | +GFitsImageSByte | |
| 74 | +GFitsImageShort | |
| 75 | +GFitsImageULong | |
| 76 | +GFitsImageUShort | |
| 77 | + All constructors now take const references as arguments. | |
| 78 | + | |
| 59 | 79 | GFitsTable |
| 60 | 80 | The column table operator[] now returns a pointer instead of a |
| 61 | 81 | reference. Set set() method has been added for column setting. | ... | ... |
include/GFitsAsciiTable.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GFitsAsciiTable.hpp - FITS ASCII table class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsAsciiTable |
| 36 | 36 | * |
| 37 | - * @brief Interface for FITS ASCII table | |
| 37 | + * @brief FITS ASCII table class | |
| 38 | 38 | * |
| 39 | 39 | * The following ASCII table columns are supported: |
| 40 | 40 | * TSTRING (A), |
| ... | ... | @@ -47,17 +47,17 @@ class GFitsAsciiTable : public GFitsTable { |
| 47 | 47 | public: |
| 48 | 48 | // Constructors and destructors |
| 49 | 49 | GFitsAsciiTable(void); |
| 50 | - GFitsAsciiTable(int nrows); | |
| 50 | + GFitsAsciiTable(const int& nrows); | |
| 51 | 51 | GFitsAsciiTable(const GFitsAsciiTable& table); |
| 52 | 52 | virtual ~GFitsAsciiTable(void); |
| 53 | 53 | |
| 54 | 54 | // Operators |
| 55 | - GFitsAsciiTable& operator= (const GFitsAsciiTable& table); | |
| 55 | + GFitsAsciiTable& operator=(const GFitsAsciiTable& table); | |
| 56 | 56 | |
| 57 | 57 | // Methods |
| 58 | 58 | virtual void clear(void); |
| 59 | 59 | virtual GFitsAsciiTable* clone(void) const; |
| 60 | - HDUType exttype(void) const { return HT_ASCII_TABLE; } | |
| 60 | + HDUType exttype(void) const; | |
| 61 | 61 | |
| 62 | 62 | private: |
| 63 | 63 | // Private methods |
| ... | ... | @@ -66,4 +66,16 @@ private: |
| 66 | 66 | void free_members(void); |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | + | |
| 70 | +/***********************************************************************//** | |
| 71 | + * @brief Return extension type | |
| 72 | + * | |
| 73 | + * @return Extension type (HT_ASCII_TABLE). | |
| 74 | + ***************************************************************************/ | |
| 75 | +inline | |
| 76 | +GFitsHDU::HDUType GFitsAsciiTable::exttype(void) const | |
| 77 | +{ | |
| 78 | + return (HT_ASCII_TABLE); | |
| 79 | +} | |
| 80 | + | |
| 69 | 81 | #endif /* GFITSASCIITABLE_HPP */ | ... | ... |
include/GFitsBinTable.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | * GFitsBinTable.hpp - FITS binary table class * |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -34,24 +34,24 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsBinTable |
| 36 | 36 | * |
| 37 | - * @brief Interface for FITS binary table | |
| 37 | + * @brief FITS binary table class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsBinTable : public GFitsTable { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsBinTable(void); |
| 44 | - GFitsBinTable(int nrows); | |
| 44 | + GFitsBinTable(const int& nrows); | |
| 45 | 45 | GFitsBinTable(const GFitsBinTable& table); |
| 46 | 46 | virtual ~GFitsBinTable(void); |
| 47 | 47 | |
| 48 | 48 | // Operators |
| 49 | - GFitsBinTable& operator= (const GFitsBinTable& table); | |
| 49 | + GFitsBinTable& operator=(const GFitsBinTable& table); | |
| 50 | 50 | |
| 51 | 51 | // Implemented pure virtual methods |
| 52 | 52 | virtual void clear(void); |
| 53 | 53 | virtual GFitsBinTable* clone(void) const; |
| 54 | - HDUType exttype(void) const { return HT_BIN_TABLE; } | |
| 54 | + HDUType exttype(void) const; | |
| 55 | 55 | |
| 56 | 56 | private: |
| 57 | 57 | // Private methods |
| ... | ... | @@ -60,4 +60,16 @@ private: |
| 60 | 60 | void free_members(void); |
| 61 | 61 | }; |
| 62 | 62 | |
| 63 | + | |
| 64 | +/***********************************************************************//** | |
| 65 | + * @brief Return extension type | |
| 66 | + * | |
| 67 | + * @return Extension type (HT_BIN_TABLE). | |
| 68 | + ***************************************************************************/ | |
| 69 | +inline | |
| 70 | +GFitsHDU::HDUType GFitsBinTable::exttype(void) const | |
| 71 | +{ | |
| 72 | + return (HT_BIN_TABLE); | |
| 73 | +} | |
| 74 | + | |
| 63 | 75 | #endif /* GFITSBINTABLE_HPP */ | ... | ... |
include/GFitsImage.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImage.hpp - FITS image abstract base class * | |
| 2 | + * GFitsImage.hpp - Abstract FITS image base class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2008-2013 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImage.hpp |
| 23 | - * @brief GFitsImage class definition. | |
| 23 | + * @brief Abstract FITS image base class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,7 +34,7 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImage |
| 36 | 36 | * |
| 37 | - * @brief Abstract interface for the FITS image classes. | |
| 37 | + * @brief Abstract FITS image base class | |
| 38 | 38 | * |
| 39 | 39 | * This class defines the abstract interface for a FITS image. |
| 40 | 40 | ***************************************************************************/ |
| ... | ... | @@ -43,16 +43,16 @@ class GFitsImage : public GFitsHDU { |
| 43 | 43 | public: |
| 44 | 44 | // Constructors and destructors |
| 45 | 45 | GFitsImage(void); |
| 46 | - explicit GFitsImage(int bitpix, int nx); | |
| 47 | - explicit GFitsImage(int bitpix, int nx, int ny); | |
| 48 | - explicit GFitsImage(int bitpix, int nx, int ny, int nz); | |
| 49 | - explicit GFitsImage(int bitpix, int nx, int ny, int nz, int nt); | |
| 50 | - explicit GFitsImage(int bitpix, int naxis, const int* naxes); | |
| 46 | + GFitsImage(const int& bitpix, const int& nx); | |
| 47 | + GFitsImage(const int& bitpix, const int& nx, const int& ny); | |
| 48 | + GFitsImage(const int& bitpix, const int& nx, const int& ny, const int& nz); | |
| 49 | + GFitsImage(const int& bitpix, const int& nx, const int& ny, const int& nz, const int& nt); | |
| 50 | + GFitsImage(const int& bitpix, const int& naxis, const int* naxes); | |
| 51 | 51 | GFitsImage(const GFitsImage& image); |
| 52 | 52 | virtual ~GFitsImage(void); |
| 53 | 53 | |
| 54 | 54 | // Operators |
| 55 | - GFitsImage& operator= (const GFitsImage& image); | |
| 55 | + GFitsImage& operator=(const GFitsImage& image); | |
| 56 | 56 | |
| 57 | 57 | // Pure virtual methods |
| 58 | 58 | virtual void clear(void) = 0; |
| ... | ... | @@ -65,16 +65,16 @@ public: |
| 65 | 65 | virtual int type(void) const = 0; |
| 66 | 66 | |
| 67 | 67 | // Implemented pure virtual methods |
| 68 | - HDUType exttype(void) const { return HT_IMAGE; } | |
| 68 | + HDUType exttype(void) const; | |
| 69 | 69 | |
| 70 | 70 | // Base class methods |
| 71 | - int size(void) const; | |
| 72 | - int bitpix(void) const; | |
| 73 | - int naxis(void) const; | |
| 74 | - int naxes(int axis) const; | |
| 75 | - int anynul(void) const; | |
| 71 | + const int& size(void) const; | |
| 72 | + const int& bitpix(void) const; | |
| 73 | + const int& naxis(void) const; | |
| 74 | + int naxes(const int& axis) const; | |
| 75 | + const int& anynul(void) const; | |
| 76 | 76 | void nulval(const void* value); |
| 77 | - void* nulval(void); | |
| 77 | + const void* nulval(void) const; | |
| 78 | 78 | std::string print(const GChatter& chatter = NORMAL) const; |
| 79 | 79 | |
| 80 | 80 | protected: |
| ... | ... | @@ -113,4 +113,66 @@ protected: |
| 113 | 113 | int m_anynul; //!< Number of NULLs encountered |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | + | |
| 117 | +/***********************************************************************//** | |
| 118 | + * @brief Return extension type | |
| 119 | + * | |
| 120 | + * @return Extension type (HT_IMAGE). | |
| 121 | + ***************************************************************************/ | |
| 122 | +inline | |
| 123 | +GFitsHDU::HDUType GFitsImage::exttype(void) const | |
| 124 | +{ | |
| 125 | + return (HT_IMAGE); | |
| 126 | +} | |
| 127 | + | |
| 128 | + | |
| 129 | +/***********************************************************************//** | |
| 130 | + * @brief Return size of pixel array | |
| 131 | + ***************************************************************************/ | |
| 132 | +inline | |
| 133 | +const int& GFitsImage::size(void) const | |
| 134 | +{ | |
| 135 | + return m_num_pixels; | |
| 136 | +} | |
| 137 | + | |
| 138 | + | |
| 139 | +/***********************************************************************//** | |
| 140 | + * @brief Return number of Bits per pixel (negative=floating point) | |
| 141 | + ***************************************************************************/ | |
| 142 | +inline | |
| 143 | +const int& GFitsImage::bitpix(void) const | |
| 144 | +{ | |
| 145 | + return m_bitpix; | |
| 146 | +} | |
| 147 | + | |
| 148 | + | |
| 149 | +/***********************************************************************//** | |
| 150 | + * @brief Return dimension of image | |
| 151 | + ***************************************************************************/ | |
| 152 | +inline | |
| 153 | +const int& GFitsImage::naxis(void) const | |
| 154 | +{ | |
| 155 | + return m_naxis; | |
| 156 | +} | |
| 157 | + | |
| 158 | + | |
| 159 | +/***********************************************************************//** | |
| 160 | + * @brief Return number of nul values envountered during loading | |
| 161 | + ***************************************************************************/ | |
| 162 | +inline | |
| 163 | +const int& GFitsImage::anynul(void) const | |
| 164 | +{ | |
| 165 | + return m_anynul; | |
| 166 | +} | |
| 167 | + | |
| 168 | + | |
| 169 | +/***********************************************************************//** | |
| 170 | + * @brief Return nul value | |
| 171 | + ***************************************************************************/ | |
| 172 | +inline | |
| 173 | +const void* GFitsImage::nulval(void) const | |
| 174 | +{ | |
| 175 | + return (const_cast<GFitsImage*>(this)->ptr_nulval()); | |
| 176 | +} | |
| 177 | + | |
| 116 | 178 | #endif /* GFITSIMAGE_HPP */ | ... | ... |
include/GFitsImageByte.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageByte.hpp - FITS Byte image class * | |
| 2 | + * GFitsImageByte.hpp - FITS Byte image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,8 +20,8 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageByte.hpp |
| 23 | - * @brief GFitsImageByte class definition. | |
| 24 | - * @author J. Knodlseder | |
| 23 | + * @brief FITS Byte image class definition | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | 27 | #ifndef GFITSIMAGEBYTE_HPP |
| ... | ... | @@ -41,24 +41,24 @@ class GFitsImageByte : public GFitsImage { |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageByte(void); |
| 44 | - explicit GFitsImageByte(int nx, const unsigned char* pixels = NULL); | |
| 45 | - explicit GFitsImageByte(int nx, int ny, const unsigned char* pixels = NULL); | |
| 46 | - explicit GFitsImageByte(int nx, int ny, int nz, const unsigned char* pixels = NULL); | |
| 47 | - explicit GFitsImageByte(int nx, int ny, int nz, int nt, const unsigned char* pixels = NULL); | |
| 48 | - explicit GFitsImageByte(int naxis, const int* naxes, const unsigned char* pixels = NULL); | |
| 44 | + GFitsImageByte(const int& nx, const unsigned char* pixels = NULL); | |
| 45 | + GFitsImageByte(const int& nx, const int& ny, const unsigned char* pixels = NULL); | |
| 46 | + GFitsImageByte(const int& nx, const int& ny, const int& nz, const unsigned char* pixels = NULL); | |
| 47 | + GFitsImageByte(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned char* pixels = NULL); | |
| 48 | + GFitsImageByte(const int& naxis, const int* naxes, const unsigned char* pixels = NULL); | |
| 49 | 49 | GFitsImageByte(const GFitsImageByte& image); |
| 50 | 50 | virtual ~GFitsImageByte(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageByte& operator= (const GFitsImageByte& image); | |
| 54 | - unsigned char& operator() (const int& ix); | |
| 55 | - unsigned char& operator() (const int& ix, const int& iy); | |
| 56 | - unsigned char& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - unsigned char& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const unsigned char& operator() (const int& ix) const; | |
| 59 | - const unsigned char& operator() (const int& ix, const int& iy) const; | |
| 60 | - const unsigned char& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const unsigned char& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageByte& operator=(const GFitsImageByte& image); | |
| 54 | + unsigned char& operator()(const int& ix); | |
| 55 | + unsigned char& operator()(const int& ix, const int& iy); | |
| 56 | + unsigned char& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + unsigned char& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const unsigned char& operator()(const int& ix) const; | |
| 59 | + const unsigned char& operator()(const int& ix, const int& iy) const; | |
| 60 | + const unsigned char& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const unsigned char& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageDouble.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageDouble.hpp - FITS double precision image class * | |
| 2 | + * GFitsImageDouble.hpp - Double precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageDouble.hpp |
| 23 | - * @brief GFitsImageDouble class definition. | |
| 23 | + * @brief Double precision FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageDouble |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS double precision image | |
| 37 | + * @brief Double precision FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageDouble : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageDouble(void); |
| 44 | - explicit GFitsImageDouble(int nx, const double* pixels = NULL); | |
| 45 | - explicit GFitsImageDouble(int nx, int ny, const double* pixels = NULL); | |
| 46 | - explicit GFitsImageDouble(int nx, int ny, int nz, const double* pixels = NULL); | |
| 47 | - explicit GFitsImageDouble(int nx, int ny, int nz, int nt, const double* pixels = NULL); | |
| 48 | - explicit GFitsImageDouble(int naxis, const int* naxes, const double* pixels = NULL); | |
| 44 | + GFitsImageDouble(const int& nx, const double* pixels = NULL); | |
| 45 | + GFitsImageDouble(const int& nx, const int& ny, const double* pixels = NULL); | |
| 46 | + GFitsImageDouble(const int& nx, const int& ny, const int& nz, const double* pixels = NULL); | |
| 47 | + GFitsImageDouble(const int& nx, const int& ny, const int& nz, const int& nt, const double* pixels = NULL); | |
| 48 | + GFitsImageDouble(const int& naxis, const int* naxes, const double* pixels = NULL); | |
| 49 | 49 | GFitsImageDouble(const GFitsImageDouble& image); |
| 50 | 50 | virtual ~GFitsImageDouble(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageDouble& operator= (const GFitsImageDouble& image); | |
| 54 | - double& operator() (const int& ix); | |
| 55 | - double& operator() (const int& ix, const int& iy); | |
| 56 | - double& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - double& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const double& operator() (const int& ix) const; | |
| 59 | - const double& operator() (const int& ix, const int& iy) const; | |
| 60 | - const double& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const double& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageDouble& operator=(const GFitsImageDouble& image); | |
| 54 | + double& operator()(const int& ix); | |
| 55 | + double& operator()(const int& ix, const int& iy); | |
| 56 | + double& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + double& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const double& operator()(const int& ix) const; | |
| 59 | + const double& operator()(const int& ix, const int& iy) const; | |
| 60 | + const double& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const double& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageFloat.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageFloat.hpp - FITS single precision image class * | |
| 2 | + * GFitsImageFloat.hpp - Single precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageFloat.hpp |
| 23 | - * @brief GFitsImageFloat class definition. | |
| 23 | + * @brief Single precision FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageFloat |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS single precision image | |
| 37 | + * @brief Single precision FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageFloat : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageFloat(void); |
| 44 | - explicit GFitsImageFloat(int nx, const float* pixels = NULL); | |
| 45 | - explicit GFitsImageFloat(int nx, int ny, const float* pixels = NULL); | |
| 46 | - explicit GFitsImageFloat(int nx, int ny, int nz, const float* pixels = NULL); | |
| 47 | - explicit GFitsImageFloat(int nx, int ny, int nz, int nt, const float* pixels = NULL); | |
| 48 | - explicit GFitsImageFloat(int naxis, const int* naxes, const float* pixels = NULL); | |
| 44 | + GFitsImageFloat(const int& nx, const float* pixels = NULL); | |
| 45 | + GFitsImageFloat(const int& nx, const int& ny, const float* pixels = NULL); | |
| 46 | + GFitsImageFloat(const int& nx, const int& ny, const int& nz, const float* pixels = NULL); | |
| 47 | + GFitsImageFloat(const int& nx, const int& ny, const int& nz, const int& nt, const float* pixels = NULL); | |
| 48 | + GFitsImageFloat(const int& naxis, const int* naxes, const float* pixels = NULL); | |
| 49 | 49 | GFitsImageFloat(const GFitsImageFloat& image); |
| 50 | 50 | virtual ~GFitsImageFloat(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageFloat& operator= (const GFitsImageFloat& image); | |
| 54 | - float& operator() (const int& ix); | |
| 55 | - float& operator() (const int& ix, const int& iy); | |
| 56 | - float& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - float& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const float& operator() (const int& ix) const; | |
| 59 | - const float& operator() (const int& ix, const int& iy) const; | |
| 60 | - const float& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const float& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageFloat& operator=(const GFitsImageFloat& image); | |
| 54 | + float& operator()(const int& ix); | |
| 55 | + float& operator()(const int& ix, const int& iy); | |
| 56 | + float& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + float& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const float& operator()(const int& ix) const; | |
| 59 | + const float& operator()(const int& ix, const int& iy) const; | |
| 60 | + const float& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const float& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageLong.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLong.hpp - FITS long integer image class * | |
| 2 | + * GFitsImageLong.hpp - Long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,8 +20,8 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLong.hpp |
| 23 | - * @brief GFitsImageLong class definition. | |
| 24 | - * @author J. Knoedlseder | |
| 23 | + * @brief Long integer FITS image class definition | |
| 24 | + * @author Juergen Knoedlseder | |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | 27 | #ifndef GFITSIMAGELONG_HPP |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageLong |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS long integer image | |
| 37 | + * @brief Long integer FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageLong : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageLong(void); |
| 44 | - explicit GFitsImageLong(int nx, const long* pixels = NULL); | |
| 45 | - explicit GFitsImageLong(int nx, int ny, const long* pixels = NULL); | |
| 46 | - explicit GFitsImageLong(int nx, int ny, int nz, const long* pixels = NULL); | |
| 47 | - explicit GFitsImageLong(int nx, int ny, int nz, int nt, const long* pixels = NULL); | |
| 48 | - explicit GFitsImageLong(int naxis, const int* naxes, const long* pixels = NULL); | |
| 44 | + GFitsImageLong(const int& nx, const long* pixels = NULL); | |
| 45 | + GFitsImageLong(const int& nx, const int& ny, const long* pixels = NULL); | |
| 46 | + GFitsImageLong(const int& nx, const int& ny, const int& nz, const long* pixels = NULL); | |
| 47 | + GFitsImageLong(const int& nx, const int& ny, const int& nz, const int& nt, const long* pixels = NULL); | |
| 48 | + GFitsImageLong(const int& naxis, const int* naxes, const long* pixels = NULL); | |
| 49 | 49 | GFitsImageLong(const GFitsImageLong& image); |
| 50 | 50 | virtual ~GFitsImageLong(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageLong& operator= (const GFitsImageLong& image); | |
| 54 | - long& operator() (const int& ix); | |
| 55 | - long& operator() (const int& ix, const int& iy); | |
| 56 | - long& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - long& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const long& operator() (const int& ix) const; | |
| 59 | - const long& operator() (const int& ix, const int& iy) const; | |
| 60 | - const long& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const long& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageLong& operator=(const GFitsImageLong& image); | |
| 54 | + long& operator()(const int& ix); | |
| 55 | + long& operator()(const int& ix, const int& iy); | |
| 56 | + long& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + long& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const long& operator()(const int& ix) const; | |
| 59 | + const long& operator()(const int& ix, const int& iy) const; | |
| 60 | + const long& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const long& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageLongLong.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLongLong.hpp - FITS long long integer image class * | |
| 2 | + * GFitsImageLongLong.hpp - Long long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLongLong.hpp |
| 23 | - * @brief GFitsImageLongLong class definition. | |
| 23 | + * @brief Long long integer FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageLongLong |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS long long integer image | |
| 37 | + * @brief Long long integer FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageLongLong : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageLongLong(void); |
| 44 | - explicit GFitsImageLongLong(int nx, const long long* pixels = NULL); | |
| 45 | - explicit GFitsImageLongLong(int nx, int ny, const long long* pixels = NULL); | |
| 46 | - explicit GFitsImageLongLong(int nx, int ny, int nz, const long long* pixels = NULL); | |
| 47 | - explicit GFitsImageLongLong(int nx, int ny, int nz, int nt, const long long* pixels = NULL); | |
| 48 | - explicit GFitsImageLongLong(int naxis, const int* naxes, const long long* pixels = NULL); | |
| 44 | + GFitsImageLongLong(const int& nx, const long long* pixels = NULL); | |
| 45 | + GFitsImageLongLong(const int& nx, const int& ny, const long long* pixels = NULL); | |
| 46 | + GFitsImageLongLong(const int& nx, const int& ny, const int& nz, const long long* pixels = NULL); | |
| 47 | + GFitsImageLongLong(const int& nx, const int& ny, const int& nz, const int& nt, const long long* pixels = NULL); | |
| 48 | + GFitsImageLongLong(const int& naxis, const int* naxes, const long long* pixels = NULL); | |
| 49 | 49 | GFitsImageLongLong(const GFitsImageLongLong& image); |
| 50 | 50 | virtual ~GFitsImageLongLong(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageLongLong& operator= (const GFitsImageLongLong& image); | |
| 54 | - long long& operator() (const int& ix); | |
| 55 | - long long& operator() (const int& ix, const int& iy); | |
| 56 | - long long& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - long long& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const long long& operator() (const int& ix) const; | |
| 59 | - const long long& operator() (const int& ix, const int& iy) const; | |
| 60 | - const long long& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const long long& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageLongLong& operator=(const GFitsImageLongLong& image); | |
| 54 | + long long& operator()(const int& ix); | |
| 55 | + long long& operator()(const int& ix, const int& iy); | |
| 56 | + long long& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + long long& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const long long& operator()(const int& ix) const; | |
| 59 | + const long long& operator()(const int& ix, const int& iy) const; | |
| 60 | + const long long& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const long long& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageSByte.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageSByte.hpp - FITS signed Byte image class * | |
| 2 | + * GFitsImageSByte.hpp - Signed Byte FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageSByte.hpp |
| 23 | - * @brief GFitsImageSByte class definition. | |
| 23 | + * @brief Signed Byte FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageSByte |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS signed Byte image | |
| 37 | + * @brief Signed Byte FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageSByte : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageSByte(void); |
| 44 | - explicit GFitsImageSByte(int nx, const char* pixels = NULL); | |
| 45 | - explicit GFitsImageSByte(int nx, int ny, const char* pixels = NULL); | |
| 46 | - explicit GFitsImageSByte(int nx, int ny, int nz, const char* pixels = NULL); | |
| 47 | - explicit GFitsImageSByte(int nx, int ny, int nz, int nt, const char* pixels = NULL); | |
| 48 | - explicit GFitsImageSByte(int naxis, const int* naxes, const char* pixels = NULL); | |
| 44 | + GFitsImageSByte(const int& nx, const char* pixels = NULL); | |
| 45 | + GFitsImageSByte(const int& nx, const int& ny, const char* pixels = NULL); | |
| 46 | + GFitsImageSByte(const int& nx, const int& ny, const int& nz, const char* pixels = NULL); | |
| 47 | + GFitsImageSByte(const int& nx, const int& ny, const int& nz, const int& nt, const char* pixels = NULL); | |
| 48 | + GFitsImageSByte(const int& naxis, const int* naxes, const char* pixels = NULL); | |
| 49 | 49 | GFitsImageSByte(const GFitsImageSByte& image); |
| 50 | 50 | virtual ~GFitsImageSByte(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageSByte& operator= (const GFitsImageSByte& image); | |
| 54 | - char& operator() (const int& ix); | |
| 55 | - char& operator() (const int& ix, const int& iy); | |
| 56 | - char& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - char& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const char& operator() (const int& ix) const; | |
| 59 | - const char& operator() (const int& ix, const int& iy) const; | |
| 60 | - const char& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const char& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageSByte& operator=(const GFitsImageSByte& image); | |
| 54 | + char& operator()(const int& ix); | |
| 55 | + char& operator()(const int& ix, const int& iy); | |
| 56 | + char& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + char& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const char& operator()(const int& ix) const; | |
| 59 | + const char& operator()(const int& ix, const int& iy) const; | |
| 60 | + const char& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const char& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageShort.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageShort.hpp - FITS short integer image class * | |
| 2 | + * GFitsImageShort.hpp - Short integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageShort.hpp |
| 23 | - * @brief GFitsImageShort class definition. | |
| 23 | + * @brief Short integer FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageShort |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS short integer image | |
| 37 | + * @brief Short integer FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageShort : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageShort(void); |
| 44 | - explicit GFitsImageShort(int nx, const short* pixels = NULL); | |
| 45 | - explicit GFitsImageShort(int nx, int ny, const short* pixels = NULL); | |
| 46 | - explicit GFitsImageShort(int nx, int ny, int nz, const short* pixels = NULL); | |
| 47 | - explicit GFitsImageShort(int nx, int ny, int nz, int nt, const short* pixels = NULL); | |
| 48 | - explicit GFitsImageShort(int naxis, const int* naxes, const short* pixels = NULL); | |
| 44 | + GFitsImageShort(const int& nx, const short* pixels = NULL); | |
| 45 | + GFitsImageShort(const int& nx, const int& ny, const short* pixels = NULL); | |
| 46 | + GFitsImageShort(const int& nx, const int& ny, const int& nz, const short* pixels = NULL); | |
| 47 | + GFitsImageShort(const int& nx, const int& ny, const int& nz, const int& nt, const short* pixels = NULL); | |
| 48 | + GFitsImageShort(const int& naxis, const int* naxes, const short* pixels = NULL); | |
| 49 | 49 | GFitsImageShort(const GFitsImageShort& image); |
| 50 | 50 | virtual ~GFitsImageShort(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageShort& operator= (const GFitsImageShort& image); | |
| 54 | - short& operator() (const int& ix); | |
| 55 | - short& operator() (const int& ix, const int& iy); | |
| 56 | - short& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - short& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const short& operator() (const int& ix) const; | |
| 59 | - const short& operator() (const int& ix, const int& iy) const; | |
| 60 | - const short& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const short& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageShort& operator=(const GFitsImageShort& image); | |
| 54 | + short& operator()(const int& ix); | |
| 55 | + short& operator()(const int& ix, const int& iy); | |
| 56 | + short& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + short& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const short& operator()(const int& ix) const; | |
| 59 | + const short& operator()(const int& ix, const int& iy) const; | |
| 60 | + const short& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const short& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageULong.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageULong.hpp - FITS unsigned long image class * | |
| 2 | + * GFitsImageULong.hpp - Unsigned long image FITS class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageULong.hpp |
| 23 | - * @brief GFitsImageULong class definition. | |
| 23 | + * @brief Unsigned long image FITS class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageULong |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS unsigned long integer image | |
| 37 | + * @brief Unsigned long image FITS class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageULong : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageULong(void); |
| 44 | - explicit GFitsImageULong(int nx, const unsigned long* pixels = NULL); | |
| 45 | - explicit GFitsImageULong(int nx, int ny, const unsigned long* pixels = NULL); | |
| 46 | - explicit GFitsImageULong(int nx, int ny, int nz, const unsigned long* pixels = NULL); | |
| 47 | - explicit GFitsImageULong(int nx, int ny, int nz, int nt, const unsigned long* pixels = NULL); | |
| 48 | - explicit GFitsImageULong(int naxis, const int* naxes, const unsigned long* pixels = NULL); | |
| 44 | + GFitsImageULong(const int& nx, const unsigned long* pixels = NULL); | |
| 45 | + GFitsImageULong(const int& nx, const int& ny, const unsigned long* pixels = NULL); | |
| 46 | + GFitsImageULong(const int& nx, const int& ny, const int& nz, const unsigned long* pixels = NULL); | |
| 47 | + GFitsImageULong(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned long* pixels = NULL); | |
| 48 | + GFitsImageULong(const int& naxis, const int* naxes, const unsigned long* pixels = NULL); | |
| 49 | 49 | GFitsImageULong(const GFitsImageULong& image); |
| 50 | 50 | virtual ~GFitsImageULong(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageULong& operator= (const GFitsImageULong& image); | |
| 54 | - unsigned long& operator() (const int& ix); | |
| 55 | - unsigned long& operator() (const int& ix, const int& iy); | |
| 56 | - unsigned long& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - unsigned long& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const unsigned long& operator() (const int& ix) const; | |
| 59 | - const unsigned long& operator() (const int& ix, const int& iy) const; | |
| 60 | - const unsigned long& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const unsigned long& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageULong& operator=(const GFitsImageULong& image); | |
| 54 | + unsigned long& operator()(const int& ix); | |
| 55 | + unsigned long& operator()(const int& ix, const int& iy); | |
| 56 | + unsigned long& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + unsigned long& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const unsigned long& operator()(const int& ix) const; | |
| 59 | + const unsigned long& operator()(const int& ix, const int& iy) const; | |
| 60 | + const unsigned long& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const unsigned long& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
include/GFitsImageUShort.hpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageUShort.hpp - FITS unsigned short image class * | |
| 2 | + * GFitsImageUShort.hpp - Unsigned short FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageUShort.hpp |
| 23 | - * @brief GFitsImageUShort class definition. | |
| 23 | + * @brief Unsigned short FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -34,31 +34,31 @@ |
| 34 | 34 | /***********************************************************************//** |
| 35 | 35 | * @class GFitsImageUShort |
| 36 | 36 | * |
| 37 | - * @brief Implements a FITS unsigned short integer image | |
| 37 | + * @brief Unsigned short FITS image class | |
| 38 | 38 | ***************************************************************************/ |
| 39 | 39 | class GFitsImageUShort : public GFitsImage { |
| 40 | 40 | |
| 41 | 41 | public: |
| 42 | 42 | // Constructors and destructors |
| 43 | 43 | GFitsImageUShort(void); |
| 44 | - explicit GFitsImageUShort(int nx, const unsigned short* pixels = NULL); | |
| 45 | - explicit GFitsImageUShort(int nx, int ny, const unsigned short* pixels = NULL); | |
| 46 | - explicit GFitsImageUShort(int nx, int ny, int nz, const unsigned short* pixels = NULL); | |
| 47 | - explicit GFitsImageUShort(int nx, int ny, int nz, int nt, const unsigned short* pixels = NULL); | |
| 48 | - explicit GFitsImageUShort(int naxis, const int* naxes, const unsigned short* pixels = NULL); | |
| 44 | + GFitsImageUShort(const int& nx, const unsigned short* pixels = NULL); | |
| 45 | + GFitsImageUShort(const int& nx, const int& ny, const unsigned short* pixels = NULL); | |
| 46 | + GFitsImageUShort(const int& nx, const int& ny, const int& nz, const unsigned short* pixels = NULL); | |
| 47 | + GFitsImageUShort(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned short* pixels = NULL); | |
| 48 | + GFitsImageUShort(const int& naxis, const int* naxes, const unsigned short* pixels = NULL); | |
| 49 | 49 | GFitsImageUShort(const GFitsImageUShort& image); |
| 50 | 50 | virtual ~GFitsImageUShort(void); |
| 51 | 51 | |
| 52 | 52 | // Operators |
| 53 | - GFitsImageUShort& operator= (const GFitsImageUShort& image); | |
| 54 | - unsigned short& operator() (const int& ix); | |
| 55 | - unsigned short& operator() (const int& ix, const int& iy); | |
| 56 | - unsigned short& operator() (const int& ix, const int& iy, const int& iz); | |
| 57 | - unsigned short& operator() (const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | - const unsigned short& operator() (const int& ix) const; | |
| 59 | - const unsigned short& operator() (const int& ix, const int& iy) const; | |
| 60 | - const unsigned short& operator() (const int& ix, const int& iy, const int& iz) const; | |
| 61 | - const unsigned short& operator() (const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 53 | + GFitsImageUShort& operator=(const GFitsImageUShort& image); | |
| 54 | + unsigned short& operator()(const int& ix); | |
| 55 | + unsigned short& operator()(const int& ix, const int& iy); | |
| 56 | + unsigned short& operator()(const int& ix, const int& iy, const int& iz); | |
| 57 | + unsigned short& operator()(const int& ix, const int& iy, const int& iz, const int& it); | |
| 58 | + const unsigned short& operator()(const int& ix) const; | |
| 59 | + const unsigned short& operator()(const int& ix, const int& iy) const; | |
| 60 | + const unsigned short& operator()(const int& ix, const int& iy, const int& iz) const; | |
| 61 | + const unsigned short& operator()(const int& ix, const int& iy, const int& iz, const int& it) const; | |
| 62 | 62 | |
| 63 | 63 | // Methods |
| 64 | 64 | void clear(void); | ... | ... |
pyext/GFitsImage.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImage.i - FITS abstract image base class * | |
| 2 | + * GFitsImage.i - Abstract FITS image base class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2008-2013 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImage.i |
| 23 | - * @brief GFitsImage class SWIG file. | |
| 23 | + * @brief Abstract FITS image base class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -90,16 +90,17 @@ static int image_pixel_tuple(PyObject *input, int *ptr) { |
| 90 | 90 | /***********************************************************************//** |
| 91 | 91 | * @class GFitsImage |
| 92 | 92 | * |
| 93 | - * @brief Abstract SWIG interface for the FITS image classes. | |
| 93 | + * @brief Abstract FITS image base class | |
| 94 | 94 | ***************************************************************************/ |
| 95 | 95 | class GFitsImage : public GFitsHDU { |
| 96 | 96 | public: |
| 97 | 97 | // Constructors and destructors |
| 98 | 98 | GFitsImage(void); |
| 99 | - explicit GFitsImage(int bitpix, int nx); | |
| 100 | - explicit GFitsImage(int bitpix, int nx, int ny); | |
| 101 | - explicit GFitsImage(int bitpix, int nx, int ny, int nz); | |
| 102 | - explicit GFitsImage(int bitpix, int nx, int ny, int nz, int nt); | |
| 99 | + GFitsImage(const int& bitpix, const int& nx); | |
| 100 | + GFitsImage(const int& bitpix, const int& nx, const int& ny); | |
| 101 | + GFitsImage(const int& bitpix, const int& nx, const int& ny, const int& nz); | |
| 102 | + GFitsImage(const int& bitpix, const int& nx, const int& ny, const int& nz, const int& nt); | |
| 103 | + GFitsImage(const int& bitpix, const int& naxis, const int* naxes); | |
| 103 | 104 | GFitsImage(const GFitsImage& image); |
| 104 | 105 | virtual ~GFitsImage(void); |
| 105 | 106 | |
| ... | ... | @@ -114,16 +115,16 @@ public: |
| 114 | 115 | virtual int type(void) const = 0; |
| 115 | 116 | |
| 116 | 117 | // Implemented pure virtual methods |
| 117 | - HDUType exttype(void) const { return HT_IMAGE; } | |
| 118 | + HDUType exttype(void) const; | |
| 118 | 119 | |
| 119 | - // Methods | |
| 120 | - int size(void) const; | |
| 121 | - int bitpix(void) const; | |
| 122 | - int naxis(void) const; | |
| 123 | - int naxes(int axis) const; | |
| 124 | - int anynul(void) const; | |
| 125 | - void nulval(const void* value); | |
| 126 | - void* nulval(void); | |
| 120 | + // Base class methods | |
| 121 | + const int& size(void) const; | |
| 122 | + const int& bitpix(void) const; | |
| 123 | + const int& naxis(void) const; | |
| 124 | + int naxes(const int& axis) const; | |
| 125 | + const int& anynul(void) const; | |
| 126 | + void nulval(const void* value); | |
| 127 | + const void* nulval(void) const; | |
| 127 | 128 | }; |
| 128 | 129 | |
| 129 | 130 | ... | ... |
pyext/GFitsImageByte.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageByte.i - FITS Byte image class SWIG interface * | |
| 2 | + * GFitsImageByte.i - FITS Byte image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageByte.i |
| 23 | - * @brief GFitsImageByte class SWIG file. | |
| 23 | + * @brief FITS Byte image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -32,17 +32,17 @@ |
| 32 | 32 | /***********************************************************************//** |
| 33 | 33 | * @class GFitsImageByte |
| 34 | 34 | * |
| 35 | - * @brief SWIG interface for the FITS Byte image class. | |
| 35 | + * @brief FITS Byte image class | |
| 36 | 36 | ***************************************************************************/ |
| 37 | 37 | class GFitsImageByte : public GFitsImage { |
| 38 | - | |
| 39 | 38 | public: |
| 40 | 39 | // Constructors and destructors |
| 41 | 40 | GFitsImageByte(void); |
| 42 | - explicit GFitsImageByte(int nx, const unsigned char* pixels = NULL); | |
| 43 | - explicit GFitsImageByte(int nx, int ny, const unsigned char* pixels = NULL); | |
| 44 | - explicit GFitsImageByte(int nx, int ny, int nz, const unsigned char* pixels = NULL); | |
| 45 | - explicit GFitsImageByte(int nx, int ny, int nz, int nt, const unsigned char* pixels = NULL); | |
| 41 | + GFitsImageByte(const int& nx, const unsigned char* pixels = NULL); | |
| 42 | + GFitsImageByte(const int& nx, const int& ny, const unsigned char* pixels = NULL); | |
| 43 | + GFitsImageByte(const int& nx, const int& ny, const int& nz, const unsigned char* pixels = NULL); | |
| 44 | + GFitsImageByte(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned char* pixels = NULL); | |
| 45 | + GFitsImageByte(const int& naxis, const int* naxes, const unsigned char* pixels = NULL); | |
| 46 | 46 | GFitsImageByte(const GFitsImageByte& image); |
| 47 | 47 | virtual ~GFitsImageByte(void); |
| 48 | 48 | ... | ... |
pyext/GFitsImageDouble.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageDouble.i - FITS double precision image class SWIG interface * | |
| 2 | + * GFitsImageDouble.i - Double precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageDouble.i |
| 23 | - * @brief GFitsImageDouble class SWIG file. | |
| 23 | + * @brief Double precision FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageDouble |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS double precision image class. | |
| 36 | + * @brief Double precision FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageDouble : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageDouble(void); |
| 43 | - explicit GFitsImageDouble(int nx, const double* pixels = NULL); | |
| 44 | - explicit GFitsImageDouble(int nx, int ny, const double* pixels = NULL); | |
| 45 | - explicit GFitsImageDouble(int nx, int ny, int nz, const double* pixels = NULL); | |
| 46 | - explicit GFitsImageDouble(int nx, int ny, int nz, int nt, const double* pixels = NULL); | |
| 42 | + GFitsImageDouble(const int& nx, const double* pixels = NULL); | |
| 43 | + GFitsImageDouble(const int& nx, const int& ny, const double* pixels = NULL); | |
| 44 | + GFitsImageDouble(const int& nx, const int& ny, const int& nz, const double* pixels = NULL); | |
| 45 | + GFitsImageDouble(const int& nx, const int& ny, const int& nz, const int& nt, const double* pixels = NULL); | |
| 46 | + GFitsImageDouble(const int& naxis, const int* naxes, const double* pixels = NULL); | |
| 47 | 47 | GFitsImageDouble(const GFitsImageDouble& image); |
| 48 | 48 | virtual ~GFitsImageDouble(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageFloat.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageFloat.i - FITS single precision image class SWIG interface * | |
| 2 | + * GFitsImageFloat.i - Single precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageFloat.i |
| 23 | - * @brief GFitsImageFloat class SWIG file. | |
| 23 | + * @brief Single precision FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageFloat |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS single precision image class. | |
| 36 | + * @brief Single precision FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageFloat : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageFloat(void); |
| 43 | - explicit GFitsImageFloat(int nx, const float* pixels = NULL); | |
| 44 | - explicit GFitsImageFloat(int nx, int ny, const float* pixels = NULL); | |
| 45 | - explicit GFitsImageFloat(int nx, int ny, int nz, const float* pixels = NULL); | |
| 46 | - explicit GFitsImageFloat(int nx, int ny, int nz, int nt, const float* pixels = NULL); | |
| 42 | + GFitsImageFloat(const int& nx, const float* pixels = NULL); | |
| 43 | + GFitsImageFloat(const int& nx, const int& ny, const float* pixels = NULL); | |
| 44 | + GFitsImageFloat(const int& nx, const int& ny, const int& nz, const float* pixels = NULL); | |
| 45 | + GFitsImageFloat(const int& nx, const int& ny, const int& nz, const int& nt, const float* pixels = NULL); | |
| 46 | + GFitsImageFloat(const int& naxis, const int* naxes, const float* pixels = NULL); | |
| 47 | 47 | GFitsImageFloat(const GFitsImageFloat& image); |
| 48 | 48 | virtual ~GFitsImageFloat(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageLong.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLong.i - FITS long integer image class SWIG interface * | |
| 2 | + * GFitsImageLong.i - Long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLong.i |
| 23 | - * @brief GFitsImageLong class SWIG file. | |
| 23 | + * @brief Long integer FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageLong |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS long integer image class. | |
| 36 | + * @brief Long integer FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageLong : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageLong(void); |
| 43 | - explicit GFitsImageLong(int nx, const long* pixels = NULL); | |
| 44 | - explicit GFitsImageLong(int nx, int ny, const long* pixels = NULL); | |
| 45 | - explicit GFitsImageLong(int nx, int ny, int nz, const long* pixels = NULL); | |
| 46 | - explicit GFitsImageLong(int nx, int ny, int nz, int nt, const long* pixels = NULL); | |
| 42 | + GFitsImageLong(const int& nx, const long* pixels = NULL); | |
| 43 | + GFitsImageLong(const int& nx, const int& ny, const long* pixels = NULL); | |
| 44 | + GFitsImageLong(const int& nx, const int& ny, const int& nz, const long* pixels = NULL); | |
| 45 | + GFitsImageLong(const int& nx, const int& ny, const int& nz, const int& nt, const long* pixels = NULL); | |
| 46 | + GFitsImageLong(const int& naxis, const int* naxes, const long* pixels = NULL); | |
| 47 | 47 | GFitsImageLong(const GFitsImageLong& image); |
| 48 | 48 | virtual ~GFitsImageLong(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageLongLong.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLongLong.i - FITS long long image class SWIG interface * | |
| 2 | + * GFitsImageLongLong.i - Long long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLongLong.i |
| 23 | - * @brief GFitsImageLongLong class SWIG file. | |
| 23 | + * @brief Long long integer FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -36,14 +36,14 @@ |
| 36 | 36 | * @brief SWIG interface for the FITS long long image class. |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageLongLong : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageLongLong(void); |
| 43 | - explicit GFitsImageLongLong(int nx, const long long* pixels = NULL); | |
| 44 | - explicit GFitsImageLongLong(int nx, int ny, const long long* pixels = NULL); | |
| 45 | - explicit GFitsImageLongLong(int nx, int ny, int nz, const long long* pixels = NULL); | |
| 46 | - explicit GFitsImageLongLong(int nx, int ny, int nz, int nt, const long long* pixels = NULL); | |
| 42 | + GFitsImageLongLong(const int& nx, const long long* pixels = NULL); | |
| 43 | + GFitsImageLongLong(const int& nx, const int& ny, const long long* pixels = NULL); | |
| 44 | + GFitsImageLongLong(const int& nx, const int& ny, const int& nz, const long long* pixels = NULL); | |
| 45 | + GFitsImageLongLong(const int& nx, const int& ny, const int& nz, const int& nt, const long long* pixels = NULL); | |
| 46 | + GFitsImageLongLong(const int& naxis, const int* naxes, const long long* pixels = NULL); | |
| 47 | 47 | GFitsImageLongLong(const GFitsImageLongLong& image); |
| 48 | 48 | virtual ~GFitsImageLongLong(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageSByte.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageSByte.i - FITS signed Byte image class SWIG interface * | |
| 2 | + * GFitsImageSByte.i - Signed Byte FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageSByte.i |
| 23 | - * @brief GFitsImageSByte class SWIG file. | |
| 23 | + * @brief Signed Byte FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageSByte |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS signed Byte image class. | |
| 36 | + * @brief Signed Byte FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageSByte : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageSByte(void); |
| 43 | - explicit GFitsImageSByte(int nx, const char* pixels = NULL); | |
| 44 | - explicit GFitsImageSByte(int nx, int ny, const char* pixels = NULL); | |
| 45 | - explicit GFitsImageSByte(int nx, int ny, int nz, const char* pixels = NULL); | |
| 46 | - explicit GFitsImageSByte(int nx, int ny, int nz, int nt, const char* pixels = NULL); | |
| 42 | + GFitsImageSByte(const int& nx, const char* pixels = NULL); | |
| 43 | + GFitsImageSByte(const int& nx, const int& ny, const char* pixels = NULL); | |
| 44 | + GFitsImageSByte(const int& nx, const int& ny, const int& nz, const char* pixels = NULL); | |
| 45 | + GFitsImageSByte(const int& nx, const int& ny, const int& nz, const int& nt, const char* pixels = NULL); | |
| 46 | + GFitsImageSByte(const int& naxis, const int* naxes, const char* pixels = NULL); | |
| 47 | 47 | GFitsImageSByte(const GFitsImageSByte& image); |
| 48 | 48 | virtual ~GFitsImageSByte(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageShort.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageShort.i - FITS short integer image class SWIG interface * | |
| 2 | + * GFitsImageShort.i - Short integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageShort.i |
| 23 | - * @brief GFitsImageShort class SWIG file. | |
| 23 | + * @brief Short integer FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageShort |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS short integer image class. | |
| 36 | + * @brief Short integer FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageShort : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageShort(void); |
| 43 | - explicit GFitsImageShort(int nx, const short* pixels = NULL); | |
| 44 | - explicit GFitsImageShort(int nx, int ny, const short* pixels = NULL); | |
| 45 | - explicit GFitsImageShort(int nx, int ny, int nz, const short* pixels = NULL); | |
| 46 | - explicit GFitsImageShort(int nx, int ny, int nz, int nt, const short* pixels = NULL); | |
| 42 | + GFitsImageShort(const int& nx, const short* pixels = NULL); | |
| 43 | + GFitsImageShort(const int& nx, const int& ny, const short* pixels = NULL); | |
| 44 | + GFitsImageShort(const int& nx, const int& ny, const int& nz, const short* pixels = NULL); | |
| 45 | + GFitsImageShort(const int& nx, const int& ny, const int& nz, const int& nt, const short* pixels = NULL); | |
| 46 | + GFitsImageShort(const int& naxis, const int* naxes, const short* pixels = NULL); | |
| 47 | 47 | GFitsImageShort(const GFitsImageShort& image); |
| 48 | 48 | virtual ~GFitsImageShort(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageULong.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageULong.i - FITS unsigned long image class SWIG interface * | |
| 2 | + * GFitsImageULong.i - Unsigned long image FITS class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageULong.i |
| 23 | - * @brief GFitsImageULong class SWIG file. | |
| 23 | + * @brief Unsigned long image FITS class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,17 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageULong |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS unsigned long image class. | |
| 36 | + * @brief Unsigned long image FITS class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageULong : public GFitsImage { |
| 39 | - | |
| 40 | 39 | public: |
| 41 | 40 | // Constructors and destructors |
| 42 | 41 | GFitsImageULong(void); |
| 43 | - explicit GFitsImageULong(int nx, const unsigned long* pixels = NULL); | |
| 44 | - explicit GFitsImageULong(int nx, int ny, const unsigned long* pixels = NULL); | |
| 45 | - explicit GFitsImageULong(int nx, int ny, int nz, const unsigned long* pixels = NULL); | |
| 46 | - explicit GFitsImageULong(int nx, int ny, int nz, int nt, const unsigned long* pixels = NULL); | |
| 42 | + GFitsImageULong(const int& nx, const unsigned long* pixels = NULL); | |
| 43 | + GFitsImageULong(const int& nx, const int& ny, const unsigned long* pixels = NULL); | |
| 44 | + GFitsImageULong(const int& nx, const int& ny, const int& nz, const unsigned long* pixels = NULL); | |
| 45 | + GFitsImageULong(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned long* pixels = NULL); | |
| 46 | + GFitsImageULong(const int& naxis, const int* naxes, const unsigned long* pixels = NULL); | |
| 47 | 47 | GFitsImageULong(const GFitsImageULong& image); |
| 48 | 48 | virtual ~GFitsImageULong(void); |
| 49 | 49 | ... | ... |
pyext/GFitsImageUShort.i
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageUShort.i - FITS unsigned short image class SWIG interface * | |
| 2 | + * GFitsImageUShort.i - Unsigned short FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageUShort.i |
| 23 | - * @brief GFitsImageUShort class SWIG file. | |
| 23 | + * @brief Unsigned short FITS image class definition | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | %{ |
| ... | ... | @@ -33,17 +33,18 @@ |
| 33 | 33 | /***********************************************************************//** |
| 34 | 34 | * @class GFitsImageUShort |
| 35 | 35 | * |
| 36 | - * @brief SWIG interface for the FITS unsigned short image class. | |
| 36 | + * @brief Unsigned short FITS image class | |
| 37 | 37 | ***************************************************************************/ |
| 38 | 38 | class GFitsImageUShort : public GFitsImage { |
| 39 | 39 | |
| 40 | 40 | public: |
| 41 | 41 | // Constructors and destructors |
| 42 | 42 | GFitsImageUShort(void); |
| 43 | - explicit GFitsImageUShort(int nx, const unsigned short* pixels = NULL); | |
| 44 | - explicit GFitsImageUShort(int nx, int ny, const unsigned short* pixels = NULL); | |
| 45 | - explicit GFitsImageUShort(int nx, int ny, int nz, const unsigned short* pixels = NULL); | |
| 46 | - explicit GFitsImageUShort(int nx, int ny, int nz, int nt, const unsigned short* pixels = NULL); | |
| 43 | + GFitsImageUShort(const int& nx, const unsigned short* pixels = NULL); | |
| 44 | + GFitsImageUShort(const int& nx, const int& ny, const unsigned short* pixels = NULL); | |
| 45 | + GFitsImageUShort(const int& nx, const int& ny, const int& nz, const unsigned short* pixels = NULL); | |
| 46 | + GFitsImageUShort(const int& nx, const int& ny, const int& nz, const int& nt, const unsigned short* pixels = NULL); | |
| 47 | + GFitsImageUShort(const int& naxis, const int* naxes, const unsigned short* pixels = NULL); | |
| 47 | 48 | GFitsImageUShort(const GFitsImageUShort& image); |
| 48 | 49 | virtual ~GFitsImageUShort(void); |
| 49 | 50 | ... | ... |
src/fits/GFitsAsciiTable.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsAsciiTable.cpp - FITS ASCII table class * | |
| 2 | + * GFitsAsciiTable.cpp - FITS ASCII table class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -44,7 +44,7 @@ |
| 44 | 44 | ==========================================================================*/ |
| 45 | 45 | |
| 46 | 46 | /***********************************************************************//** |
| 47 | - * @brief Constructor | |
| 47 | + * @brief Void constructor | |
| 48 | 48 | ***************************************************************************/ |
| 49 | 49 | GFitsAsciiTable::GFitsAsciiTable(void) : GFitsTable() |
| 50 | 50 | { |
| ... | ... | @@ -57,11 +57,11 @@ GFitsAsciiTable::GFitsAsciiTable(void) : GFitsTable() |
| 57 | 57 | |
| 58 | 58 | |
| 59 | 59 | /***********************************************************************//** |
| 60 | - * @brief Constructor | |
| 60 | + * @brief Table constructor | |
| 61 | 61 | * |
| 62 | 62 | * @param[in] nrows Number of rows in table. |
| 63 | 63 | ***************************************************************************/ |
| 64 | -GFitsAsciiTable::GFitsAsciiTable(int nrows) : GFitsTable(nrows) | |
| 64 | +GFitsAsciiTable::GFitsAsciiTable(const int& nrows) : GFitsTable(nrows) | |
| 65 | 65 | { |
| 66 | 66 | // Initialise class members for clean destruction |
| 67 | 67 | init_members(); |
| ... | ... | @@ -74,7 +74,7 @@ GFitsAsciiTable::GFitsAsciiTable(int nrows) : GFitsTable(nrows) |
| 74 | 74 | /***********************************************************************//** |
| 75 | 75 | * @brief Copy constructor |
| 76 | 76 | * |
| 77 | - * @param[in] table Table. | |
| 77 | + * @param[in] table ASCII table. | |
| 78 | 78 | ***************************************************************************/ |
| 79 | 79 | GFitsAsciiTable::GFitsAsciiTable(const GFitsAsciiTable& table) : GFitsTable(table) |
| 80 | 80 | { |
| ... | ... | @@ -111,7 +111,8 @@ GFitsAsciiTable::~GFitsAsciiTable() |
| 111 | 111 | /***********************************************************************//** |
| 112 | 112 | * @brief Assignment operator |
| 113 | 113 | * |
| 114 | - * @param[in] table Table. | |
| 114 | + * @param[in] table ASCII table. | |
| 115 | + * @return ASCII table. | |
| 115 | 116 | ***************************************************************************/ |
| 116 | 117 | GFitsAsciiTable& GFitsAsciiTable::operator=(const GFitsAsciiTable& table) |
| 117 | 118 | { |
| ... | ... | @@ -144,7 +145,7 @@ GFitsAsciiTable& GFitsAsciiTable::operator=(const GFitsAsciiTable& table) |
| 144 | 145 | ==========================================================================*/ |
| 145 | 146 | |
| 146 | 147 | /***********************************************************************//** |
| 147 | - * @brief Clear instance | |
| 148 | + * @brief Clear ASCII table | |
| 148 | 149 | * |
| 149 | 150 | * This method properly resets the object to an initial state. |
| 150 | 151 | ***************************************************************************/ |
| ... | ... | @@ -167,6 +168,8 @@ void GFitsAsciiTable::clear(void) |
| 167 | 168 | |
| 168 | 169 | /***********************************************************************//** |
| 169 | 170 | * @brief Clone ASCII table |
| 171 | + * | |
| 172 | + * @return Pointer to deep copy of ASCII table. | |
| 170 | 173 | ***************************************************************************/ |
| 171 | 174 | GFitsAsciiTable* GFitsAsciiTable::clone(void) const |
| 172 | 175 | { | ... | ... |
src/fits/GFitsBinTable.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsBinTable.cpp - FITS binary table class * | |
| 2 | + * GFitsBinTable.cpp - FITS binary table class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | ==========================================================================*/ |
| 49 | 49 | |
| 50 | 50 | /***********************************************************************//** |
| 51 | - * @brief Constructor | |
| 51 | + * @brief Void constructor | |
| 52 | 52 | ***************************************************************************/ |
| 53 | 53 | GFitsBinTable::GFitsBinTable(void) : GFitsTable() |
| 54 | 54 | { |
| ... | ... | @@ -61,11 +61,11 @@ GFitsBinTable::GFitsBinTable(void) : GFitsTable() |
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | /***********************************************************************//** |
| 64 | - * @brief Constructor | |
| 64 | + * @brief Table constructor | |
| 65 | 65 | * |
| 66 | 66 | * @param[in] nrows Number of rows in table |
| 67 | 67 | ***************************************************************************/ |
| 68 | -GFitsBinTable::GFitsBinTable(int nrows) : GFitsTable(nrows) | |
| 68 | +GFitsBinTable::GFitsBinTable(const int& nrows) : GFitsTable(nrows) | |
| 69 | 69 | { |
| 70 | 70 | // Initialise class members for clean destruction |
| 71 | 71 | init_members(); |
| ... | ... | @@ -78,8 +78,7 @@ GFitsBinTable::GFitsBinTable(int nrows) : GFitsTable(nrows) |
| 78 | 78 | /***********************************************************************//** |
| 79 | 79 | * @brief Copy constructor |
| 80 | 80 | * |
| 81 | - * @param[in] table Table which will be used to construct GFitsBinTable | |
| 82 | - * instance | |
| 81 | + * @param[in] table Binary table. | |
| 83 | 82 | ***************************************************************************/ |
| 84 | 83 | GFitsBinTable::GFitsBinTable(const GFitsBinTable& table) : GFitsTable(table) |
| 85 | 84 | { |
| ... | ... | @@ -116,7 +115,8 @@ GFitsBinTable::~GFitsBinTable(void) |
| 116 | 115 | /***********************************************************************//** |
| 117 | 116 | * @brief Assignment operator |
| 118 | 117 | * |
| 119 | - * @param[in] table Table which will be assigned | |
| 118 | + * @param[in] table Binary table. | |
| 119 | + * @return Binary table. | |
| 120 | 120 | ***************************************************************************/ |
| 121 | 121 | GFitsBinTable& GFitsBinTable::operator=(const GFitsBinTable& table) |
| 122 | 122 | { |
| ... | ... | @@ -149,7 +149,7 @@ GFitsBinTable& GFitsBinTable::operator=(const GFitsBinTable& table) |
| 149 | 149 | ==========================================================================*/ |
| 150 | 150 | |
| 151 | 151 | /***********************************************************************//** |
| 152 | - * @brief Clear instance | |
| 152 | + * @brief Clear binary table | |
| 153 | 153 | * |
| 154 | 154 | * This method properly resets the object to an initial state. |
| 155 | 155 | ***************************************************************************/ |
| ... | ... | @@ -172,6 +172,8 @@ void GFitsBinTable::clear(void) |
| 172 | 172 | |
| 173 | 173 | /***********************************************************************//** |
| 174 | 174 | * @brief Clone binary table |
| 175 | + * | |
| 176 | + * @return Pointer to deep copy of binary table. | |
| 175 | 177 | ***************************************************************************/ |
| 176 | 178 | GFitsBinTable* GFitsBinTable::clone(void) const |
| 177 | 179 | { | ... | ... |
src/fits/GFitsImage.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImage.cpp - FITS image class * | |
| 2 | + * GFitsImage.cpp - Abstract FITS image base class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | 4 | * copyright (C) 2008-2013 by Juergen Knoedlseder * |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImage.cpp |
| 23 | - * @brief FITS image class implementation | |
| 23 | + * @brief Abstract FITS image base class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -82,7 +82,7 @@ GFitsImage::GFitsImage(void) : GFitsHDU() |
| 82 | 82 | * Construct 1D instance of GFitsImage by specifying the number of pixels. |
| 83 | 83 | * This method also adds the relevant header cards. |
| 84 | 84 | ***************************************************************************/ |
| 85 | -GFitsImage::GFitsImage(int bitpix, int nx) : GFitsHDU() | |
| 85 | +GFitsImage::GFitsImage(const int& bitpix, const int& nx) : GFitsHDU() | |
| 86 | 86 | { |
| 87 | 87 | // Initialise class members for clean destruction |
| 88 | 88 | init_members(); |
| ... | ... | @@ -116,7 +116,8 @@ GFitsImage::GFitsImage(int bitpix, int nx) : GFitsHDU() |
| 116 | 116 | * Construct 2D instance of GFitsImage by specifying the number of pixels |
| 117 | 117 | * in each dimension. This method also adds the relevant header cards. |
| 118 | 118 | ***************************************************************************/ |
| 119 | -GFitsImage::GFitsImage(int bitpix, int nx, int ny) : GFitsHDU() | |
| 119 | +GFitsImage::GFitsImage(const int& bitpix, const int& nx, const int& ny) : | |
| 120 | + GFitsHDU() | |
| 120 | 121 | { |
| 121 | 122 | // Initialise class members for clean destruction |
| 122 | 123 | init_members(); |
| ... | ... | @@ -152,7 +153,8 @@ GFitsImage::GFitsImage(int bitpix, int nx, int ny) : GFitsHDU() |
| 152 | 153 | * Construct 3D instance of GFitsImage by specifying the number of pixels |
| 153 | 154 | * in each dimension. This method also adds the relevant header cards. |
| 154 | 155 | ***************************************************************************/ |
| 155 | -GFitsImage::GFitsImage(int bitpix, int nx, int ny, int nz) : GFitsHDU() | |
| 156 | +GFitsImage::GFitsImage(const int& bitpix, const int& nx, const int& ny, | |
| 157 | + const int& nz) : GFitsHDU() | |
| 156 | 158 | { |
| 157 | 159 | // Initialise class members for clean destruction |
| 158 | 160 | init_members(); |
| ... | ... | @@ -190,7 +192,8 @@ GFitsImage::GFitsImage(int bitpix, int nx, int ny, int nz) : GFitsHDU() |
| 190 | 192 | * Construct 4D instance of GFitsImage by specifying the number of pixels |
| 191 | 193 | * in each dimension. This method also adds the relevant header cards. |
| 192 | 194 | ***************************************************************************/ |
| 193 | -GFitsImage::GFitsImage(int bitpix, int nx, int ny, int nz, int nt) : GFitsHDU() | |
| 195 | +GFitsImage::GFitsImage(const int& bitpix, const int& nx, const int& ny, | |
| 196 | + const int& nz, const int& nt) : GFitsHDU() | |
| 194 | 197 | { |
| 195 | 198 | // Initialise class members for clean destruction |
| 196 | 199 | init_members(); |
| ... | ... | @@ -221,14 +224,15 @@ GFitsImage::GFitsImage(int bitpix, int nx, int ny, int nz, int nt) : GFitsHDU() |
| 221 | 224 | * @brief Constructor |
| 222 | 225 | * |
| 223 | 226 | * @param[in] bitpix Number of Bits per pixel (negative is floating point). |
| 224 | - * @param[in] naxis Image dimensions (0,1,2,3,4). | |
| 225 | - * @param[in] naxes Number of pixels in each dimension. | |
| 227 | + * @param[in] naxis Image dimensions [0,1,2,3,4]. | |
| 228 | + * @param[in] naxes Pointer to array giving number of pixels in each dimension. | |
| 226 | 229 | * |
| 227 | 230 | * Construct instance of GFitsImage by specifying the image dimension and |
| 228 | 231 | * the number of pixels in each dimension. This method also adds the relevant |
| 229 | 232 | * header cards. |
| 230 | 233 | ***************************************************************************/ |
| 231 | -GFitsImage::GFitsImage(int bitpix, int naxis, const int* naxes) : GFitsHDU() | |
| 234 | +GFitsImage::GFitsImage(const int& bitpix, const int& naxis, | |
| 235 | + const int* naxes) : GFitsHDU() | |
| 232 | 236 | { |
| 233 | 237 | // Initialise class members for clean destruction |
| 234 | 238 | init_members(); |
| ... | ... | @@ -261,7 +265,7 @@ GFitsImage::GFitsImage(int bitpix, int naxis, const int* naxes) : GFitsHDU() |
| 261 | 265 | /***********************************************************************//** |
| 262 | 266 | * @brief Copy constructor |
| 263 | 267 | * |
| 264 | - * @param[in] image FITS image which should be used for construction. | |
| 268 | + * @param[in] image FITS image. | |
| 265 | 269 | ***************************************************************************/ |
| 266 | 270 | GFitsImage::GFitsImage(const GFitsImage& image) : GFitsHDU(image) |
| 267 | 271 | { |
| ... | ... | @@ -298,9 +302,10 @@ GFitsImage::~GFitsImage(void) |
| 298 | 302 | /***********************************************************************//** |
| 299 | 303 | * @brief Assignment operator |
| 300 | 304 | * |
| 301 | - * @param[in] image FITS image to be assigned | |
| 305 | + * @param[in] image FITS image. | |
| 306 | + * @return FITS image. | |
| 302 | 307 | ***************************************************************************/ |
| 303 | -GFitsImage& GFitsImage::operator= (const GFitsImage& image) | |
| 308 | +GFitsImage& GFitsImage::operator=(const GFitsImage& image) | |
| 304 | 309 | { |
| 305 | 310 | // Execute only if object is not identical |
| 306 | 311 | if (this != &image) { |
| ... | ... | @@ -331,49 +336,19 @@ GFitsImage& GFitsImage::operator= (const GFitsImage& image) |
| 331 | 336 | ==========================================================================*/ |
| 332 | 337 | |
| 333 | 338 | /***********************************************************************//** |
| 334 | - * @brief Return size of pixel array | |
| 335 | - ***************************************************************************/ | |
| 336 | -int GFitsImage::size(void) const | |
| 337 | -{ | |
| 338 | - // Return number of pixels | |
| 339 | - return m_num_pixels; | |
| 340 | -} | |
| 341 | - | |
| 342 | - | |
| 343 | -/***********************************************************************//** | |
| 344 | - * @brief Return number of Bits per pixel (negative=floating point) | |
| 345 | - ***************************************************************************/ | |
| 346 | -int GFitsImage::bitpix(void) const | |
| 347 | -{ | |
| 348 | - // Return number of Bits per pixel | |
| 349 | - return m_bitpix; | |
| 350 | -} | |
| 351 | - | |
| 352 | - | |
| 353 | -/***********************************************************************//** | |
| 354 | - * @brief Return dimension of image | |
| 355 | - ***************************************************************************/ | |
| 356 | -int GFitsImage::naxis(void) const | |
| 357 | -{ | |
| 358 | - // Return dimension | |
| 359 | - return m_naxis; | |
| 360 | -} | |
| 361 | - | |
| 362 | - | |
| 363 | -/***********************************************************************//** | |
| 364 | 339 | * @brief Return dimension of an image axis |
| 365 | 340 | * |
| 366 | - * @param[in] axis Image axis (starting from 0). | |
| 341 | + * @param[in] axis Image axis [0,...,naxis()-1]. | |
| 367 | 342 | * |
| 368 | 343 | * @exception GException::out_of_range |
| 369 | 344 | * Image axis not valid. |
| 370 | 345 | ***************************************************************************/ |
| 371 | -int GFitsImage::naxes(int axis) const | |
| 346 | +int GFitsImage::naxes(const int& axis) const | |
| 372 | 347 | { |
| 373 | 348 | // Check if axis is within the range |
| 374 | 349 | #if defined(G_RANGE_CHECK) |
| 375 | - if (axis < 0 || axis >= m_naxis) { | |
| 376 | - throw GException::out_of_range(G_NAXES, axis, 0, m_naxis-1); | |
| 350 | + if (axis < 0 || axis >= naxis()) { | |
| 351 | + throw GException::out_of_range(G_NAXES, "Image axis", axis, naxis()); | |
| 377 | 352 | } |
| 378 | 353 | #endif |
| 379 | 354 | |
| ... | ... | @@ -386,16 +361,6 @@ int GFitsImage::naxes(int axis) const |
| 386 | 361 | |
| 387 | 362 | |
| 388 | 363 | /***********************************************************************//** |
| 389 | - * @brief Return number of nul values envountered during loading | |
| 390 | - ***************************************************************************/ | |
| 391 | -int GFitsImage::anynul(void) const | |
| 392 | -{ | |
| 393 | - // Return number of nul values | |
| 394 | - return m_anynul; | |
| 395 | -} | |
| 396 | - | |
| 397 | - | |
| 398 | -/***********************************************************************//** | |
| 399 | 364 | * @brief Set nul value |
| 400 | 365 | * |
| 401 | 366 | * @param[in] value Nul value. |
| ... | ... | @@ -411,7 +376,8 @@ void GFitsImage::nulval(const void* value) |
| 411 | 376 | // Allocate nul value |
| 412 | 377 | alloc_nulval(value); |
| 413 | 378 | |
| 414 | - // Update column | |
| 379 | + // Update image | |
| 380 | + //TODO | |
| 415 | 381 | |
| 416 | 382 | // Return |
| 417 | 383 | return; |
| ... | ... | @@ -419,16 +385,6 @@ void GFitsImage::nulval(const void* value) |
| 419 | 385 | |
| 420 | 386 | |
| 421 | 387 | /***********************************************************************//** |
| 422 | - * @brief Return nul value | |
| 423 | - ***************************************************************************/ | |
| 424 | -void* GFitsImage::nulval(void) | |
| 425 | -{ | |
| 426 | - // Return | |
| 427 | - return (ptr_nulval()); | |
| 428 | -} | |
| 429 | - | |
| 430 | - | |
| 431 | -/***********************************************************************//** | |
| 432 | 388 | * @brief Print column information |
| 433 | 389 | * |
| 434 | 390 | * @param[in] chatter Chattiness (defaults to NORMAL). |
| ... | ... | @@ -453,12 +409,15 @@ std::string GFitsImage::print(const GChatter& chatter) const |
| 453 | 409 | result.append("\n"+print_hdu(chatter)); |
| 454 | 410 | |
| 455 | 411 | // Append image dimensions |
| 456 | - result.append("\n"+gammalib::parformat("Image type")+typecode(type())); | |
| 457 | - result.append("\n"+gammalib::parformat("Number of dimensions")+gammalib::str(naxis())); | |
| 458 | - result.append("\n"+gammalib::parformat("Number of image pixels")+gammalib::str(size())); | |
| 412 | + result.append("\n"+gammalib::parformat("Image type")); | |
| 413 | + result.append(typecode(type())); | |
| 414 | + result.append("\n"+gammalib::parformat("Number of dimensions")); | |
| 415 | + result.append(gammalib::str(naxis())); | |
| 416 | + result.append("\n"+gammalib::parformat("Number of image pixels")); | |
| 417 | + result.append(gammalib::str(size())); | |
| 459 | 418 | for (int i = 0; i < naxis(); ++i) { |
| 460 | - result.append("\n"+gammalib::parformat("Number of bins in "+gammalib::str(i)) + | |
| 461 | - gammalib::str(naxes(i))); | |
| 419 | + result.append("\n"+gammalib::parformat("Number of bins in "+gammalib::str(i))); | |
| 420 | + result.append(gammalib::str(naxes(i))); | |
| 462 | 421 | } |
| 463 | 422 | |
| 464 | 423 | // NORMAL: Append header information |
| ... | ... | @@ -480,6 +439,66 @@ std::string GFitsImage::print(const GChatter& chatter) const |
| 480 | 439 | ==========================================================================*/ |
| 481 | 440 | |
| 482 | 441 | /***********************************************************************//** |
| 442 | + * @brief Initialise class members | |
| 443 | + ***************************************************************************/ | |
| 444 | +void GFitsImage::init_members(void) | |
| 445 | +{ | |
| 446 | + // Initialise members | |
| 447 | + m_bitpix = 8; | |
| 448 | + m_naxis = 0; | |
| 449 | + m_naxes = NULL; | |
| 450 | + m_num_pixels = 0; | |
| 451 | + m_anynul = 0; | |
| 452 | + | |
| 453 | + // Return | |
| 454 | + return; | |
| 455 | +} | |
| 456 | + | |
| 457 | + | |
| 458 | +/***********************************************************************//** | |
| 459 | + * @brief Copy class members | |
| 460 | + * | |
| 461 | + * @param[in] image FITS image to copy | |
| 462 | + ***************************************************************************/ | |
| 463 | +void GFitsImage::copy_members(const GFitsImage& image) | |
| 464 | +{ | |
| 465 | + // Copy attributes | |
| 466 | + m_bitpix = image.m_bitpix; | |
| 467 | + m_naxis = image.m_naxis; | |
| 468 | + m_num_pixels = image.m_num_pixels; | |
| 469 | + m_anynul = image.m_anynul; | |
| 470 | + | |
| 471 | + // Copy axes | |
| 472 | + m_naxes = NULL; | |
| 473 | + if (image.m_naxes != NULL && m_naxis > 0) { | |
| 474 | + m_naxes = new long[m_naxis]; | |
| 475 | + for (int i = 0; i < m_naxis; ++i) { | |
| 476 | + m_naxes[i] = image.m_naxes[i]; | |
| 477 | + } | |
| 478 | + } | |
| 479 | + | |
| 480 | + // Return | |
| 481 | + return; | |
| 482 | +} | |
| 483 | + | |
| 484 | + | |
| 485 | +/***********************************************************************//** | |
| 486 | + * @brief Delete class members | |
| 487 | + ***************************************************************************/ | |
| 488 | +void GFitsImage::free_members(void) | |
| 489 | +{ | |
| 490 | + // Free memory | |
| 491 | + if (m_naxes != NULL) delete [] m_naxes; | |
| 492 | + | |
| 493 | + // Mark memory as free | |
| 494 | + m_naxes = NULL; | |
| 495 | + | |
| 496 | + // Return | |
| 497 | + return; | |
| 498 | +} | |
| 499 | + | |
| 500 | + | |
| 501 | +/***********************************************************************//** | |
| 483 | 502 | * @brief Open FITS image |
| 484 | 503 | * |
| 485 | 504 | * @param[in] vptr FITS file pointer |
| ... | ... | @@ -953,69 +972,3 @@ int GFitsImage::offset(const int& ix, const int& iy, const int& iz, |
| 953 | 972 | // Return offset |
| 954 | 973 | return (ix + m_naxes[0] * (iy + m_naxes[1] * (iz + it * m_naxes[2]))); |
| 955 | 974 | } |
| 956 | - | |
| 957 | - | |
| 958 | -/*========================================================================== | |
| 959 | - = = | |
| 960 | - = Private methods = | |
| 961 | - = = | |
| 962 | - ==========================================================================*/ | |
| 963 | - | |
| 964 | -/***********************************************************************//** | |
| 965 | - * @brief Initialise class members | |
| 966 | - ***************************************************************************/ | |
| 967 | -void GFitsImage::init_members(void) | |
| 968 | -{ | |
| 969 | - // Initialise members | |
| 970 | - m_bitpix = 8; | |
| 971 | - m_naxis = 0; | |
| 972 | - m_naxes = NULL; | |
| 973 | - m_num_pixels = 0; | |
| 974 | - m_anynul = 0; | |
| 975 | - | |
| 976 | - // Return | |
| 977 | - return; | |
| 978 | -} | |
| 979 | - | |
| 980 | - | |
| 981 | -/***********************************************************************//** | |
| 982 | - * @brief Copy class members | |
| 983 | - * | |
| 984 | - * @param[in] image FITS image to copy | |
| 985 | - ***************************************************************************/ | |
| 986 | -void GFitsImage::copy_members(const GFitsImage& image) | |
| 987 | -{ | |
| 988 | - // Copy attributes | |
| 989 | - m_bitpix = image.m_bitpix; | |
| 990 | - m_naxis = image.m_naxis; | |
| 991 | - m_num_pixels = image.m_num_pixels; | |
| 992 | - m_anynul = image.m_anynul; | |
| 993 | - | |
| 994 | - // Copy axes | |
| 995 | - m_naxes = NULL; | |
| 996 | - if (image.m_naxes != NULL && m_naxis > 0) { | |
| 997 | - m_naxes = new long[m_naxis]; | |
| 998 | - for (int i = 0; i < m_naxis; ++i) { | |
| 999 | - m_naxes[i] = image.m_naxes[i]; | |
| 1000 | - } | |
| 1001 | - } | |
| 1002 | - | |
| 1003 | - // Return | |
| 1004 | - return; | |
| 1005 | -} | |
| 1006 | - | |
| 1007 | - | |
| 1008 | -/***********************************************************************//** | |
| 1009 | - * @brief Delete class members | |
| 1010 | - ***************************************************************************/ | |
| 1011 | -void GFitsImage::free_members(void) | |
| 1012 | -{ | |
| 1013 | - // Free memory | |
| 1014 | - if (m_naxes != NULL) delete [] m_naxes; | |
| 1015 | - | |
| 1016 | - // Mark memory as free | |
| 1017 | - m_naxes = NULL; | |
| 1018 | - | |
| 1019 | - // Return | |
| 1020 | - return; | |
| 1021 | -} | ... | ... |
src/fits/GFitsImageByte.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageByte.cpp - FITS Byte image class * | |
| 2 | + * GFitsImageByte.cpp - FITS Byte image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -70,7 +70,7 @@ GFitsImageByte::GFitsImageByte(void) : GFitsImage() |
| 70 | 70 | * |
| 71 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 72 | 72 | ***************************************************************************/ |
| 73 | -GFitsImageByte::GFitsImageByte(int nx, const unsigned char* pixels) : | |
| 73 | +GFitsImageByte::GFitsImageByte(const int& nx, const unsigned char* pixels) : | |
| 74 | 74 | GFitsImage(G_BITPIX, nx) |
| 75 | 75 | { |
| 76 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -93,7 +93,8 @@ GFitsImageByte::GFitsImageByte(int nx, const unsigned char* pixels) : |
| 93 | 93 | * |
| 94 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 95 | 95 | ***************************************************************************/ |
| 96 | -GFitsImageByte::GFitsImageByte(int nx, int ny, const unsigned char* pixels) : | |
| 96 | +GFitsImageByte::GFitsImageByte(const int& nx, const int& ny, | |
| 97 | + const unsigned char* pixels) : | |
| 97 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 98 | 99 | { |
| 99 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -117,7 +118,7 @@ GFitsImageByte::GFitsImageByte(int nx, int ny, const unsigned char* pixels) : |
| 117 | 118 | * |
| 118 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 119 | 120 | ***************************************************************************/ |
| 120 | -GFitsImageByte::GFitsImageByte(int nx, int ny, int nz, | |
| 121 | +GFitsImageByte::GFitsImageByte(const int& nx, const int& ny, const int& nz, | |
| 121 | 122 | const unsigned char* pixels) : |
| 122 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 123 | 124 | { |
| ... | ... | @@ -143,8 +144,8 @@ GFitsImageByte::GFitsImageByte(int nx, int ny, int nz, |
| 143 | 144 | * |
| 144 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 145 | 146 | ***************************************************************************/ |
| 146 | -GFitsImageByte::GFitsImageByte(int nx, int ny, int nz, int nt, | |
| 147 | - const unsigned char* pixels) : | |
| 147 | +GFitsImageByte::GFitsImageByte(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, const unsigned char* pixels) : | |
| 148 | 149 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 149 | 150 | { |
| 150 | 151 | // Initialise class members for clean destruction |
| ... | ... | @@ -169,7 +170,7 @@ GFitsImageByte::GFitsImageByte(int nx, int ny, int nz, int nt, |
| 169 | 170 | * the number of pixels in each dimension. Note that this constructor does |
| 170 | 171 | * not allocate any memory for the actual image. |
| 171 | 172 | ***************************************************************************/ |
| 172 | -GFitsImageByte::GFitsImageByte(int naxis, const int* naxes, | |
| 173 | +GFitsImageByte::GFitsImageByte(const int& naxis, const int* naxes, | |
| 173 | 174 | const unsigned char* pixels) : |
| 174 | 175 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 176 | { |
| ... | ... | @@ -226,8 +227,9 @@ GFitsImageByte::~GFitsImageByte(void) |
| 226 | 227 | * @brief Assignment operator |
| 227 | 228 | * |
| 228 | 229 | * @param[in] image FITS image. |
| 230 | + * @return FITS image. | |
| 229 | 231 | ***************************************************************************/ |
| 230 | -GFitsImageByte& GFitsImageByte::operator= (const GFitsImageByte& image) | |
| 232 | +GFitsImageByte& GFitsImageByte::operator=(const GFitsImageByte& image) | |
| 231 | 233 | { |
| 232 | 234 | // Execute only if object is not identical |
| 233 | 235 | if (this != &image) { |
| ... | ... | @@ -259,7 +261,7 @@ GFitsImageByte& GFitsImageByte::operator= (const GFitsImageByte& image) |
| 259 | 261 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 262 | * Use the at(ix) method if range checking is required. |
| 261 | 263 | ***************************************************************************/ |
| 262 | -unsigned char& GFitsImageByte::operator() (const int& ix) | |
| 264 | +unsigned char& GFitsImageByte::operator()(const int& ix) | |
| 263 | 265 | { |
| 264 | 266 | // If image pixels are not available then fetch them now |
| 265 | 267 | load_data(); |
| ... | ... | @@ -279,7 +281,7 @@ unsigned char& GFitsImageByte::operator() (const int& ix) |
| 279 | 281 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 282 | * checking and image dimension verification is required. |
| 281 | 283 | ***************************************************************************/ |
| 282 | -unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy) | |
| 284 | +unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy) | |
| 283 | 285 | { |
| 284 | 286 | // If image pixels are not available then allocate them now |
| 285 | 287 | load_data(); |
| ... | ... | @@ -303,8 +305,8 @@ unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy) |
| 303 | 305 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 306 | * checking and image dimension verification is required. |
| 305 | 307 | ***************************************************************************/ |
| 306 | -unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, | |
| 307 | - const int& iz) | |
| 308 | +unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy, | |
| 309 | + const int& iz) | |
| 308 | 310 | { |
| 309 | 311 | // If image pixels are not available then allocate them now |
| 310 | 312 | load_data(); |
| ... | ... | @@ -329,8 +331,8 @@ unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, |
| 329 | 331 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 330 | 332 | * checking and image dimension verification is required. |
| 331 | 333 | ***************************************************************************/ |
| 332 | -unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, | |
| 333 | - const int& iz, const int& it) | |
| 334 | +unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy, | |
| 335 | + const int& iz, const int& it) | |
| 334 | 336 | { |
| 335 | 337 | // If image pixels are not available then allocate them now |
| 336 | 338 | load_data(); |
| ... | ... | @@ -351,7 +353,7 @@ unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, |
| 351 | 353 | * Provides access to an image pixel. No range checking is performed. |
| 352 | 354 | * Use the at(ix) method if range checking is required. |
| 353 | 355 | ***************************************************************************/ |
| 354 | -const unsigned char& GFitsImageByte::operator() (const int& ix) const | |
| 356 | +const unsigned char& GFitsImageByte::operator()(const int& ix) const | |
| 355 | 357 | { |
| 356 | 358 | // If image pixels are not available then fetch them now |
| 357 | 359 | load_data(); |
| ... | ... | @@ -371,7 +373,7 @@ const unsigned char& GFitsImageByte::operator() (const int& ix) const |
| 371 | 373 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 372 | 374 | * checking and image dimension verification is required. |
| 373 | 375 | ***************************************************************************/ |
| 374 | -const unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy) const | |
| 376 | +const unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy) const | |
| 375 | 377 | { |
| 376 | 378 | // If image pixels are not available then allocate them now |
| 377 | 379 | load_data(); |
| ... | ... | @@ -395,8 +397,8 @@ const unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy) c |
| 395 | 397 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 396 | 398 | * checking and image dimension verification is required. |
| 397 | 399 | ***************************************************************************/ |
| 398 | -const unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, | |
| 399 | - const int& iz) const | |
| 400 | +const unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy, | |
| 401 | + const int& iz) const | |
| 400 | 402 | { |
| 401 | 403 | // If image pixels are not available then allocate them now |
| 402 | 404 | load_data(); |
| ... | ... | @@ -421,8 +423,8 @@ const unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, |
| 421 | 423 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 422 | 424 | * checking and image dimension verification is required. |
| 423 | 425 | ***************************************************************************/ |
| 424 | -const unsigned char& GFitsImageByte::operator() (const int& ix, const int& iy, | |
| 425 | - const int& iz, const int& it) const | |
| 426 | +const unsigned char& GFitsImageByte::operator()(const int& ix, const int& iy, | |
| 427 | + const int& iz, const int& it) const | |
| 426 | 428 | { |
| 427 | 429 | // If image pixels are not available then allocate them now |
| 428 | 430 | load_data(); | ... | ... |
src/fits/GFitsImageDouble.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageDouble.cpp - FITS double precision image class * | |
| 2 | + * GFitsImageDouble.cpp - Double precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2008-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2008-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageDouble.cpp |
| 23 | - * @brief FITS double precision image class implementation | |
| 23 | + * @brief Double precision FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageDouble.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageDouble::GFitsImageDouble(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageDouble::GFitsImageDouble(int nx, const double* pixels) : | |
| 73 | +GFitsImageDouble::GFitsImageDouble(const int& nx, const double* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageDouble::GFitsImageDouble(int nx, const double* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageDouble::GFitsImageDouble(int nx, int ny, const double* pixels) : | |
| 96 | +GFitsImageDouble::GFitsImageDouble(const int& nx, const int& ny, | |
| 97 | + const double* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,7 @@ GFitsImageDouble::GFitsImageDouble(int nx, int ny, const double* pixels) : |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageDouble::GFitsImageDouble(int nx, int ny, int nz, | |
| 121 | +GFitsImageDouble::GFitsImageDouble(const int& nx, const int& ny, const int& nz, | |
| 122 | 122 | const double* pixels) : |
| 123 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 124 | { |
| ... | ... | @@ -144,8 +144,8 @@ GFitsImageDouble::GFitsImageDouble(int nx, int ny, int nz, |
| 144 | 144 | * |
| 145 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 146 | ***************************************************************************/ |
| 147 | -GFitsImageDouble::GFitsImageDouble(int nx, int ny, int nz, int nt, | |
| 148 | - const double* pixels) : | |
| 147 | +GFitsImageDouble::GFitsImageDouble(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, const double* pixels) : | |
| 149 | 149 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 150 | { |
| 151 | 151 | // Initialise class members for clean destruction |
| ... | ... | @@ -170,7 +170,8 @@ GFitsImageDouble::GFitsImageDouble(int nx, int ny, int nz, int nt, |
| 170 | 170 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 171 | * not allocate any memory for the actual image. |
| 172 | 172 | ***************************************************************************/ |
| 173 | -GFitsImageDouble::GFitsImageDouble(int naxis, const int* naxes, const double* pixels) : | |
| 173 | +GFitsImageDouble::GFitsImageDouble(const int& naxis, const int* naxes, | |
| 174 | + const double* pixels) : | |
| 174 | 175 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 176 | { |
| 176 | 177 | // Initialise class members for clean destruction |
| ... | ... | @@ -227,7 +228,7 @@ GFitsImageDouble::~GFitsImageDouble(void) |
| 227 | 228 | * |
| 228 | 229 | * @param[in] image FITS image. |
| 229 | 230 | ***************************************************************************/ |
| 230 | -GFitsImageDouble& GFitsImageDouble::operator= (const GFitsImageDouble& image) | |
| 231 | +GFitsImageDouble& GFitsImageDouble::operator=(const GFitsImageDouble& image) | |
| 231 | 232 | { |
| 232 | 233 | // Execute only if object is not identical |
| 233 | 234 | if (this != &image) { |
| ... | ... | @@ -259,7 +260,7 @@ GFitsImageDouble& GFitsImageDouble::operator= (const GFitsImageDouble& image) |
| 259 | 260 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 261 | * Use the at(ix) method if range checking is required. |
| 261 | 262 | ***************************************************************************/ |
| 262 | -double& GFitsImageDouble::operator() (const int& ix) | |
| 263 | +double& GFitsImageDouble::operator()(const int& ix) | |
| 263 | 264 | { |
| 264 | 265 | // If image pixels are not available then fetch them now |
| 265 | 266 | load_data(); |
| ... | ... | @@ -279,7 +280,7 @@ double& GFitsImageDouble::operator() (const int& ix) |
| 279 | 280 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 281 | * checking and image dimension verification is required. |
| 281 | 282 | ***************************************************************************/ |
| 282 | -double& GFitsImageDouble::operator() (const int& ix, const int& iy) | |
| 283 | +double& GFitsImageDouble::operator()(const int& ix, const int& iy) | |
| 283 | 284 | { |
| 284 | 285 | // If image pixels are not available then allocate them now |
| 285 | 286 | load_data(); |
| ... | ... | @@ -303,8 +304,8 @@ double& GFitsImageDouble::operator() (const int& ix, const int& iy) |
| 303 | 304 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 305 | * checking and image dimension verification is required. |
| 305 | 306 | ***************************************************************************/ |
| 306 | -double& GFitsImageDouble::operator() (const int& ix, const int& iy, | |
| 307 | - const int& iz) | |
| 307 | +double& GFitsImageDouble::operator()(const int& ix, const int& iy, | |
| 308 | + const int& iz) | |
| 308 | 309 | { |
| 309 | 310 | // If image pixels are not available then allocate them now |
| 310 | 311 | load_data(); |
| ... | ... | @@ -329,8 +330,8 @@ double& GFitsImageDouble::operator() (const int& ix, const int& iy, |
| 329 | 330 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 330 | 331 | * checking and image dimension verification is required. |
| 331 | 332 | ***************************************************************************/ |
| 332 | -double& GFitsImageDouble::operator() (const int& ix, const int& iy, | |
| 333 | - const int& iz, const int& it) | |
| 333 | +double& GFitsImageDouble::operator()(const int& ix, const int& iy, | |
| 334 | + const int& iz, const int& it) | |
| 334 | 335 | { |
| 335 | 336 | // If image pixels are not available then allocate them now |
| 336 | 337 | load_data(); |
| ... | ... | @@ -351,7 +352,7 @@ double& GFitsImageDouble::operator() (const int& ix, const int& iy, |
| 351 | 352 | * Provides access to an image pixel. No range checking is performed. |
| 352 | 353 | * Use the at(ix) method if range checking is required. |
| 353 | 354 | ***************************************************************************/ |
| 354 | -const double& GFitsImageDouble::operator() (const int& ix) const | |
| 355 | +const double& GFitsImageDouble::operator()(const int& ix) const | |
| 355 | 356 | { |
| 356 | 357 | // If image pixels are not available then fetch them now |
| 357 | 358 | load_data(); |
| ... | ... | @@ -371,7 +372,7 @@ const double& GFitsImageDouble::operator() (const int& ix) const |
| 371 | 372 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 372 | 373 | * checking and image dimension verification is required. |
| 373 | 374 | ***************************************************************************/ |
| 374 | -const double& GFitsImageDouble::operator() (const int& ix, const int& iy) const | |
| 375 | +const double& GFitsImageDouble::operator()(const int& ix, const int& iy) const | |
| 375 | 376 | { |
| 376 | 377 | // If image pixels are not available then allocate them now |
| 377 | 378 | load_data(); |
| ... | ... | @@ -395,8 +396,8 @@ const double& GFitsImageDouble::operator() (const int& ix, const int& iy) const |
| 395 | 396 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 396 | 397 | * checking and image dimension verification is required. |
| 397 | 398 | ***************************************************************************/ |
| 398 | -const double& GFitsImageDouble::operator() (const int& ix, const int& iy, | |
| 399 | - const int& iz) const | |
| 399 | +const double& GFitsImageDouble::operator()(const int& ix, const int& iy, | |
| 400 | + const int& iz) const | |
| 400 | 401 | { |
| 401 | 402 | // If image pixels are not available then allocate them now |
| 402 | 403 | load_data(); |
| ... | ... | @@ -421,8 +422,8 @@ const double& GFitsImageDouble::operator() (const int& ix, const int& iy, |
| 421 | 422 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 422 | 423 | * checking and image dimension verification is required. |
| 423 | 424 | ***************************************************************************/ |
| 424 | -const double& GFitsImageDouble::operator() (const int& ix, const int& iy, | |
| 425 | - const int& iz, const int& it) const | |
| 425 | +const double& GFitsImageDouble::operator()(const int& ix, const int& iy, | |
| 426 | + const int& iz, const int& it) const | |
| 426 | 427 | { |
| 427 | 428 | // If image pixels are not available then allocate them now |
| 428 | 429 | load_data(); |
| ... | ... | @@ -924,10 +925,3 @@ void GFitsImageDouble::alloc_nulval(const void* value) |
| 924 | 925 | // Return |
| 925 | 926 | return; |
| 926 | 927 | } |
| 927 | - | |
| 928 | - | |
| 929 | -/*========================================================================== | |
| 930 | - = = | |
| 931 | - = Friends = | |
| 932 | - = = | |
| 933 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageFloat.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageFloat.cpp - FITS single precision image class * | |
| 2 | + * GFitsImageFloat.cpp - Single precision FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageFloat.cpp |
| 23 | - * @brief FITS single precision image class implementation | |
| 23 | + * @brief Single precision FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageFloat.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageFloat::GFitsImageFloat(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageFloat::GFitsImageFloat(int nx, const float* pixels) : | |
| 73 | +GFitsImageFloat::GFitsImageFloat(const int& nx, const float* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageFloat::GFitsImageFloat(int nx, const float* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageFloat::GFitsImageFloat(int nx, int ny, const float* pixels) : | |
| 96 | +GFitsImageFloat::GFitsImageFloat(const int& nx, const int& ny, | |
| 97 | + const float* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,7 @@ GFitsImageFloat::GFitsImageFloat(int nx, int ny, const float* pixels) : |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageFloat::GFitsImageFloat(int nx, int ny, int nz, | |
| 121 | +GFitsImageFloat::GFitsImageFloat(const int& nx, const int& ny, const int& nz, | |
| 122 | 122 | const float* pixels) : |
| 123 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 124 | { |
| ... | ... | @@ -144,8 +144,8 @@ GFitsImageFloat::GFitsImageFloat(int nx, int ny, int nz, |
| 144 | 144 | * |
| 145 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 146 | ***************************************************************************/ |
| 147 | -GFitsImageFloat::GFitsImageFloat(int nx, int ny, int nz, int nt, | |
| 148 | - const float* pixels) : | |
| 147 | +GFitsImageFloat::GFitsImageFloat(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, const float* pixels) : | |
| 149 | 149 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 150 | { |
| 151 | 151 | // Initialise class members for clean destruction |
| ... | ... | @@ -170,7 +170,8 @@ GFitsImageFloat::GFitsImageFloat(int nx, int ny, int nz, int nt, |
| 170 | 170 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 171 | * not allocate any memory for the actual image. |
| 172 | 172 | ***************************************************************************/ |
| 173 | -GFitsImageFloat::GFitsImageFloat(int naxis, const int* naxes, const float* pixels) : | |
| 173 | +GFitsImageFloat::GFitsImageFloat(const int& naxis, const int* naxes, | |
| 174 | + const float* pixels) : | |
| 174 | 175 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 176 | { |
| 176 | 177 | // Initialise class members for clean destruction |
| ... | ... | @@ -227,7 +228,7 @@ GFitsImageFloat::~GFitsImageFloat(void) |
| 227 | 228 | * |
| 228 | 229 | * @param[in] image FITS image. |
| 229 | 230 | ***************************************************************************/ |
| 230 | -GFitsImageFloat& GFitsImageFloat::operator= (const GFitsImageFloat& image) | |
| 231 | +GFitsImageFloat& GFitsImageFloat::operator=(const GFitsImageFloat& image) | |
| 231 | 232 | { |
| 232 | 233 | // Execute only if object is not identical |
| 233 | 234 | if (this != &image) { |
| ... | ... | @@ -259,7 +260,7 @@ GFitsImageFloat& GFitsImageFloat::operator= (const GFitsImageFloat& image) |
| 259 | 260 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 261 | * Use the at(ix) method if range checking is required. |
| 261 | 262 | ***************************************************************************/ |
| 262 | -float& GFitsImageFloat::operator() (const int& ix) | |
| 263 | +float& GFitsImageFloat::operator()(const int& ix) | |
| 263 | 264 | { |
| 264 | 265 | // Load data |
| 265 | 266 | load_data(); |
| ... | ... | @@ -279,7 +280,7 @@ float& GFitsImageFloat::operator() (const int& ix) |
| 279 | 280 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 281 | * checking and image dimension verification is required. |
| 281 | 282 | ***************************************************************************/ |
| 282 | -float& GFitsImageFloat::operator() (const int& ix, const int& iy) | |
| 283 | +float& GFitsImageFloat::operator()(const int& ix, const int& iy) | |
| 283 | 284 | { |
| 284 | 285 | // Load data |
| 285 | 286 | load_data(); |
| ... | ... | @@ -303,8 +304,8 @@ float& GFitsImageFloat::operator() (const int& ix, const int& iy) |
| 303 | 304 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 305 | * checking and image dimension verification is required. |
| 305 | 306 | ***************************************************************************/ |
| 306 | -float& GFitsImageFloat::operator() (const int& ix, const int& iy, | |
| 307 | - const int& iz) | |
| 307 | +float& GFitsImageFloat::operator()(const int& ix, const int& iy, | |
| 308 | + const int& iz) | |
| 308 | 309 | { |
| 309 | 310 | // Load data |
| 310 | 311 | load_data(); |
| ... | ... | @@ -329,8 +330,8 @@ float& GFitsImageFloat::operator() (const int& ix, const int& iy, |
| 329 | 330 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 330 | 331 | * checking and image dimension verification is required. |
| 331 | 332 | ***************************************************************************/ |
| 332 | -float& GFitsImageFloat::operator() (const int& ix, const int& iy, | |
| 333 | - const int& iz, const int& it) | |
| 333 | +float& GFitsImageFloat::operator()(const int& ix, const int& iy, | |
| 334 | + const int& iz, const int& it) | |
| 334 | 335 | { |
| 335 | 336 | // Load data |
| 336 | 337 | load_data(); |
| ... | ... | @@ -351,7 +352,7 @@ float& GFitsImageFloat::operator() (const int& ix, const int& iy, |
| 351 | 352 | * Provides access to an image pixel. No range checking is performed. |
| 352 | 353 | * Use the at(ix) method if range checking is required. |
| 353 | 354 | ***************************************************************************/ |
| 354 | -const float& GFitsImageFloat::operator() (const int& ix) const | |
| 355 | +const float& GFitsImageFloat::operator()(const int& ix) const | |
| 355 | 356 | { |
| 356 | 357 | // Load data |
| 357 | 358 | load_data(); |
| ... | ... | @@ -371,7 +372,7 @@ const float& GFitsImageFloat::operator() (const int& ix) const |
| 371 | 372 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 372 | 373 | * checking and image dimension verification is required. |
| 373 | 374 | ***************************************************************************/ |
| 374 | -const float& GFitsImageFloat::operator() (const int& ix, const int& iy) const | |
| 375 | +const float& GFitsImageFloat::operator()(const int& ix, const int& iy) const | |
| 375 | 376 | { |
| 376 | 377 | // Load data |
| 377 | 378 | load_data(); |
| ... | ... | @@ -395,8 +396,8 @@ const float& GFitsImageFloat::operator() (const int& ix, const int& iy) const |
| 395 | 396 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 396 | 397 | * checking and image dimension verification is required. |
| 397 | 398 | ***************************************************************************/ |
| 398 | -const float& GFitsImageFloat::operator() (const int& ix, const int& iy, | |
| 399 | - const int& iz) const | |
| 399 | +const float& GFitsImageFloat::operator()(const int& ix, const int& iy, | |
| 400 | + const int& iz) const | |
| 400 | 401 | { |
| 401 | 402 | // Load data |
| 402 | 403 | load_data(); |
| ... | ... | @@ -421,8 +422,8 @@ const float& GFitsImageFloat::operator() (const int& ix, const int& iy, |
| 421 | 422 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 422 | 423 | * checking and image dimension verification is required. |
| 423 | 424 | ***************************************************************************/ |
| 424 | -const float& GFitsImageFloat::operator() (const int& ix, const int& iy, | |
| 425 | - const int& iz, const int& it) const | |
| 425 | +const float& GFitsImageFloat::operator()(const int& ix, const int& iy, | |
| 426 | + const int& iz, const int& it) const | |
| 426 | 427 | { |
| 427 | 428 | // Load data |
| 428 | 429 | load_data(); |
| ... | ... | @@ -924,10 +925,3 @@ void GFitsImageFloat::alloc_nulval(const void* value) |
| 924 | 925 | // Return |
| 925 | 926 | return; |
| 926 | 927 | } |
| 927 | - | |
| 928 | - | |
| 929 | -/*========================================================================== | |
| 930 | - = = | |
| 931 | - = Friends = | |
| 932 | - = = | |
| 933 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageLong.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLong.cpp - FITS long integer image class * | |
| 2 | + * GFitsImageLong.cpp - Long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLong.cpp |
| 23 | - * @brief FITS long integer image class implementation | |
| 23 | + * @brief Long integer FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageLong.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageLong::GFitsImageLong(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageLong::GFitsImageLong(int nx, const long* pixels) : | |
| 73 | +GFitsImageLong::GFitsImageLong(const int& nx, const long* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,7 @@ GFitsImageLong::GFitsImageLong(int nx, const long* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageLong::GFitsImageLong(int nx, int ny, const long* pixels) : | |
| 96 | +GFitsImageLong::GFitsImageLong(const int& nx, const int& ny, const long* pixels) : | |
| 98 | 97 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 98 | { |
| 100 | 99 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +117,7 @@ GFitsImageLong::GFitsImageLong(int nx, int ny, const long* pixels) : |
| 118 | 117 | * |
| 119 | 118 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 119 | ***************************************************************************/ |
| 121 | -GFitsImageLong::GFitsImageLong(int nx, int ny, int nz, | |
| 120 | +GFitsImageLong::GFitsImageLong(const int& nx, const int& ny, const int& nz, | |
| 122 | 121 | const long* pixels) : |
| 123 | 122 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 123 | { |
| ... | ... | @@ -144,8 +143,8 @@ GFitsImageLong::GFitsImageLong(int nx, int ny, int nz, |
| 144 | 143 | * |
| 145 | 144 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 145 | ***************************************************************************/ |
| 147 | -GFitsImageLong::GFitsImageLong(int nx, int ny, int nz, int nt, | |
| 148 | - const long* pixels) : | |
| 146 | +GFitsImageLong::GFitsImageLong(const int& nx, const int& ny, const int& nz, | |
| 147 | + const int& nt, const long* pixels) : | |
| 149 | 148 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 149 | { |
| 151 | 150 | // Initialise class members for clean destruction |
| ... | ... | @@ -170,7 +169,8 @@ GFitsImageLong::GFitsImageLong(int nx, int ny, int nz, int nt, |
| 170 | 169 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 170 | * not allocate any memory for the actual image. |
| 172 | 171 | ***************************************************************************/ |
| 173 | -GFitsImageLong::GFitsImageLong(int naxis, const int* naxes, const long* pixels) : | |
| 172 | +GFitsImageLong::GFitsImageLong(const int& naxis, const int* naxes, | |
| 173 | + const long* pixels) : | |
| 174 | 174 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 175 | { |
| 176 | 176 | // Initialise class members for clean destruction |
| ... | ... | @@ -227,7 +227,7 @@ GFitsImageLong::~GFitsImageLong(void) |
| 227 | 227 | * |
| 228 | 228 | * @param[in] image FITS image. |
| 229 | 229 | ***************************************************************************/ |
| 230 | -GFitsImageLong& GFitsImageLong::operator= (const GFitsImageLong& image) | |
| 230 | +GFitsImageLong& GFitsImageLong::operator=(const GFitsImageLong& image) | |
| 231 | 231 | { |
| 232 | 232 | // Execute only if object is not identical |
| 233 | 233 | if (this != &image) { |
| ... | ... | @@ -259,7 +259,7 @@ GFitsImageLong& GFitsImageLong::operator= (const GFitsImageLong& image) |
| 259 | 259 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 260 | * Use the at(ix) method if range checking is required. |
| 261 | 261 | ***************************************************************************/ |
| 262 | -long& GFitsImageLong::operator() (const int& ix) | |
| 262 | +long& GFitsImageLong::operator()(const int& ix) | |
| 263 | 263 | { |
| 264 | 264 | // Load data |
| 265 | 265 | load_data(); |
| ... | ... | @@ -279,7 +279,7 @@ long& GFitsImageLong::operator() (const int& ix) |
| 279 | 279 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 280 | * checking and image dimension verification is required. |
| 281 | 281 | ***************************************************************************/ |
| 282 | -long& GFitsImageLong::operator() (const int& ix, const int& iy) | |
| 282 | +long& GFitsImageLong::operator()(const int& ix, const int& iy) | |
| 283 | 283 | { |
| 284 | 284 | // Load data |
| 285 | 285 | load_data(); |
| ... | ... | @@ -303,7 +303,7 @@ long& GFitsImageLong::operator() (const int& ix, const int& iy) |
| 303 | 303 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 304 | * checking and image dimension verification is required. |
| 305 | 305 | ***************************************************************************/ |
| 306 | -long& GFitsImageLong::operator() (const int& ix, const int& iy, const int& iz) | |
| 306 | +long& GFitsImageLong::operator()(const int& ix, const int& iy, const int& iz) | |
| 307 | 307 | { |
| 308 | 308 | // Load data |
| 309 | 309 | load_data(); |
| ... | ... | @@ -328,8 +328,8 @@ long& GFitsImageLong::operator() (const int& ix, const int& iy, const int& iz) |
| 328 | 328 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 329 | 329 | * checking and image dimension verification is required. |
| 330 | 330 | ***************************************************************************/ |
| 331 | -long& GFitsImageLong::operator() (const int& ix, const int& iy, | |
| 332 | - const int& iz, const int& it) | |
| 331 | +long& GFitsImageLong::operator()(const int& ix, const int& iy, | |
| 332 | + const int& iz, const int& it) | |
| 333 | 333 | { |
| 334 | 334 | // Load data |
| 335 | 335 | load_data(); |
| ... | ... | @@ -350,7 +350,7 @@ long& GFitsImageLong::operator() (const int& ix, const int& iy, |
| 350 | 350 | * Provides access to an image pixel. No range checking is performed. |
| 351 | 351 | * Use the at(ix) method if range checking is required. |
| 352 | 352 | ***************************************************************************/ |
| 353 | -const long& GFitsImageLong::operator() (const int& ix) const | |
| 353 | +const long& GFitsImageLong::operator()(const int& ix) const | |
| 354 | 354 | { |
| 355 | 355 | // Load data |
| 356 | 356 | load_data(); |
| ... | ... | @@ -370,7 +370,7 @@ const long& GFitsImageLong::operator() (const int& ix) const |
| 370 | 370 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 371 | 371 | * checking and image dimension verification is required. |
| 372 | 372 | ***************************************************************************/ |
| 373 | -const long& GFitsImageLong::operator() (const int& ix, const int& iy) const | |
| 373 | +const long& GFitsImageLong::operator()(const int& ix, const int& iy) const | |
| 374 | 374 | { |
| 375 | 375 | // Load data |
| 376 | 376 | load_data(); |
| ... | ... | @@ -394,8 +394,8 @@ const long& GFitsImageLong::operator() (const int& ix, const int& iy) const |
| 394 | 394 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 395 | 395 | * checking and image dimension verification is required. |
| 396 | 396 | ***************************************************************************/ |
| 397 | -const long& GFitsImageLong::operator() (const int& ix, const int& iy, | |
| 398 | - const int& iz) const | |
| 397 | +const long& GFitsImageLong::operator()(const int& ix, const int& iy, | |
| 398 | + const int& iz) const | |
| 399 | 399 | { |
| 400 | 400 | // Load data |
| 401 | 401 | load_data(); |
| ... | ... | @@ -420,8 +420,8 @@ const long& GFitsImageLong::operator() (const int& ix, const int& iy, |
| 420 | 420 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 421 | 421 | * checking and image dimension verification is required. |
| 422 | 422 | ***************************************************************************/ |
| 423 | -const long& GFitsImageLong::operator() (const int& ix, const int& iy, | |
| 424 | - const int& iz, const int& it) const | |
| 423 | +const long& GFitsImageLong::operator()(const int& ix, const int& iy, | |
| 424 | + const int& iz, const int& it) const | |
| 425 | 425 | { |
| 426 | 426 | // Load data |
| 427 | 427 | load_data(); |
| ... | ... | @@ -923,10 +923,3 @@ void GFitsImageLong::alloc_nulval(const void* value) |
| 923 | 923 | // Return |
| 924 | 924 | return; |
| 925 | 925 | } |
| 926 | - | |
| 927 | - | |
| 928 | -/*========================================================================== | |
| 929 | - = = | |
| 930 | - = Friends = | |
| 931 | - = = | |
| 932 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageLongLong.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageLongLong.cpp - FITS long long image class * | |
| 2 | + * GFitsImageLongLong.cpp - Long long integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageLongLong.cpp |
| 23 | - * @brief FITS long long integer image class implementation | |
| 23 | + * @brief Long long integer FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageLongLong.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageLongLong::GFitsImageLongLong(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageLongLong::GFitsImageLongLong(int nx, const long long* pixels) : | |
| 73 | +GFitsImageLongLong::GFitsImageLongLong(const int& nx, const long long* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageLongLong::GFitsImageLongLong(int nx, const long long* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, const long long* pixels) : | |
| 96 | +GFitsImageLongLong::GFitsImageLongLong(const int& nx, const int& ny, | |
| 97 | + const long long* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,8 @@ GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, const long long* pixels) |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, int nz, | |
| 121 | +GFitsImageLongLong::GFitsImageLongLong(const int& nx, const int& ny, | |
| 122 | + const int& nz, | |
| 122 | 123 | const long long* pixels) : |
| 123 | 124 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 125 | { |
| ... | ... | @@ -144,7 +145,8 @@ GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, int nz, |
| 144 | 145 | * |
| 145 | 146 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 147 | ***************************************************************************/ |
| 147 | -GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, int nz, int nt, | |
| 148 | +GFitsImageLongLong::GFitsImageLongLong(const int& nx, const int& ny, | |
| 149 | + const int& nz, const int& nt, | |
| 148 | 150 | const long long* pixels) : |
| 149 | 151 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 152 | { |
| ... | ... | @@ -170,7 +172,7 @@ GFitsImageLongLong::GFitsImageLongLong(int nx, int ny, int nz, int nt, |
| 170 | 172 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 173 | * not allocate any memory for the actual image. |
| 172 | 174 | ***************************************************************************/ |
| 173 | -GFitsImageLongLong::GFitsImageLongLong(int naxis, const int* naxes, | |
| 175 | +GFitsImageLongLong::GFitsImageLongLong(const int& naxis, const int* naxes, | |
| 174 | 176 | const long long* pixels) : |
| 175 | 177 | GFitsImage(G_BITPIX, naxis, naxes) |
| 176 | 178 | { |
| ... | ... | @@ -228,7 +230,7 @@ GFitsImageLongLong::~GFitsImageLongLong(void) |
| 228 | 230 | * |
| 229 | 231 | * @param[in] image FITS image. |
| 230 | 232 | ***************************************************************************/ |
| 231 | -GFitsImageLongLong& GFitsImageLongLong::operator= (const GFitsImageLongLong& image) | |
| 233 | +GFitsImageLongLong& GFitsImageLongLong::operator=(const GFitsImageLongLong& image) | |
| 232 | 234 | { |
| 233 | 235 | // Execute only if object is not identical |
| 234 | 236 | if (this != &image) { |
| ... | ... | @@ -260,7 +262,7 @@ GFitsImageLongLong& GFitsImageLongLong::operator= (const GFitsImageLongLong& ima |
| 260 | 262 | * Provides access to an image pixel. No range checking is performed. |
| 261 | 263 | * Use the at(ix) method if range checking is required. |
| 262 | 264 | ***************************************************************************/ |
| 263 | -long long& GFitsImageLongLong::operator() (const int& ix) | |
| 265 | +long long& GFitsImageLongLong::operator()(const int& ix) | |
| 264 | 266 | { |
| 265 | 267 | // Load data |
| 266 | 268 | load_data(); |
| ... | ... | @@ -280,7 +282,7 @@ long long& GFitsImageLongLong::operator() (const int& ix) |
| 280 | 282 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 281 | 283 | * checking and image dimension verification is required. |
| 282 | 284 | ***************************************************************************/ |
| 283 | -long long& GFitsImageLongLong::operator() (const int& ix, const int& iy) | |
| 285 | +long long& GFitsImageLongLong::operator()(const int& ix, const int& iy) | |
| 284 | 286 | { |
| 285 | 287 | // Load data |
| 286 | 288 | load_data(); |
| ... | ... | @@ -304,8 +306,8 @@ long long& GFitsImageLongLong::operator() (const int& ix, const int& iy) |
| 304 | 306 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 305 | 307 | * checking and image dimension verification is required. |
| 306 | 308 | ***************************************************************************/ |
| 307 | -long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, | |
| 308 | - const int& iz) | |
| 309 | +long long& GFitsImageLongLong::operator()(const int& ix, const int& iy, | |
| 310 | + const int& iz) | |
| 309 | 311 | { |
| 310 | 312 | // Load data |
| 311 | 313 | load_data(); |
| ... | ... | @@ -330,8 +332,8 @@ long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, |
| 330 | 332 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 331 | 333 | * checking and image dimension verification is required. |
| 332 | 334 | ***************************************************************************/ |
| 333 | -long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, | |
| 334 | - const int& iz, const int& it) | |
| 335 | +long long& GFitsImageLongLong::operator()(const int& ix, const int& iy, | |
| 336 | + const int& iz, const int& it) | |
| 335 | 337 | { |
| 336 | 338 | // Load data |
| 337 | 339 | load_data(); |
| ... | ... | @@ -352,7 +354,7 @@ long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, |
| 352 | 354 | * Provides access to an image pixel. No range checking is performed. |
| 353 | 355 | * Use the at(ix) method if range checking is required. |
| 354 | 356 | ***************************************************************************/ |
| 355 | -const long long& GFitsImageLongLong::operator() (const int& ix) const | |
| 357 | +const long long& GFitsImageLongLong::operator()(const int& ix) const | |
| 356 | 358 | { |
| 357 | 359 | // Load data |
| 358 | 360 | load_data(); |
| ... | ... | @@ -372,7 +374,7 @@ const long long& GFitsImageLongLong::operator() (const int& ix) const |
| 372 | 374 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 373 | 375 | * checking and image dimension verification is required. |
| 374 | 376 | ***************************************************************************/ |
| 375 | -const long long& GFitsImageLongLong::operator() (const int& ix, const int& iy) const | |
| 377 | +const long long& GFitsImageLongLong::operator()(const int& ix, const int& iy) const | |
| 376 | 378 | { |
| 377 | 379 | // Load data |
| 378 | 380 | load_data(); |
| ... | ... | @@ -396,8 +398,8 @@ const long long& GFitsImageLongLong::operator() (const int& ix, const int& iy) c |
| 396 | 398 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 397 | 399 | * checking and image dimension verification is required. |
| 398 | 400 | ***************************************************************************/ |
| 399 | -const long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, | |
| 400 | - const int& iz) const | |
| 401 | +const long long& GFitsImageLongLong::operator()(const int& ix, const int& iy, | |
| 402 | + const int& iz) const | |
| 401 | 403 | { |
| 402 | 404 | // Load data |
| 403 | 405 | load_data(); |
| ... | ... | @@ -422,8 +424,8 @@ const long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, |
| 422 | 424 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 423 | 425 | * checking and image dimension verification is required. |
| 424 | 426 | ***************************************************************************/ |
| 425 | -const long long& GFitsImageLongLong::operator() (const int& ix, const int& iy, | |
| 426 | - const int& iz, const int& it) const | |
| 427 | +const long long& GFitsImageLongLong::operator()(const int& ix, const int& iy, | |
| 428 | + const int& iz, const int& it) const | |
| 427 | 429 | { |
| 428 | 430 | // Load data |
| 429 | 431 | load_data(); |
| ... | ... | @@ -925,10 +927,3 @@ void GFitsImageLongLong::alloc_nulval(const void* value) |
| 925 | 927 | // Return |
| 926 | 928 | return; |
| 927 | 929 | } |
| 928 | - | |
| 929 | - | |
| 930 | -/*========================================================================== | |
| 931 | - = = | |
| 932 | - = Friends = | |
| 933 | - = = | |
| 934 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageSByte.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageSByte.cpp - FITS signed Byte image class * | |
| 2 | + * GFitsImageSByte.cpp - Signed Byte FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageSByte.cpp |
| 23 | - * @brief FITS signed byte image class implementation | |
| 23 | + * @brief Signed Byte FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageSByte.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageSByte::GFitsImageSByte(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageSByte::GFitsImageSByte(int nx, const char* pixels) : | |
| 73 | +GFitsImageSByte::GFitsImageSByte(const int& nx, const char* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageSByte::GFitsImageSByte(int nx, const char* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageSByte::GFitsImageSByte(int nx, int ny, const char* pixels) : | |
| 96 | +GFitsImageSByte::GFitsImageSByte(const int& nx, const int& ny, | |
| 97 | + const char* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,8 @@ GFitsImageSByte::GFitsImageSByte(int nx, int ny, const char* pixels) : |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageSByte::GFitsImageSByte(int nx, int ny, int nz, const char* pixels) : | |
| 121 | +GFitsImageSByte::GFitsImageSByte(const int& nx, const int& ny, const int& nz, | |
| 122 | + const char* pixels) : | |
| 122 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 123 | 124 | { |
| 124 | 125 | // Initialise class members for clean destruction |
| ... | ... | @@ -143,7 +144,8 @@ GFitsImageSByte::GFitsImageSByte(int nx, int ny, int nz, const char* pixels) : |
| 143 | 144 | * |
| 144 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 145 | 146 | ***************************************************************************/ |
| 146 | -GFitsImageSByte::GFitsImageSByte(int nx, int ny, int nz, int nt, | |
| 147 | +GFitsImageSByte::GFitsImageSByte(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, | |
| 147 | 149 | const char* pixels) : |
| 148 | 150 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 149 | 151 | { |
| ... | ... | @@ -169,7 +171,7 @@ GFitsImageSByte::GFitsImageSByte(int nx, int ny, int nz, int nt, |
| 169 | 171 | * the number of pixels in each dimension. Note that this constructor does |
| 170 | 172 | * not allocate any memory for the actual image. |
| 171 | 173 | ***************************************************************************/ |
| 172 | -GFitsImageSByte::GFitsImageSByte(int naxis, const int* naxes, | |
| 174 | +GFitsImageSByte::GFitsImageSByte(const int& naxis, const int* naxes, | |
| 173 | 175 | const char* pixels) : |
| 174 | 176 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 177 | { |
| ... | ... | @@ -227,7 +229,7 @@ GFitsImageSByte::~GFitsImageSByte(void) |
| 227 | 229 | * |
| 228 | 230 | * @param[in] image FITS image. |
| 229 | 231 | ***************************************************************************/ |
| 230 | -GFitsImageSByte& GFitsImageSByte::operator= (const GFitsImageSByte& image) | |
| 232 | +GFitsImageSByte& GFitsImageSByte::operator=(const GFitsImageSByte& image) | |
| 231 | 233 | { |
| 232 | 234 | // Execute only if object is not identical |
| 233 | 235 | if (this != &image) { |
| ... | ... | @@ -259,7 +261,7 @@ GFitsImageSByte& GFitsImageSByte::operator= (const GFitsImageSByte& image) |
| 259 | 261 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 262 | * Use the at(ix) method if range checking is required. |
| 261 | 263 | ***************************************************************************/ |
| 262 | -char& GFitsImageSByte::operator() (const int& ix) | |
| 264 | +char& GFitsImageSByte::operator()(const int& ix) | |
| 263 | 265 | { |
| 264 | 266 | // Load data |
| 265 | 267 | load_data(); |
| ... | ... | @@ -279,7 +281,7 @@ char& GFitsImageSByte::operator() (const int& ix) |
| 279 | 281 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 282 | * checking and image dimension verification is required. |
| 281 | 283 | ***************************************************************************/ |
| 282 | -char& GFitsImageSByte::operator() (const int& ix, const int& iy) | |
| 284 | +char& GFitsImageSByte::operator()(const int& ix, const int& iy) | |
| 283 | 285 | { |
| 284 | 286 | // Load data |
| 285 | 287 | load_data(); |
| ... | ... | @@ -303,7 +305,7 @@ char& GFitsImageSByte::operator() (const int& ix, const int& iy) |
| 303 | 305 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 306 | * checking and image dimension verification is required. |
| 305 | 307 | ***************************************************************************/ |
| 306 | -char& GFitsImageSByte::operator() (const int& ix, const int& iy, const int& iz) | |
| 308 | +char& GFitsImageSByte::operator()(const int& ix, const int& iy, const int& iz) | |
| 307 | 309 | { |
| 308 | 310 | // Load data |
| 309 | 311 | load_data(); |
| ... | ... | @@ -328,8 +330,8 @@ char& GFitsImageSByte::operator() (const int& ix, const int& iy, const int& iz) |
| 328 | 330 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 329 | 331 | * checking and image dimension verification is required. |
| 330 | 332 | ***************************************************************************/ |
| 331 | -char& GFitsImageSByte::operator() (const int& ix, const int& iy, | |
| 332 | - const int& iz, const int& it) | |
| 333 | +char& GFitsImageSByte::operator()(const int& ix, const int& iy, | |
| 334 | + const int& iz, const int& it) | |
| 333 | 335 | { |
| 334 | 336 | // Load data |
| 335 | 337 | load_data(); |
| ... | ... | @@ -350,7 +352,7 @@ char& GFitsImageSByte::operator() (const int& ix, const int& iy, |
| 350 | 352 | * Provides access to an image pixel. No range checking is performed. |
| 351 | 353 | * Use the at(ix) method if range checking is required. |
| 352 | 354 | ***************************************************************************/ |
| 353 | -const char& GFitsImageSByte::operator() (const int& ix) const | |
| 355 | +const char& GFitsImageSByte::operator()(const int& ix) const | |
| 354 | 356 | { |
| 355 | 357 | // Load data |
| 356 | 358 | load_data(); |
| ... | ... | @@ -370,7 +372,7 @@ const char& GFitsImageSByte::operator() (const int& ix) const |
| 370 | 372 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 371 | 373 | * checking and image dimension verification is required. |
| 372 | 374 | ***************************************************************************/ |
| 373 | -const char& GFitsImageSByte::operator() (const int& ix, const int& iy) const | |
| 375 | +const char& GFitsImageSByte::operator()(const int& ix, const int& iy) const | |
| 374 | 376 | { |
| 375 | 377 | // Load data |
| 376 | 378 | load_data(); |
| ... | ... | @@ -394,8 +396,8 @@ const char& GFitsImageSByte::operator() (const int& ix, const int& iy) const |
| 394 | 396 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 395 | 397 | * checking and image dimension verification is required. |
| 396 | 398 | ***************************************************************************/ |
| 397 | -const char& GFitsImageSByte::operator() (const int& ix, const int& iy, | |
| 398 | - const int& iz) const | |
| 399 | +const char& GFitsImageSByte::operator()(const int& ix, const int& iy, | |
| 400 | + const int& iz) const | |
| 399 | 401 | { |
| 400 | 402 | // Load data |
| 401 | 403 | load_data(); |
| ... | ... | @@ -420,8 +422,8 @@ const char& GFitsImageSByte::operator() (const int& ix, const int& iy, |
| 420 | 422 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 421 | 423 | * checking and image dimension verification is required. |
| 422 | 424 | ***************************************************************************/ |
| 423 | -const char& GFitsImageSByte::operator() (const int& ix, const int& iy, | |
| 424 | - const int& iz, const int& it) const | |
| 425 | +const char& GFitsImageSByte::operator()(const int& ix, const int& iy, | |
| 426 | + const int& iz, const int& it) const | |
| 425 | 427 | { |
| 426 | 428 | // Load data |
| 427 | 429 | load_data(); |
| ... | ... | @@ -923,10 +925,3 @@ void GFitsImageSByte::alloc_nulval(const void* value) |
| 923 | 925 | // Return |
| 924 | 926 | return; |
| 925 | 927 | } |
| 926 | - | |
| 927 | - | |
| 928 | -/*========================================================================== | |
| 929 | - = = | |
| 930 | - = Friends = | |
| 931 | - = = | |
| 932 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageShort.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageShort.cpp - FITS short integer image class * | |
| 2 | + * GFitsImageShort.cpp - Short integer FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageShort.cpp |
| 23 | - * @brief FITS short integer image class implementation | |
| 23 | + * @brief Short integer FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageShort.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageShort::GFitsImageShort(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageShort::GFitsImageShort(int nx, const short* pixels) : | |
| 73 | +GFitsImageShort::GFitsImageShort(const int& nx, const short* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageShort::GFitsImageShort(int nx, const short* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageShort::GFitsImageShort(int nx, int ny, const short* pixels) : | |
| 96 | +GFitsImageShort::GFitsImageShort(const int& nx, const int& ny, | |
| 97 | + const short* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,7 @@ GFitsImageShort::GFitsImageShort(int nx, int ny, const short* pixels) : |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageShort::GFitsImageShort(int nx, int ny, int nz, | |
| 121 | +GFitsImageShort::GFitsImageShort(const int& nx, const int& ny, const int& nz, | |
| 122 | 122 | const short* pixels) : |
| 123 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 124 | { |
| ... | ... | @@ -144,8 +144,8 @@ GFitsImageShort::GFitsImageShort(int nx, int ny, int nz, |
| 144 | 144 | * |
| 145 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 146 | ***************************************************************************/ |
| 147 | -GFitsImageShort::GFitsImageShort(int nx, int ny, int nz, int nt, | |
| 148 | - const short* pixels) : | |
| 147 | +GFitsImageShort::GFitsImageShort(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, const short* pixels) : | |
| 149 | 149 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 150 | { |
| 151 | 151 | // Initialise class members for clean destruction |
| ... | ... | @@ -170,7 +170,8 @@ GFitsImageShort::GFitsImageShort(int nx, int ny, int nz, int nt, |
| 170 | 170 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 171 | * not allocate any memory for the actual image. |
| 172 | 172 | ***************************************************************************/ |
| 173 | -GFitsImageShort::GFitsImageShort(int naxis, const int* naxes, const short* pixels) : | |
| 173 | +GFitsImageShort::GFitsImageShort(const int& naxis, const int* naxes, | |
| 174 | + const short* pixels) : | |
| 174 | 175 | GFitsImage(G_BITPIX, naxis, naxes) |
| 175 | 176 | { |
| 176 | 177 | // Initialise class members for clean destruction |
| ... | ... | @@ -227,7 +228,7 @@ GFitsImageShort::~GFitsImageShort(void) |
| 227 | 228 | * |
| 228 | 229 | * @param[in] image FITS image. |
| 229 | 230 | ***************************************************************************/ |
| 230 | -GFitsImageShort& GFitsImageShort::operator= (const GFitsImageShort& image) | |
| 231 | +GFitsImageShort& GFitsImageShort::operator=(const GFitsImageShort& image) | |
| 231 | 232 | { |
| 232 | 233 | // Execute only if object is not identical |
| 233 | 234 | if (this != &image) { |
| ... | ... | @@ -259,7 +260,7 @@ GFitsImageShort& GFitsImageShort::operator= (const GFitsImageShort& image) |
| 259 | 260 | * Provides access to an image pixel. No range checking is performed. |
| 260 | 261 | * Use the at(ix) method if range checking is required. |
| 261 | 262 | ***************************************************************************/ |
| 262 | -short& GFitsImageShort::operator() (const int& ix) | |
| 263 | +short& GFitsImageShort::operator()(const int& ix) | |
| 263 | 264 | { |
| 264 | 265 | // Load data |
| 265 | 266 | load_data(); |
| ... | ... | @@ -279,7 +280,7 @@ short& GFitsImageShort::operator() (const int& ix) |
| 279 | 280 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 280 | 281 | * checking and image dimension verification is required. |
| 281 | 282 | ***************************************************************************/ |
| 282 | -short& GFitsImageShort::operator() (const int& ix, const int& iy) | |
| 283 | +short& GFitsImageShort::operator()(const int& ix, const int& iy) | |
| 283 | 284 | { |
| 284 | 285 | // Load data |
| 285 | 286 | load_data(); |
| ... | ... | @@ -303,8 +304,7 @@ short& GFitsImageShort::operator() (const int& ix, const int& iy) |
| 303 | 304 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 304 | 305 | * checking and image dimension verification is required. |
| 305 | 306 | ***************************************************************************/ |
| 306 | -short& GFitsImageShort::operator() (const int& ix, const int& iy, | |
| 307 | - const int& iz) | |
| 307 | +short& GFitsImageShort::operator()(const int& ix, const int& iy, const int& iz) | |
| 308 | 308 | { |
| 309 | 309 | // Load data |
| 310 | 310 | load_data(); |
| ... | ... | @@ -329,8 +329,8 @@ short& GFitsImageShort::operator() (const int& ix, const int& iy, |
| 329 | 329 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 330 | 330 | * checking and image dimension verification is required. |
| 331 | 331 | ***************************************************************************/ |
| 332 | -short& GFitsImageShort::operator() (const int& ix, const int& iy, | |
| 333 | - const int& iz, const int& it) | |
| 332 | +short& GFitsImageShort::operator()(const int& ix, const int& iy, | |
| 333 | + const int& iz, const int& it) | |
| 334 | 334 | { |
| 335 | 335 | // Load data |
| 336 | 336 | load_data(); |
| ... | ... | @@ -351,7 +351,7 @@ short& GFitsImageShort::operator() (const int& ix, const int& iy, |
| 351 | 351 | * Provides access to an image pixel. No range checking is performed. |
| 352 | 352 | * Use the at(ix) method if range checking is required. |
| 353 | 353 | ***************************************************************************/ |
| 354 | -const short& GFitsImageShort::operator() (const int& ix) const | |
| 354 | +const short& GFitsImageShort::operator()(const int& ix) const | |
| 355 | 355 | { |
| 356 | 356 | // Load data |
| 357 | 357 | load_data(); |
| ... | ... | @@ -371,7 +371,7 @@ const short& GFitsImageShort::operator() (const int& ix) const |
| 371 | 371 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 372 | 372 | * checking and image dimension verification is required. |
| 373 | 373 | ***************************************************************************/ |
| 374 | -const short& GFitsImageShort::operator() (const int& ix, const int& iy) const | |
| 374 | +const short& GFitsImageShort::operator()(const int& ix, const int& iy) const | |
| 375 | 375 | { |
| 376 | 376 | // Load data |
| 377 | 377 | load_data(); |
| ... | ... | @@ -395,8 +395,8 @@ const short& GFitsImageShort::operator() (const int& ix, const int& iy) const |
| 395 | 395 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 396 | 396 | * checking and image dimension verification is required. |
| 397 | 397 | ***************************************************************************/ |
| 398 | -const short& GFitsImageShort::operator() (const int& ix, const int& iy, | |
| 399 | - const int& iz) const | |
| 398 | +const short& GFitsImageShort::operator()(const int& ix, const int& iy, | |
| 399 | + const int& iz) const | |
| 400 | 400 | { |
| 401 | 401 | // Load data |
| 402 | 402 | load_data(); |
| ... | ... | @@ -421,8 +421,8 @@ const short& GFitsImageShort::operator() (const int& ix, const int& iy, |
| 421 | 421 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 422 | 422 | * checking and image dimension verification is required. |
| 423 | 423 | ***************************************************************************/ |
| 424 | -const short& GFitsImageShort::operator() (const int& ix, const int& iy, | |
| 425 | - const int& iz, const int& it) const | |
| 424 | +const short& GFitsImageShort::operator()(const int& ix, const int& iy, | |
| 425 | + const int& iz, const int& it) const | |
| 426 | 426 | { |
| 427 | 427 | // Load data |
| 428 | 428 | load_data(); |
| ... | ... | @@ -924,10 +924,3 @@ void GFitsImageShort::alloc_nulval(const void* value) |
| 924 | 924 | // Return |
| 925 | 925 | return; |
| 926 | 926 | } |
| 927 | - | |
| 928 | - | |
| 929 | -/*========================================================================== | |
| 930 | - = = | |
| 931 | - = Friends = | |
| 932 | - = = | |
| 933 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageULong.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageULong.cpp - FITS unsigned long integer image class * | |
| 2 | + * GFitsImageULong.cpp - Unsigned long image FITS class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageULong.cpp |
| 23 | - * @brief FITS unsigned long integer image class implementation | |
| 23 | + * @brief Unsigned long image FITS class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageULong.hpp" |
| ... | ... | @@ -71,7 +70,7 @@ GFitsImageULong::GFitsImageULong(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageULong::GFitsImageULong(int nx, const unsigned long* pixels) : | |
| 73 | +GFitsImageULong::GFitsImageULong(const int& nx, const unsigned long* pixels) : | |
| 75 | 74 | GFitsImage(G_BITPIX, nx) |
| 76 | 75 | { |
| 77 | 76 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +93,8 @@ GFitsImageULong::GFitsImageULong(int nx, const unsigned long* pixels) : |
| 94 | 93 | * |
| 95 | 94 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 95 | ***************************************************************************/ |
| 97 | -GFitsImageULong::GFitsImageULong(int nx, int ny, const unsigned long* pixels) : | |
| 96 | +GFitsImageULong::GFitsImageULong(const int& nx, const int& ny, | |
| 97 | + const unsigned long* pixels) : | |
| 98 | 98 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 99 | { |
| 100 | 100 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +118,7 @@ GFitsImageULong::GFitsImageULong(int nx, int ny, const unsigned long* pixels) : |
| 118 | 118 | * |
| 119 | 119 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 120 | ***************************************************************************/ |
| 121 | -GFitsImageULong::GFitsImageULong(int nx, int ny, int nz, | |
| 121 | +GFitsImageULong::GFitsImageULong(const int& nx, const int& ny, const int& nz, | |
| 122 | 122 | const unsigned long* pixels) : |
| 123 | 123 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 124 | { |
| ... | ... | @@ -144,7 +144,8 @@ GFitsImageULong::GFitsImageULong(int nx, int ny, int nz, |
| 144 | 144 | * |
| 145 | 145 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 146 | ***************************************************************************/ |
| 147 | -GFitsImageULong::GFitsImageULong(int nx, int ny, int nz, int nt, | |
| 147 | +GFitsImageULong::GFitsImageULong(const int& nx, const int& ny, const int& nz, | |
| 148 | + const int& nt, | |
| 148 | 149 | const unsigned long* pixels) : |
| 149 | 150 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 151 | { |
| ... | ... | @@ -170,7 +171,7 @@ GFitsImageULong::GFitsImageULong(int nx, int ny, int nz, int nt, |
| 170 | 171 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 172 | * not allocate any memory for the actual image. |
| 172 | 173 | ***************************************************************************/ |
| 173 | -GFitsImageULong::GFitsImageULong(int naxis, const int* naxes, | |
| 174 | +GFitsImageULong::GFitsImageULong(const int& naxis, const int* naxes, | |
| 174 | 175 | const unsigned long* pixels) : |
| 175 | 176 | GFitsImage(G_BITPIX, naxis, naxes) |
| 176 | 177 | { |
| ... | ... | @@ -228,7 +229,7 @@ GFitsImageULong::~GFitsImageULong(void) |
| 228 | 229 | * |
| 229 | 230 | * @param[in] image FITS image. |
| 230 | 231 | ***************************************************************************/ |
| 231 | -GFitsImageULong& GFitsImageULong::operator= (const GFitsImageULong& image) | |
| 232 | +GFitsImageULong& GFitsImageULong::operator=(const GFitsImageULong& image) | |
| 232 | 233 | { |
| 233 | 234 | // Execute only if object is not identical |
| 234 | 235 | if (this != &image) { |
| ... | ... | @@ -260,7 +261,7 @@ GFitsImageULong& GFitsImageULong::operator= (const GFitsImageULong& image) |
| 260 | 261 | * Provides access to an image pixel. No range checking is performed. |
| 261 | 262 | * Use the at(ix) method if range checking is required. |
| 262 | 263 | ***************************************************************************/ |
| 263 | -unsigned long& GFitsImageULong::operator() (const int& ix) | |
| 264 | +unsigned long& GFitsImageULong::operator()(const int& ix) | |
| 264 | 265 | { |
| 265 | 266 | // Load data |
| 266 | 267 | load_data(); |
| ... | ... | @@ -280,7 +281,7 @@ unsigned long& GFitsImageULong::operator() (const int& ix) |
| 280 | 281 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 281 | 282 | * checking and image dimension verification is required. |
| 282 | 283 | ***************************************************************************/ |
| 283 | -unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy) | |
| 284 | +unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy) | |
| 284 | 285 | { |
| 285 | 286 | // Load data |
| 286 | 287 | load_data(); |
| ... | ... | @@ -304,8 +305,8 @@ unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy) |
| 304 | 305 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 305 | 306 | * checking and image dimension verification is required. |
| 306 | 307 | ***************************************************************************/ |
| 307 | -unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, | |
| 308 | - const int& iz) | |
| 308 | +unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy, | |
| 309 | + const int& iz) | |
| 309 | 310 | { |
| 310 | 311 | // Load data |
| 311 | 312 | load_data(); |
| ... | ... | @@ -330,8 +331,8 @@ unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, |
| 330 | 331 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 331 | 332 | * checking and image dimension verification is required. |
| 332 | 333 | ***************************************************************************/ |
| 333 | -unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, | |
| 334 | - const int& iz, const int& it) | |
| 334 | +unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy, | |
| 335 | + const int& iz, const int& it) | |
| 335 | 336 | { |
| 336 | 337 | // Load data |
| 337 | 338 | load_data(); |
| ... | ... | @@ -352,7 +353,7 @@ unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, |
| 352 | 353 | * Provides access to an image pixel. No range checking is performed. |
| 353 | 354 | * Use the at(ix) method if range checking is required. |
| 354 | 355 | ***************************************************************************/ |
| 355 | -const unsigned long& GFitsImageULong::operator() (const int& ix) const | |
| 356 | +const unsigned long& GFitsImageULong::operator()(const int& ix) const | |
| 356 | 357 | { |
| 357 | 358 | // Load data |
| 358 | 359 | load_data(); |
| ... | ... | @@ -372,7 +373,7 @@ const unsigned long& GFitsImageULong::operator() (const int& ix) const |
| 372 | 373 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 373 | 374 | * checking and image dimension verification is required. |
| 374 | 375 | ***************************************************************************/ |
| 375 | -const unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy) const | |
| 376 | +const unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy) const | |
| 376 | 377 | { |
| 377 | 378 | // Load data |
| 378 | 379 | load_data(); |
| ... | ... | @@ -396,8 +397,8 @@ const unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy) |
| 396 | 397 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 397 | 398 | * checking and image dimension verification is required. |
| 398 | 399 | ***************************************************************************/ |
| 399 | -const unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, | |
| 400 | - const int& iz) const | |
| 400 | +const unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy, | |
| 401 | + const int& iz) const | |
| 401 | 402 | { |
| 402 | 403 | // Load data |
| 403 | 404 | load_data(); |
| ... | ... | @@ -422,8 +423,8 @@ const unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, |
| 422 | 423 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 423 | 424 | * checking and image dimension verification is required. |
| 424 | 425 | ***************************************************************************/ |
| 425 | -const unsigned long& GFitsImageULong::operator() (const int& ix, const int& iy, | |
| 426 | - const int& iz, const int& it) const | |
| 426 | +const unsigned long& GFitsImageULong::operator()(const int& ix, const int& iy, | |
| 427 | + const int& iz, const int& it) const | |
| 427 | 428 | { |
| 428 | 429 | // Load data |
| 429 | 430 | load_data(); |
| ... | ... | @@ -925,10 +926,3 @@ void GFitsImageULong::alloc_nulval(const void* value) |
| 925 | 926 | // Return |
| 926 | 927 | return; |
| 927 | 928 | } |
| 928 | - | |
| 929 | - | |
| 930 | -/*========================================================================== | |
| 931 | - = = | |
| 932 | - = Friends = | |
| 933 | - = = | |
| 934 | - ==========================================================================*/ | ... | ... |
src/fits/GFitsImageUShort.cpp
| 1 | 1 | /*************************************************************************** |
| 2 | - * GFitsImageUShort.cpp - FITS unsigned short integer image class * | |
| 2 | + * GFitsImageUShort.cpp - Unsigned short FITS image class * | |
| 3 | 3 | * ----------------------------------------------------------------------- * |
| 4 | - * copyright (C) 2010-2012 by Juergen Knoedlseder * | |
| 4 | + * copyright (C) 2010-2013 by Juergen Knoedlseder * | |
| 5 | 5 | * ----------------------------------------------------------------------- * |
| 6 | 6 | * * |
| 7 | 7 | * This program is free software: you can redistribute it and/or modify * |
| ... | ... | @@ -20,7 +20,7 @@ |
| 20 | 20 | ***************************************************************************/ |
| 21 | 21 | /** |
| 22 | 22 | * @file GFitsImageUShort.cpp |
| 23 | - * @brief FITS unsigned short integer image class implementation | |
| 23 | + * @brief Unsigned short FITS image class implementation | |
| 24 | 24 | * @author Juergen Knoedlseder |
| 25 | 25 | */ |
| 26 | 26 | |
| ... | ... | @@ -28,7 +28,6 @@ |
| 28 | 28 | #ifdef HAVE_CONFIG_H |
| 29 | 29 | #include <config.h> |
| 30 | 30 | #endif |
| 31 | -#include <iostream> | |
| 32 | 31 | #include "GException.hpp" |
| 33 | 32 | #include "GFitsCfitsio.hpp" |
| 34 | 33 | #include "GFitsImageUShort.hpp" |
| ... | ... | @@ -71,7 +70,8 @@ GFitsImageUShort::GFitsImageUShort(void) : GFitsImage() |
| 71 | 70 | * |
| 72 | 71 | * Construct 1D instance by specifying the number of pixels in the image. |
| 73 | 72 | ***************************************************************************/ |
| 74 | -GFitsImageUShort::GFitsImageUShort(int nx, const unsigned short* pixels) : | |
| 73 | +GFitsImageUShort::GFitsImageUShort(const int& nx, | |
| 74 | + const unsigned short* pixels) : | |
| 75 | 75 | GFitsImage(G_BITPIX, nx) |
| 76 | 76 | { |
| 77 | 77 | // Initialise class members for clean destruction |
| ... | ... | @@ -94,7 +94,8 @@ GFitsImageUShort::GFitsImageUShort(int nx, const unsigned short* pixels) : |
| 94 | 94 | * |
| 95 | 95 | * Construct 2D image by specifying the number of pixels in each dimension. |
| 96 | 96 | ***************************************************************************/ |
| 97 | -GFitsImageUShort::GFitsImageUShort(int nx, int ny, const unsigned short* pixels) : | |
| 97 | +GFitsImageUShort::GFitsImageUShort(const int& nx, const int& ny, | |
| 98 | + const unsigned short* pixels) : | |
| 98 | 99 | GFitsImage(G_BITPIX, nx, ny) |
| 99 | 100 | { |
| 100 | 101 | // Initialise class members for clean destruction |
| ... | ... | @@ -118,7 +119,7 @@ GFitsImageUShort::GFitsImageUShort(int nx, int ny, const unsigned short* pixels) |
| 118 | 119 | * |
| 119 | 120 | * Construct 3D image by specifying the number of pixels in each dimension. |
| 120 | 121 | ***************************************************************************/ |
| 121 | -GFitsImageUShort::GFitsImageUShort(int nx, int ny, int nz, | |
| 122 | +GFitsImageUShort::GFitsImageUShort(const int& nx, const int& ny, const int& nz, | |
| 122 | 123 | const unsigned short* pixels) : |
| 123 | 124 | GFitsImage(G_BITPIX, nx, ny, nz) |
| 124 | 125 | { |
| ... | ... | @@ -144,7 +145,8 @@ GFitsImageUShort::GFitsImageUShort(int nx, int ny, int nz, |
| 144 | 145 | * |
| 145 | 146 | * Construct 4D image by specifying the number of pixels in each dimension. |
| 146 | 147 | ***************************************************************************/ |
| 147 | -GFitsImageUShort::GFitsImageUShort(int nx, int ny, int nz, int nt, | |
| 148 | +GFitsImageUShort::GFitsImageUShort(const int& nx, const int& ny, | |
| 149 | + const int& nz, const int& nt, | |
| 148 | 150 | const unsigned short* pixels) : |
| 149 | 151 | GFitsImage(G_BITPIX, nx, ny, nz, nt) |
| 150 | 152 | { |
| ... | ... | @@ -170,7 +172,7 @@ GFitsImageUShort::GFitsImageUShort(int nx, int ny, int nz, int nt, |
| 170 | 172 | * the number of pixels in each dimension. Note that this constructor does |
| 171 | 173 | * not allocate any memory for the actual image. |
| 172 | 174 | ***************************************************************************/ |
| 173 | -GFitsImageUShort::GFitsImageUShort(int naxis, const int* naxes, | |
| 175 | +GFitsImageUShort::GFitsImageUShort(const int& naxis, const int* naxes, | |
| 174 | 176 | const unsigned short* pixels) : |
| 175 | 177 | GFitsImage(G_BITPIX, naxis, naxes) |
| 176 | 178 | { |
| ... | ... | @@ -228,7 +230,7 @@ GFitsImageUShort::~GFitsImageUShort(void) |
| 228 | 230 | * |
| 229 | 231 | * @param[in] image FITS image. |
| 230 | 232 | ***************************************************************************/ |
| 231 | -GFitsImageUShort& GFitsImageUShort::operator= (const GFitsImageUShort& image) | |
| 233 | +GFitsImageUShort& GFitsImageUShort::operator=(const GFitsImageUShort& image) | |
| 232 | 234 | { |
| 233 | 235 | // Execute only if object is not identical |
| 234 | 236 | if (this != &image) { |
| ... | ... | @@ -260,7 +262,7 @@ GFitsImageUShort& GFitsImageUShort::operator= (const GFitsImageUShort& image) |
| 260 | 262 | * Provides access to an image pixel. No range checking is performed. |
| 261 | 263 | * Use the at(ix) method if range checking is required. |
| 262 | 264 | ***************************************************************************/ |
| 263 | -unsigned short& GFitsImageUShort::operator() (const int& ix) | |
| 265 | +unsigned short& GFitsImageUShort::operator()(const int& ix) | |
| 264 | 266 | { |
| 265 | 267 | // Load data |
| 266 | 268 | load_data(); |
| ... | ... | @@ -280,7 +282,7 @@ unsigned short& GFitsImageUShort::operator() (const int& ix) |
| 280 | 282 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 281 | 283 | * checking and image dimension verification is required. |
| 282 | 284 | ***************************************************************************/ |
| 283 | -unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy) | |
| 285 | +unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy) | |
| 284 | 286 | { |
| 285 | 287 | // Load data |
| 286 | 288 | load_data(); |
| ... | ... | @@ -304,8 +306,8 @@ unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy) |
| 304 | 306 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 305 | 307 | * checking and image dimension verification is required. |
| 306 | 308 | ***************************************************************************/ |
| 307 | -unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, | |
| 308 | - const int& iz) | |
| 309 | +unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy, | |
| 310 | + const int& iz) | |
| 309 | 311 | { |
| 310 | 312 | // Load data |
| 311 | 313 | load_data(); |
| ... | ... | @@ -330,8 +332,8 @@ unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, |
| 330 | 332 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 331 | 333 | * checking and image dimension verification is required. |
| 332 | 334 | ***************************************************************************/ |
| 333 | -unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, | |
| 334 | - const int& iz, const int& it) | |
| 335 | +unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy, | |
| 336 | + const int& iz, const int& it) | |
| 335 | 337 | { |
| 336 | 338 | // Load data |
| 337 | 339 | load_data(); |
| ... | ... | @@ -352,7 +354,7 @@ unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, |
| 352 | 354 | * Provides access to an image pixel. No range checking is performed. |
| 353 | 355 | * Use the at(ix) method if range checking is required. |
| 354 | 356 | ***************************************************************************/ |
| 355 | -const unsigned short& GFitsImageUShort::operator() (const int& ix) const | |
| 357 | +const unsigned short& GFitsImageUShort::operator()(const int& ix) const | |
| 356 | 358 | { |
| 357 | 359 | // Load data |
| 358 | 360 | load_data(); |
| ... | ... | @@ -372,7 +374,7 @@ const unsigned short& GFitsImageUShort::operator() (const int& ix) const |
| 372 | 374 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 373 | 375 | * checking and image dimension verification is required. |
| 374 | 376 | ***************************************************************************/ |
| 375 | -const unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy) const | |
| 377 | +const unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy) const | |
| 376 | 378 | { |
| 377 | 379 | // Load data |
| 378 | 380 | load_data(); |
| ... | ... | @@ -396,8 +398,8 @@ const unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy |
| 396 | 398 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 397 | 399 | * checking and image dimension verification is required. |
| 398 | 400 | ***************************************************************************/ |
| 399 | -const unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, | |
| 400 | - const int& iz) const | |
| 401 | +const unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy, | |
| 402 | + const int& iz) const | |
| 401 | 403 | { |
| 402 | 404 | // Load data |
| 403 | 405 | load_data(); |
| ... | ... | @@ -422,8 +424,8 @@ const unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy |
| 422 | 424 | * dimension verification is performed. Use the at(ix,iy) method if range |
| 423 | 425 | * checking and image dimension verification is required. |
| 424 | 426 | ***************************************************************************/ |
| 425 | -const unsigned short& GFitsImageUShort::operator() (const int& ix, const int& iy, | |
| 426 | - const int& iz, const int& it) const | |
| 427 | +const unsigned short& GFitsImageUShort::operator()(const int& ix, const int& iy, | |
| 428 | + const int& iz, const int& it) const | |
| 427 | 429 | { |
| 428 | 430 | // Load data |
| 429 | 431 | load_data(); |
| ... | ... | @@ -925,10 +927,3 @@ void GFitsImageUShort::alloc_nulval(const void* value) |
| 925 | 927 | // Return |
| 926 | 928 | return; |
| 927 | 929 | } |
| 928 | - | |
| 929 | - | |
| 930 | -/*========================================================================== | |
| 931 | - = = | |
| 932 | - = Friends = | |
| 933 | - = = | |
| 934 | - ==========================================================================*/ | ... | ... |