Changeset 1407 for trunk/psLib/src/image/psImage.h
- Timestamp:
- Aug 6, 2004, 2:06:06 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.h
r1406 r1407 1 1 2 /** @file psImage.h 2 3 * … … 11 12 * @author Ross Harman, MHPCC 12 13 * 13 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2004-08-0 6 22:34:05$14 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-07 00:06:06 $ 15 16 * 16 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 17 18 */ 18 # ifndef PS_IMAGE_H19 # define PS_IMAGE_H19 #ifndef PS_IMAGE_H 20 # define PS_IMAGE_H 20 21 21 # include <complex.h>22 # include <complex.h> 22 23 23 # include "psType.h"24 # include "psType.h" 24 25 25 26 /// @addtogroup Image … … 39 40 typedef struct psImage 40 41 { 41 const psType type; ///< Image data type and dimension.42 const unsigned int numCols; ///< Number of columns in image43 const unsigned int numRows; ///< Number of rows in image.44 const int col0; ///< Column position relative to parent.45 const int row0; ///< Row position relative to parent.42 const psType type; // /< Image data type and dimension. 43 const unsigned int numCols; // /< Number of columns in image 44 const unsigned int numRows; // /< Number of rows in image. 45 const int col0; // /< Column position relative to parent. 46 const int row0; // /< Row position relative to parent. 46 47 47 48 union { 48 psU8 **U8; ///< Unsigned 8-bit integer data.49 psU16 **U16; ///< Unsigned 16-bit integer data.50 psU32 **U32; ///< Unsigned 32-bit integer data.51 psU64 **U64; ///< Unsigned 64-bit integer data.52 psS8 **S8; ///< Signed 8-bit integer data.53 psS16 **S16; ///< Signed 16-bit integer data.54 psS32 **S32; ///< Signed 32-bit integer data.55 psS64 **S64; ///< Signed 64-bit integer data.56 psF32 **F32; ///< Single-precision float data.57 psF64 **F64; ///< Double-precision float data.58 psC32 **C32; ///< Single-precision complex data.59 psC64 **C64; ///< Double-precision complex data.60 psPTR **PTR; ///< Void pointers.61 psPTR *V; ///< Pointer to data.62 } data; ///< Union for data types.63 const struct psImage *parent; // /< Parent, if a subimage.64 int nChildren; ///< Number of subimages.65 struct psImage ** children; ///< Children of this region.49 psU8 **U8; // /< Unsigned 8-bit integer data. 50 psU16 **U16; // /< Unsigned 16-bit integer data. 51 psU32 **U32; // /< Unsigned 32-bit integer data. 52 psU64 **U64; // /< Unsigned 64-bit integer data. 53 psS8 **S8; // /< Signed 8-bit integer data. 54 psS16 **S16; // /< Signed 16-bit integer data. 55 psS32 **S32; // /< Signed 32-bit integer data. 56 psS64 **S64; // /< Signed 64-bit integer data. 57 psF32 **F32; // /< Single-precision float data. 58 psF64 **F64; // /< Double-precision float data. 59 psC32 **C32; // /< Single-precision complex data. 60 psC64 **C64; // /< Double-precision complex data. 61 psPTR **PTR; // /< Void pointers. 62 psPTR *V; // /< Pointer to data. 63 } data; // /< Union for data types. 64 const struct psImage *parent; // /< Parent, if a subimage. 65 int nChildren; // /< Number of subimages. 66 struct psImage **children; // /< Children of this region. 66 67 } 67 68 psImage; 68 69 69 70 /*****************************************************************************/ 71 70 72 /* FUNCTION PROTOTYPES */ 73 71 74 /*****************************************************************************/ 72 73 75 74 76 /** Create an image of the specified size and type. … … 80 82 * 81 83 */ 82 psImage *psImageAlloc( 83 unsigned int numCols, ///< Number of rows in image. 84 unsigned int numRows, ///< Number of columns in image. 85 const psElemType type ///< Type of data for image. 86 ); 84 psImage *psImageAlloc(unsigned int numCols, // /< Number of rows in image. 85 unsigned int numRows, // /< Number of columns in image. 86 const psElemType type // /< Type of data for image. 87 ); 87 88 88 89 /** Resize a given image to the given size/type. … … 91 92 * 92 93 */ 93 psImage* psImageRecycle( 94 psImage* old, ///< the psImage to recycle by resizing image buffer 95 unsigned int numCols, ///< the desired number of columns in image 96 unsigned int numRows, ///< the desired number of rows in image 97 const psElemType type ///< the desired datatype of the image 98 ); 99 94 psImage *psImageRecycle(psImage * old, // /< the psImage to recycle by resizing image buffer 95 unsigned int numCols, // /< the desired number of columns in image 96 unsigned int numRows, // /< the desired number of rows in image 97 const psElemType type // /< the desired datatype of the image 98 ); 100 99 101 100 /** Frees all children of a psImage. … … 104 103 * 105 104 */ 106 int psImageFreeChildren( 107 psImage* image 108 /**< psImage in which all children shall be deallocated */ 109 ); 105 int psImageFreeChildren(psImage * image 110 106 111 psF32 psImagePixelInterpolate( 112 const psImage *input, 113 float x, 114 float y, 115 psF32 unexposedValue, 116 psImageInterpolateMode mode 117 ); 107 /**< psImage in which all children shall be deallocated */ 108 ); 118 109 119 #define p_psImagePixelInterpolateFcns(TYPE) \ 110 psF32 psImagePixelInterpolate(const psImage * input, 111 float x, float y, psF32 unexposedValue, psImageInterpolateMode mode); 112 113 # define p_psImagePixelInterpolateFcns(TYPE) \ 120 114 inline psF64 p_psImagePixelInterpolateFLAT_##TYPE( \ 121 115 const psImage *input, \ … … 131 125 ); 132 126 133 # define p_psImagePixelInterpolateComplexFcns(TYPE) \127 # define p_psImagePixelInterpolateComplexFcns(TYPE) \ 134 128 inline psC64 p_psImagePixelInterpolateFLAT_##TYPE( \ 135 129 const psImage *input, \ … … 157 151 p_psImagePixelInterpolateComplexFcns(C32) 158 152 p_psImagePixelInterpolateComplexFcns(C64) 159 160 153 /// @} 161 162 154 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
