IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 680


Ignore:
Timestamp:
May 13, 2004, 3:21:30 PM (22 years ago)
Author:
eugene
Message:

adjusted the type names to the form psS8, psF32, etc

Location:
trunk/archive/pslib/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psImage.h

    r671 r680  
    1010typedef struct psImage {
    1111    psType type;                        ///< image data type and dimension
    12     const int nx, ny;                   ///< size of image
     12    const int ncols, nrows;             ///< size of image
    1313    const int x0, y0;                   ///< data region relative to parent
    1414    union {
    15         float **rows;                   ///< Pointers to floating-point data (default)
    16         short int **rows_si;            ///< Pointers to short-integer data
    17         int **rows_i;                   ///< Pointers to integer data
    18         long int **rows_li;             ///< Pointers to long-integer data
    19         unsigned short int **rows_usi;  ///< Pointers to unsigned-short-integer data
    20         unsigned int **rows_ui;         ///< Pointers to unsigned-integer data
    21         unsigned long int **rows_uli;   ///< Pointers to unsigned-long-integer data
    22         float **rows_f;                 ///< Pointers to floating-point data
    23         double **rows_d;                ///< Pointers to double-precision data
    24         complex float **rows_complex;   ///< Pointers to complex floating-point data
     15        psF32 **rows;                   ///< Pointers to floating-point data (default)
     16        psS8  **rows_S8;                ///< Pointers to char data
     17        psS16 **rows_S16;               ///< Pointers to short-integer data
     18        psS32 **rows_S32;               ///< Pointers to integer data
     19        psS64 **rows_S64;               ///< Pointers to long-integer data
     20        psU8  **rows_U8;                ///< Pointers to unsigned-char data
     21        psU16 **rows_U16;               ///< Pointers to unsigned-short-integer data
     22        psU32 **rows_U32;               ///< Pointers to unsigned-integer data
     23        psU64 **rows_U64;               ///< Pointers to unsigned-long-integer data
     24        psF32 **rows_F32;               ///< Pointers to floating-point data
     25        psF64 **rows_F64;               ///< Pointers to double-precision data
     26        psC32 **rows_C32;               ///< Pointers to complex floating-point data
    2527    } rows;
    2628    const struct psImage *parent;       ///< parent, if a subimage
     
    3840/// Create an image of the specified size and type.
    3941psImage *
    40 psImageAlloc (int nx,                   ///< image width
    41               int ny,                   ///< image height
     42psImageAlloc (int width,                ///< image width (ncols)
     43              int height,               ///< image height (nrows)
    4244              psElemType type)          ///< image data type
    4345;
     
    4648psImage *
    4749psImageSubset(const psImage *image,     ///< parent image
    48               int nx,                   ///< subimage width (<= image.nx - x0) 
    49               int ny,                   ///< subimage width (<= image.ny - y0) 
    50               int x0,                   ///< subimage x-offset (0 <= x0 < nx)   
    51               int y0)                   ///< subimage y-offset (0 <= y0 < ny)   
     50              int width,                ///< subimage width (<= image.ncols - col0) 
     51              int height,               ///< subimage height (<= image.nrows - row0) 
     52              int x0,                   ///< subimage starting col (0 <= col0 < ncols)   
     53              int y0)                   ///< subimage starting row (0 <= row0 < nrows)   
    5254;
    5355
     
    7779             int x,                     ///< starting x coord of region to slice
    7880             int y,                     ///< starting y coord of region to slice
    79              int nx,                    ///< width of region in x
    80              int ny,                    ///< width of region in y
     81             int nx,                    ///< length of region in x
     82             int ny,                    ///< length of region in y
    8183             int direction,             ///< direction of vector along slice
    8284             const psStats *stats)      ///< defines statistics used to find output values
  • trunk/archive/pslib/include/psType.h

    r671 r680  
    99/** Types of the elements of vectors, images, etc. */
    1010typedef enum {
    11     PS_TYPE_CHAR,                       ///< Character
    12     PS_TYPE_SHORT,                      ///< Short integer
    13     PS_TYPE_INT,                        ///< Integer
    14     PS_TYPE_LONG,                       ///< Long integer
    15     PS_TYPE_UCHAR,                      ///< Unsigned character
    16     PS_TYPE_USHORT,                     ///< Unsigned short integer
    17     PS_TYPE_UINT,                       ///< Unsigned integer
    18     PS_TYPE_ULONG,                      ///< Unsigned long integer
    19     PS_TYPE_FLOAT,                      ///< Floating point
    20     PS_TYPE_DOUBLE,                     ///< Double-precision floating point
    21     PS_TYPE_COMPLEX,                    ///< Complex numbers consisting of floating point
     11    PS_TYPE_S8,                         ///< Character
     12    PS_TYPE_S16,                        ///< Short integer
     13    PS_TYPE_S32,                        ///< Integer
     14    PS_TYPE_S64,                        ///< Long integer
     15    PS_TYPE_U8,                         ///< Unsigned character
     16    PS_TYPE_U16,                        ///< Unsigned short integer
     17    PS_TYPE_U32,                        ///< Unsigned integer
     18    PS_TYPE_U64,                        ///< Unsigned long integer
     19    PS_TYPE_F32,                        ///< Floating point
     20    PS_TYPE_F64,                        ///< Double-precision floating point
     21    PS_TYPE_C32,                        ///< Complex numbers consisting of floating point
    2222    PS_TYPE_OTHER,                      ///< Something else that's not supported for arithmetic
    2323} psElemType;
     
    4444 * guaranteed, or for use in macros to preserve the standard naming conventions.
    4545 */
    46 typedef float          psFloat;         ///< BITPIX -32 (float)
    4746typedef float          psF32;           ///< BITPIX -32 (float)
    48 typedef double         psDouble;
    4947typedef double         psF64;           ///< BITPIX -64 (double)
    50 
    51 typedef complex float  psComplex;
     48typedef complex float  psC32;
    5249
    5350typedef int8_t         psS8;
     
    5552typedef int32_t        psS32;
    5653typedef int64_t        psS64;
    57 typedef int8_t         psChar;
    58 typedef int16_t        psShort;
    59 typedef int32_t        psInt;
    60 typedef int64_t        psLong;
    6154
    62 typedef uint8_t        psU8;            ///< BITPIX 8   
    63 typedef uint16_t       psU16;           ///< BITPIX 16 
    64 typedef uint32_t       psU32;           ///< BITPIX 32 
     55typedef uint8_t        psU8;            ///< equivalent to BITPIX 8   
     56typedef uint16_t       psU16;           ///< equivalent to BITPIX 16 
     57typedef uint32_t       psU32;           ///< equivalent to BITPIX 32 
    6558typedef uint64_t       psU64;           
    66 typedef uint8_t        psUchar;         ///< BITPIX 8   
    67 typedef uint16_t       psUshort;        ///< BITPIX 16 
    68 typedef uint32_t       psUint;          ///< BITPIX 32 
    69 typedef uint64_t       psUlong;         
    7059
  • trunk/archive/pslib/include/psVector.h

    r671 r680  
    1313    const int nalloc;                   ///< data region relative to parent
    1414    union {
    15         float *arr;                     ///< Pointers to floating-point data (default)
    16         short int *arr_si;              ///< Pointers to short-integer data
    17         int *arr_i;                     ///< Pointers to integer data
    18         long int *arr_li;               ///< Pointers to long-integer data
    19         unsigned short int *arr_usi;    ///< Pointers to unsigned-short-integer data
    20         unsigned int *arr_ui;           ///< Pointers to unsigned-integer data
    21         unsigned long int *arr_uli;     ///< Pointers to unsigned-long-integer data
    22         float *arr_f;                   ///< Pointers to floating-point data
    23         double *arr_d;                  ///< Pointers to double-precision data
    24         complex float *arr_complex;     ///< Pointers to complex floating-point data
     15        psF32 *arr;                     ///< Pointers to floating-point data (default)
     16        psS8  *arr_S8;                  ///< Pointers to short-integer data
     17        psS16 *arr_S16;                 ///< Pointers to short-integer data
     18        psS32 *arr_S32;                 ///< Pointers to integer data
     19        psS64 *arr_S64;                 ///< Pointers to long-integer data
     20        psU8  *arr_U18;                 ///< Pointers to unsigned-short-integer data
     21        psU16 *arr_U16;                 ///< Pointers to unsigned-short-integer data
     22        psU32 *arr_U32;                 ///< Pointers to unsigned-integer data
     23        psU64 *arr_U64;                 ///< Pointers to unsigned-long-integer data
     24        psF32 *arr_F32;                 ///< Pointers to floating-point data
     25        psF64 *arr_F64;                 ///< Pointers to double-precision data
     26        psF32 *arr_C32;                 ///< Pointers to complex floating-point data
    2527        void **arr_v;
    2628    } arr;
     
    3739psVector *
    3840psVectorAlloc (int nalloc,              ///< vector length
    39                psElemType type          ///< vector data type
    40     );
     41               psElemType type)         ///< vector data type
     42;
    4143
    4244/// Extend a vector
    4345psVector *
    44 psVectorRealloc (int nalloc,            ///< vector length
    45                  psElemType type        ///< vector data type
    46     );
     46psVectorRealloc (const psVector *vector, ///< vector to reallocate
     47                 int nalloc)            ///< required length
     48;
    4749
    4850/// Create a subvector of the specified range.
     
    5052psVectorSubset(const psVector *vector,  ///< parent vector
    5153               int start,               ///< subvector range start
    52                int end                  ///< subvector range end
    53     );
     54               int end)                 ///< subvector range end
     55;
    5456
    5557/// Destroy the specified vector
Note: See TracChangeset for help on using the changeset viewer.