Changeset 268
- Timestamp:
- Mar 19, 2004, 4:41:22 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psImage.h (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psImage.h
r257 r268 14 14 union { 15 15 psF32 **rows; ///< == rows_f32 16 psS8 **rows_s8; ///< pointers to psS8 data17 psS16 **rows_s16; ///< pointers to psS16 data18 psS32 **rows_s32; ///< pointers to psS32 data19 psU8 **rows_u8; ///< pointers to psU8 data20 psU16 **rows_u16; ///< pointers to psU16 data21 psU32 **rows_u32; ///< pointers to psU32 data22 psF32 **rows_f32; ///< pointers to psF32 data23 psF64 **rows_f64; ///< pointers to psF64 data16 psS8 **rows_s8; ///< pointers to psS8 data 17 psS16 **rows_s16; ///< pointers to psS16 data 18 psS32 **rows_s32; ///< pointers to psS32 data 19 psU8 **rows_u8; ///< pointers to psU8 data 20 psU16 **rows_u16; ///< pointers to psU16 data 21 psU32 **rows_u32; ///< pointers to psU32 data 22 psF32 **rows_f32; ///< pointers to psF32 data 23 psF64 **rows_f64; ///< pointers to psF64 data 24 24 } rows; 25 25 struct psImage *parent; ///< parent, if a subimage … … 48 48 int ny, ///< subimage width (<= image.ny - y0) 49 49 int x0, ///< subimage x-offset (0 <= x0 < nx) 50 int y0 ///< subimage y-offset (0 <= y0 < ny)51 );50 int y0) ///< subimage y-offset (0 <= y0 < ny) 51 ; 52 52 53 53 /// Destroy the specified image (destroy children if they exist). 54 54 void 55 psImageFree (psImage *image ///< free this image56 );55 psImageFree (psImage *image) ///< free this image 56 ; 57 57 58 58 /// Destroy the children of the specified image. 59 59 int 60 psImageFreeChildren (psImage *image ///< free children of this image61 );60 psImageFreeChildren (psImage *image) ///< free children of this image 61 ; 62 62 63 63 /// Create a copy of the specified image. 64 64 psImage * 65 65 psImageCopy (psImage *output, ///< target structure for output image data 66 psImage *input ///< copy this image67 );66 psImage *input) ///< copy this image 67 ; 68 68 69 69 /*** various image pixel extractions ***/ … … 77 77 int ny, ///< width of region in y 78 78 int direction, ///< direction of vector along slice 79 psStats *stats ///< defines statistics used to find output values80 );79 psStats *stats) ///< defines statistics used to find output values 80 ; 81 81 82 82 /// Extract pixels along a line to a vector. … … 88 88 float ye, ///< ending y coord of cut 89 89 float dw, ///< width of cut 90 psStats *stats ///< defines statistics used to find output values91 );90 psStats *stats) ///< defines statistics used to find output values 91 ; 92 92 93 93 /// Extract radial annulii data to a vector. … … 98 98 float radius, ///< outer radius of annulii 99 99 float dr, ///< radial step size of annulii 100 psStats *stats ///< defines statistics used to find output values101 );100 psStats *stats) ///< defines statistics used to find output values 101 ; 102 102 103 103 /// Extract a 2-d contour from an image at the given threshold. … … 105 105 psImageContour (psImage *input, ///< create contour for this image 106 106 float threshold, ///< contour image at this threshold 107 int binning ///< bin image by this value for contour calculation108 );107 int binning) ///< bin image by this value for contour calculation 108 ; 109 109 110 110 /*** various image geometry manipulation ***/ … … 113 113 psImageRebin (psImage *input, ///< rebin this image 114 114 float scale, ///< rebinning scale: doutput = scale*dinput 115 psStats *stats ///< defines statistics used to find output values116 );115 psStats *stats) ///< defines statistics used to find output values 116 ; 117 117 118 118 /// Rotate image by given angle. 119 119 psImage * 120 120 psImageRotate (psImage *input, ///< rotate this image 121 float angle ///< rotate by this amount (degrees)122 );121 float angle) ///< rotate by this amount (degrees) 122 ; 123 123 124 124 /// Shift image by an arbitrary number of pixels in either direction. … … 128 128 float dx, ///< shift by this amount in x 129 129 float dy, ///< shift by this amount in y 130 float exposed ///< set exposed pixels to this value131 );130 float exposed) ///< set exposed pixels to this value 131 ; 132 132 133 133 /// Roll image by an integer number of pixels in either direction. … … 136 136 psImageRoll (psImage *input, ///< roll this image 137 137 int dx, ///< roll this amount in x 138 int dy ///< roll this amount in y139 );138 int dy) ///< roll this amount in y 139 ; 140 140 141 141 /// Determine statistics for image (or subimage). 142 142 psStats * 143 143 psImageGetStats (psImage *input, ///< image (or subimage) to calculate stats 144 psStats *stats); ///< defines statistics to be calculated 144 psStats *stats) ///< defines statistics to be calculated 145 ; 145 146 146 147 /// Construct a histogram from an image (or subimage). 147 148 psHistogram * 148 149 psImageHistogram (psHistogram *hist, ///< input histogram description & target 149 psImage *input ///< determine histogram of this image150 );150 psImage *input) ///< determine histogram of this image 151 ; 151 152 152 153 /// Fit a 2-D polynomial surface to an image. 153 154 psPolynomial2D * 154 155 psImageFitPolynomial (psImage *input, ///< image to fit 155 psPolynomial2D *coeffs ///< coefficient structure carries in desired terms156 );156 psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms 157 ; 157 158 158 159 /// Evaluate a 2-D polynomial surface to image pixels. 159 160 int 160 161 psImageEvalPolynomial (psImage *input, ///< image to fit 161 psPolynomial2D *coeffs ///< coefficient structure carries in desired terms162 );162 psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms 163 ; 163 164 164 165 /*** image input/output routines ***/ … … 168 169 int x, ///< starting x coord of region 169 170 int y, ///< starting y coord of region 170 int dx, ///< x size of region (-1 for full range)171 int dy, ///< y size of region (-1 for full range)171 int nx, ///< x size of region (-1 for full range) 172 int ny, ///< y size of region (-1 for full range) 172 173 int z, ///< plane of interest 173 174 char *extname, ///< MEF extension name ("PHU" for primary header) 174 char *filename ///< file to read data from 175 ); 175 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 176 char *filename) ///< file to read data from 177 ; 176 178 177 179 /// Read an image or subimage from file descriptor. … … 184 186 int z, ///< plane of interest 185 187 char *extname, ///< MEF extension name ("PHU" for primary header) 186 FILE *f ///< file descriptor to read data from 187 ); 188 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 189 FILE *f) ///< file descriptor to read data from 190 ; 188 191 189 192 /// Write an image section to named file (which may exist). … … 194 197 int z, ///< plane of interest 195 198 char *extname, ///< MEF extension name ("PHU" for primary header) 196 char *filename ///< file to write data to 197 ); 199 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 200 char *filename) ///< file to write data to 201 ; 198 202 199 203 /// Write an image section to named file (which may exist). … … 204 208 int z, ///< plane of interest 205 209 char *extname, ///< MEF extension name 206 FILE *f ///< file descriptor to write data to 207 ); 210 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 211 FILE *f) ///< file descriptor to write data to 212 ; 208 213 209 214 /// Read only header from image file. … … 211 216 psImageReadHeader(struct psMetadata *output, ///< read data to this structure 212 217 char *extname, ///< MEF extension name ("PHU" for primary header) 213 char *filename ///< file to read from 214 ); 218 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 219 char *filename) ///< file to read from 220 ; 215 221 216 222 /// Read only header from image file descriptor. 217 223 struct psMetadata * 218 224 psImageFReadHeader (struct psMetadata *output, ///< read data to this structure 219 char *extname, ///< MEF extension name ("PHU" for primary header) 220 FILE *f ///< file descriptor to read from 221 ); 225 char *extname, ///< MEF extension name ("PHU" for primary header) 226 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 227 FILE *f) ///< file descriptor to read from 228 ; 222 229 223 230 /*** image FFT operations ***/ … … 225 232 psImage * 226 233 psImageFFT (psImage *input, ///< image to FFT 227 int direction ///< FFT direction228 );234 int direction) ///< FFT direction 235 ; 229 236 230 237 /*** basic pixel manipulations ***/ … … 235 242 float vmin, ///< set min-clipped pixels to vmin 236 243 float max, ///< clip pixels with values > max 237 float vmax ///< set max-clipped pixels to vmax238 );244 float vmax) ///< set max-clipped pixels to vmax 245 ; 239 246 240 247 /// Clip NaN image pixels to given value. 241 248 int 242 249 psImageClipNaN (psImage *input, ///< clip this image 243 float value ///< set nan pixels to this value244 );250 float value) ///< set nan pixels to this value 251 ; 245 252 246 253 /*** image arithmetic ***/ … … 250 257 psImage *in1, ///< first input image 251 258 char *operator, ///< operator 252 psImage *in2 ///< second input image253 );259 psImage *in2) ///< second input image 260 ; 254 261 255 262 /// Perform a unary operation on an image. … … 257 264 psImageUnaryOp (psImage *out, ///< destination image (may be NULL) 258 265 psImage *in1, ///< input image 259 char *operator ///< operator260 );266 char *operator) ///< operator 267 ; 261 268 262 269 /// Overlay subregion of image with another image. 263 270 int 264 psImageOverlaySection (psImage *image, ///< input image271 psImageOverlaySection (psImage *image, ///< input image 265 272 psImage *overlay, ///< image to overlay 266 273 int x0, ///< x offset of overlay subimage 267 274 int y0, ///< y offset of overlay subimage 268 char *operator ///< overlay operation269 );275 char *operator) ///< overlay operation 276 ; 270 277 271 278 /* \} */ // End of AstroGroup Functions
Note:
See TracChangeset
for help on using the changeset viewer.
