Changeset 1442 for trunk/psLib/src/image/psImage.h
- Timestamp:
- Aug 9, 2004, 3:05:53 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImage.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.h
r1441 r1442 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-08- 09 23:40:55$14 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-08-10 01:05:53 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 43 43 typedef struct psImage 44 44 { 45 const psType type; ///< Image data type and dimension.46 const unsigned int numCols; ///< Number of columns in image47 const unsigned int numRows; ///< Number of rows in image.48 const int col0; ///< Column position relative to parent.49 const int row0; ///< Row position relative to parent.45 const psType type; ///< Image data type and dimension. 46 const unsigned int numCols; ///< Number of columns in image 47 const unsigned int numRows; ///< Number of rows in image. 48 const int col0; ///< Column position relative to parent. 49 const int row0; ///< Row position relative to parent. 50 50 51 51 union { 52 psU8* *U8; ///< Unsigned 8-bit integer data.53 psU16* *U16; ///< Unsigned 16-bit integer data.54 psU32* *U32; ///< Unsigned 32-bit integer data.55 psU64* *U64; ///< Unsigned 64-bit integer data.56 psS8* *S8; ///< Signed 8-bit integer data.57 psS16* *S16; ///< Signed 16-bit integer data.58 psS32* *S32; ///< Signed 32-bit integer data.59 psS64* *S64; ///< Signed 64-bit integer data.60 psF32* *F32; ///< Single-precision float data.61 psF64* *F64; ///< Double-precision float data.62 psC32* *C32; ///< Single-precision complex data.63 psC64* *C64; ///< Double-precision complex data.64 psPTR* *PTR; ///< Void pointers.65 psPTR* V; ///< Pointer to data.66 } data; ///< Union for data types.67 const struct psImage* parent; ///< Parent, if a subimage.68 int nChildren; ///< Number of subimages.69 struct psImage* *children; ///< Children of this region.52 psU8* *U8; ///< Unsigned 8-bit integer data. 53 psU16* *U16; ///< Unsigned 16-bit integer data. 54 psU32* *U32; ///< Unsigned 32-bit integer data. 55 psU64* *U64; ///< Unsigned 64-bit integer data. 56 psS8* *S8; ///< Signed 8-bit integer data. 57 psS16* *S16; ///< Signed 16-bit integer data. 58 psS32* *S32; ///< Signed 32-bit integer data. 59 psS64* *S64; ///< Signed 64-bit integer data. 60 psF32* *F32; ///< Single-precision float data. 61 psF64* *F64; ///< Double-precision float data. 62 psC32* *C32; ///< Single-precision complex data. 63 psC64* *C64; ///< Double-precision complex data. 64 psPTR* *PTR; ///< Void pointers. 65 psPTR* V; ///< Pointer to data. 66 } data; ///< Union for data types. 67 const struct psImage* parent; ///< Parent, if a subimage. 68 int nChildren; ///< Number of subimages. 69 struct psImage* *children; ///< Children of this region. 70 70 } 71 71 psImage; 72 73 /*****************************************************************************/74 75 /* FUNCTION PROTOTYPES */76 77 /*****************************************************************************/78 72 79 73 /** Create an image of the specified size and type. … … 85 79 * 86 80 */ 87 psImage* psImageAlloc(unsigned int numCols, ///< Number of rows in image. 88 unsigned int numRows, ///< Number of columns in image. 89 const psElemType type ///< Type of data for image. 90 ); 81 psImage* psImageAlloc( 82 unsigned int numCols, ///< Number of rows in image. 83 unsigned int numRows, ///< Number of columns in image. 84 const psElemType type ///< Type of data for image. 85 ); 91 86 92 87 /** Resize a given image to the given size/type. … … 95 90 * 96 91 */ 97 psImage* psImageRecycle(psImage* old, ///< the psImage to recycle by resizing image buffer 98 unsigned int numCols, ///< the desired number of columns in image 99 unsigned int numRows, ///< the desired number of rows in image 100 const psElemType type ///< the desired datatype of the image 101 ); 92 psImage* psImageRecycle( 93 psImage* old, ///< the psImage to recycle by resizing image buffer 94 unsigned int numCols, ///< the desired number of columns in image 95 unsigned int numRows, ///< the desired number of rows in image 96 const psElemType type ///< the desired datatype of the image 97 ); 102 98 103 99 /** Frees all children of a psImage. … … 106 102 * 107 103 */ 108 int psImageFreeChildren(psImage* image 104 int psImageFreeChildren( 105 psImage* image ///< psImage in which all children shall be deallocated 106 ); 109 107 110 /**< psImage in which all children shall be deallocated */ 111 ); 112 113 psF32 psImagePixelInterpolate(const psImage* input, 114 float x, float y, psF32 unexposedValue, psImageInterpolateMode mode); 108 /** Interpolate image pixel value given floating point coordinates. 109 * 110 * @return psF32 Pixel value interpolated from image or unexposedValue if 111 * given x,y doesn't coorespond to a valid image location 112 */ 113 psF32 psImagePixelInterpolate( 114 const psImage* input, ///< input image for interpolation 115 float x, ///< column location to derive value of 116 float y, ///< row location ot derive value of 117 psF32 unexposedValue, ///< return value if x,y location is not in image. 118 psImageInterpolateMode mode ///< interpolation mode 119 ); 115 120 116 121 #define p_psImagePixelInterpolateFcns(TYPE) \
Note:
See TracChangeset
for help on using the changeset viewer.
