Changeset 671 for trunk/archive/pslib/include/psImage.h
- Timestamp:
- May 13, 2004, 1:16:19 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
r617 r671 26 26 const struct psImage *parent; ///< parent, if a subimage 27 27 int Nchildren; ///< number of subimages 28 struct psImage * children; ///< children of this region; array of Nchildren pointers28 struct psImage **children; ///< children of this region; array of Nchildren pointers 29 29 } psImage; 30 30 … … 40 40 psImageAlloc (int nx, ///< image width 41 41 int ny, ///< image height 42 psElemType type ///< image data type43 );42 psElemType type) ///< image data type 43 ; 44 44 45 45 /// Create a subimage of the specified area. … … 49 49 int ny, ///< subimage width (<= image.ny - y0) 50 50 int x0, ///< subimage x-offset (0 <= x0 < nx) 51 int y0 ///< subimage y-offset (0 <= y0 < ny)52 );51 int y0) ///< subimage y-offset (0 <= y0 < ny) 52 ; 53 53 54 54 /// Destroy the specified image (destroy children if they exist). 55 55 void 56 psImageFree(psImage *restrict image ///< free this image57 );56 psImageFree(psImage *restrict image) ///< free this image 57 ; 58 58 59 59 /** Destroy the pixels of the specified image */ 60 60 psImage * 61 psImageFreePixels(psImage *restrict image ///< Image whose pixels are to be freed62 );61 psImageFreePixels(psImage *restrict image) ///< Image whose pixels are to be freed 62 ; 63 63 64 64 /// Create a copy of the specified image. … … 66 66 psImageCopy(psImage *output, ///< target structure for output image data 67 67 const psImage *input, ///< copy this image 68 psElemType type ///< element type of output image69 );68 psElemType type) ///< element type of output image 69 ; 70 70 71 71 /*** various image pixel extractions ***/ 72 72 73 73 /// Extract pixels from rectlinear region to a vector. 74 ps FloatArray*75 psImageSlice(ps FloatArray*out, ///< Vector to output, or NULL74 psVector * 75 psImageSlice(psVector *out, ///< Vector to output, or NULL 76 76 const psImage *input, ///< extract slice from this image 77 77 int x, ///< starting x coord of region to slice … … 80 80 int ny, ///< width of region in y 81 81 int direction, ///< direction of vector along slice 82 const psStats *stats ///< defines statistics used to find output values83 );82 const psStats *stats) ///< defines statistics used to find output values 83 ; 84 84 85 85 /// Extract pixels along a line to a vector. 86 ps FloatArray*87 psImageCut(ps FloatArray*out, ///< Vector to output, or NULL86 psVector * 87 psImageCut(psVector *out, ///< Vector to output, or NULL 88 88 const psImage *input, ///< extract cut from this image 89 89 float xs, ///< starting x coord of cut … … 92 92 float ye, ///< ending y coord of cut 93 93 float dw, ///< width of cut 94 const psStats *stats ///< defines statistics used to find output values95 );94 const psStats *stats) ///< defines statistics used to find output values 95 ; 96 96 97 97 /// Extract radial annulii data to a vector. 98 ps FloatArray*99 psImageRadialCut(ps FloatArray *out,///< Vector to output, or NULL98 psVector * 99 psImageRadialCut(psVector *out, ///< Vector to output, or NULL 100 100 const psImage *input, ///< extract profile from this image 101 101 float x, ///< center x coord of annulii 102 102 float y, ///< center y coord of annulii 103 const ps FloatArray*radii, ///< Radii of the annuli104 const psStats *stats ///< defines statistics used to find output values105 );103 const psVector *radii, ///< Radii of the annuli 104 const psStats *stats) ///< defines statistics used to find output values 105 ; 106 106 107 107 /*** various image geometry manipulation ***/ … … 111 111 const psImage *input, ///< rebin this image 112 112 float scale, ///< rebinning scale: doutput = scale*dinput 113 const psStats *stats ///< defines statistics used to find output values114 );113 const psStats *stats) ///< defines statistics used to find output values 114 ; 115 115 116 116 /// Rotate image by given angle. … … 118 118 psImageRotate(psImage *out, ///< Image to output, or NULL 119 119 const psImage *input, ///< rotate this image 120 float angle ///< rotate by this amount anti-clockwise (degrees)121 );120 float angle) ///< rotate by this amount anti-clockwise (degrees) 121 ; 122 122 123 123 /// 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. … … 137 137 const psImage *input, ///< roll this image 138 138 int dx, ///< roll this amount in x 139 int dy ///< roll this amount in y140 );139 int dy) ///< roll this amount in y 140 ; 141 141 142 142 /// Determine statistics for image (or subimage). 143 143 psStats * 144 144 psImageGetStats(psStats *stats, ///< defines statistics to be calculated & target 145 const psImage *input ///< image (or subimage) to calculate stats146 );145 const psImage *input) ///< image (or subimage) to calculate stats 146 ; 147 147 148 148 /// Construct a histogram from an image (or subimage). 149 149 psHistogram * 150 150 psImageHistogram(psHistogram *hist, ///< input histogram description & target 151 const psImage *input ///< determine histogram of this image152 );151 const psImage *input) ///< determine histogram of this image 152 ; 153 153 154 154 /// Fit a 2-D polynomial surface to an image. 155 155 psPolynomial2D * 156 156 psImageFitPolynomial(psPolynomial2D *coeffs, ///< coefficient structure carries in desired terms & target 157 const psImage *input ///< image to fit158 );157 const psImage *input) ///< image to fit 158 ; 159 159 160 160 /// Evaluate a 2-D polynomial surface to image pixels. 161 161 psImage * 162 162 psImageEvalPolynomial(const psImage *input, ///< image to produce 163 const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms164 );163 const psPolynomial2D *coeffs) ///< coefficient structure carries in desired terms 164 ; 165 165 166 166 /*** image input/output routines ***/ … … 175 175 const char *extname, ///< MEF extension name ("PHU" for primary header) 176 176 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 177 const char *filename ///< file to read data from178 );177 const char *filename) ///< file to read data from 178 ; 179 179 180 180 /// Read an image or subimage from file descriptor. … … 188 188 const char *extname, ///< MEF extension name ("PHU" for primary header) 189 189 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 190 FILE *f ///< file descriptor to read data from191 );190 FILE *f) ///< file descriptor to read data from 191 ; 192 192 193 193 /// Write an image section to named file (which may exist). … … 199 199 const char *extname, ///< MEF extension name ("PHU" for primary header) 200 200 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 201 const char *filename ///< file to write data to202 );201 const char *filename) ///< file to write data to 202 ; 203 203 204 204 /// Write an image section to named file (which may exist). … … 210 210 const char *extname, ///< MEF extension name 211 211 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 212 FILE *f ///< file descriptor to write data to213 );212 FILE *f) ///< file descriptor to write data to 213 ; 214 214 215 215 /// Read only header from image file. … … 218 218 const char *extname, ///< MEF extension name ("PHU" for primary header) 219 219 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 220 const char *filename ///< file to read from221 );220 const char *filename) ///< file to read from 221 ; 222 222 223 223 /// Read only header from image file descriptor. … … 226 226 const char *extname, ///< MEF extension name ("PHU" for primary header) 227 227 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) 228 FILE *f ///< file descriptor to read from229 );228 FILE *f) ///< file descriptor to read from 229 ; 230 230 231 231 /*** basic pixel manipulations ***/ … … 236 236 float vmin, ///< set min-clipped pixels to vmin 237 237 float max, ///< clip pixels with values > max 238 float vmax ///< set max-clipped pixels to vmax239 );238 float vmax) ///< set max-clipped pixels to vmax 239 ; 240 240 241 241 /// Clip NaN image pixels to given value. Return number of clipped pixels. 242 242 int 243 243 psImageClipNaN(psImage *input, ///< clip this image & target 244 float value ///< set nan pixels to this value245 );244 float value) ///< set nan pixels to this value 245 ; 246 246 247 247 /// Overlay subregion of image with another image. Return number of pixels replaced. … … 251 251 int x0, ///< x offset of overlay subimage 252 252 int y0, ///< y offset of overlay subimage 253 const char *op ///< overlay operation254 );253 const char *op) ///< overlay operation 254 ; 255 255 256 256 /* \} */ // End of AstroGroup Functions
Note:
See TracChangeset
for help on using the changeset viewer.
