Changeset 680
- Timestamp:
- May 13, 2004, 3:21:30 PM (22 years ago)
- Location:
- trunk/archive/pslib/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psImage.h
r671 r680 10 10 typedef struct psImage { 11 11 psType type; ///< image data type and dimension 12 const int n x, ny;///< size of image12 const int ncols, nrows; ///< size of image 13 13 const int x0, y0; ///< data region relative to parent 14 14 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 25 27 } rows; 26 28 const struct psImage *parent; ///< parent, if a subimage … … 38 40 /// Create an image of the specified size and type. 39 41 psImage * 40 psImageAlloc (int nx, ///< image width41 int ny, ///< image height42 psImageAlloc (int width, ///< image width (ncols) 43 int height, ///< image height (nrows) 42 44 psElemType type) ///< image data type 43 45 ; … … 46 48 psImage * 47 49 psImageSubset(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) 52 54 ; 53 55 … … 77 79 int x, ///< starting x coord of region to slice 78 80 int y, ///< starting y coord of region to slice 79 int nx, ///< width of region in x80 int ny, ///< width of region in y81 int nx, ///< length of region in x 82 int ny, ///< length of region in y 81 83 int direction, ///< direction of vector along slice 82 84 const psStats *stats) ///< defines statistics used to find output values -
trunk/archive/pslib/include/psType.h
r671 r680 9 9 /** Types of the elements of vectors, images, etc. */ 10 10 typedef enum { 11 PS_TYPE_ CHAR,///< Character12 PS_TYPE_S HORT, ///< Short integer13 PS_TYPE_ INT, ///< Integer14 PS_TYPE_ LONG, ///< Long integer15 PS_TYPE_U CHAR,///< Unsigned character16 PS_TYPE_U SHORT, ///< Unsigned short integer17 PS_TYPE_U INT, ///< Unsigned integer18 PS_TYPE_U LONG, ///< Unsigned long integer19 PS_TYPE_F LOAT, ///< Floating point20 PS_TYPE_ DOUBLE, ///< Double-precision floating point21 PS_TYPE_C OMPLEX, ///< Complex numbers consisting of floating point11 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 22 22 PS_TYPE_OTHER, ///< Something else that's not supported for arithmetic 23 23 } psElemType; … … 44 44 * guaranteed, or for use in macros to preserve the standard naming conventions. 45 45 */ 46 typedef float psFloat; ///< BITPIX -32 (float)47 46 typedef float psF32; ///< BITPIX -32 (float) 48 typedef double psDouble;49 47 typedef double psF64; ///< BITPIX -64 (double) 50 51 typedef complex float psComplex; 48 typedef complex float psC32; 52 49 53 50 typedef int8_t psS8; … … 55 52 typedef int32_t psS32; 56 53 typedef int64_t psS64; 57 typedef int8_t psChar;58 typedef int16_t psShort;59 typedef int32_t psInt;60 typedef int64_t psLong;61 54 62 typedef uint8_t psU8; ///< BITPIX 863 typedef uint16_t psU16; ///< BITPIX 1664 typedef uint32_t psU32; ///< BITPIX 3255 typedef uint8_t psU8; ///< equivalent to BITPIX 8 56 typedef uint16_t psU16; ///< equivalent to BITPIX 16 57 typedef uint32_t psU32; ///< equivalent to BITPIX 32 65 58 typedef uint64_t psU64; 66 typedef uint8_t psUchar; ///< BITPIX 867 typedef uint16_t psUshort; ///< BITPIX 1668 typedef uint32_t psUint; ///< BITPIX 3269 typedef uint64_t psUlong;70 59 -
trunk/archive/pslib/include/psVector.h
r671 r680 13 13 const int nalloc; ///< data region relative to parent 14 14 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 25 27 void **arr_v; 26 28 } arr; … … 37 39 psVector * 38 40 psVectorAlloc (int nalloc, ///< vector length 39 psElemType type ///< vector data type40 );41 psElemType type) ///< vector data type 42 ; 41 43 42 44 /// Extend a vector 43 45 psVector * 44 psVectorRealloc ( int nalloc, ///< vector length45 psElemType type ///< vector data type46 );46 psVectorRealloc (const psVector *vector, ///< vector to reallocate 47 int nalloc) ///< required length 48 ; 47 49 48 50 /// Create a subvector of the specified range. … … 50 52 psVectorSubset(const psVector *vector, ///< parent vector 51 53 int start, ///< subvector range start 52 int end ///< subvector range end53 );54 int end) ///< subvector range end 55 ; 54 56 55 57 /// Destroy the specified vector
Note:
See TracChangeset
for help on using the changeset viewer.
