Changeset 617
- Timestamp:
- May 7, 2004, 2:54:41 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psImage.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psImage.h
r527 r617 10 10 typedef struct psImage { 11 11 psType type; ///< image data type and dimension 12 int nx, ny;///< size of image13 int x0, y0;///< data region relative to parent12 const int nx, ny; ///< size of image 13 const int x0, y0; ///< data region relative to parent 14 14 union { 15 15 float **rows; ///< Pointers to floating-point data (default) … … 24 24 complex float **rows_complex; ///< Pointers to complex floating-point data 25 25 } rows; 26 struct psImage *parent;///< parent, if a subimage26 const struct psImage *parent; ///< parent, if a subimage 27 27 int Nchildren; ///< number of subimages 28 28 struct psImage *children; ///< children of this region; array of Nchildren pointers … … 40 40 psImageAlloc (int nx, ///< image width 41 41 int ny, ///< image height 42 ps Type type ///< image data type42 psElemType type ///< image data type 43 43 ); 44 44 45 45 /// Create a subimage of the specified area. 46 46 psImage * 47 psImageSubset(psImage *out, ///< Subimage to return, or NULL 48 const psImage *image, ///< parent image 47 psImageSubset(const psImage *image, ///< parent image 49 48 int nx, ///< subimage width (<= image.nx - x0) 50 49 int ny, ///< subimage width (<= image.ny - y0) … … 63 62 ); 64 63 65 /// Destroy the children of the specified image. Returns number of children freed.66 int67 psImageFreeChildren(const psImage *image ///< free children of this image68 );69 70 64 /// Create a copy of the specified image. 71 65 psImage * 72 66 psImageCopy(psImage *output, ///< target structure for output image data 73 const psImage *input ///< copy this image 67 const psImage *input, ///< copy this image 68 psElemType type ///< element type of output image 74 69 ); 75 70 … … 106 101 float x, ///< center x coord of annulii 107 102 float y, ///< center y coord of annulii 108 float radius, ///< outer radius of annulii 109 float dr, ///< radial step size of annulii 103 const psFloatArray *radii, ///< Radii of the annuli 110 104 const psStats *stats ///< defines statistics used to find output values 111 105 ); 112 113 /* Contour is a high-level function */114 #if 0115 /// Extract a 2-d contour from an image at the given threshold.116 psFloatArray *117 psImageContour(psFloatArray *out, ///< Vector to output, or NULL118 const psImage *input, ///< create contour for this image119 float threshold, ///< contour image at this threshold120 int binning ///< bin image by this value for contour calculation121 );122 #endif123 106 124 107 /*** various image geometry manipulation ***/ … … 159 142 /// Determine statistics for image (or subimage). 160 143 psStats * 161 psImageGetStats( const psImage *input, ///< image (or subimage) to calculate stats162 psStats *stats ///< defines statistics to be calculated & target163 );144 psImageGetStats(psStats *stats, ///< defines statistics to be calculated & target 145 const psImage *input ///< image (or subimage) to calculate stats 146 ); 164 147 165 148 /// Construct a histogram from an image (or subimage). … … 171 154 /// Fit a 2-D polynomial surface to an image. 172 155 psPolynomial2D * 173 psImageFitPolynomial( const psImage *input, ///< image to fit174 psPolynomial2D *coeffs ///< coefficient structure carries in desired terms & target156 psImageFitPolynomial(psPolynomial2D *coeffs, ///< coefficient structure carries in desired terms & target 157 const psImage *input ///< image to fit 175 158 ); 176 159 177 160 /// Evaluate a 2-D polynomial surface to image pixels. 178 int 179 psImageEvalPolynomial(const psImage *input, ///< image to fit161 psImage * 162 psImageEvalPolynomial(const psImage *input, ///< image to produce 180 163 const psPolynomial2D *coeffs ///< coefficient structure carries in desired terms 181 164 ); … … 210 193 /// Write an image section to named file (which may exist). 211 194 psImage * 212 psImageWriteSection( psImage *input,///< image to write out195 psImageWriteSection(const psImage *input, ///< image to write out 213 196 int x, ///< starting x coord of region 214 197 int y, ///< starting y coord of region … … 221 204 /// Write an image section to named file (which may exist). 222 205 psImage * 223 psImageFWriteSection( psImage *input,///< image to write out206 psImageFWriteSection(const psImage *input, ///< image to write out 224 207 int x, ///< starting x coord of region 225 208 int y, ///< starting y coord of region … … 240 223 /// Read only header from image file descriptor. 241 224 psMetadata * 242 psImageFReadHeader(psMetadata *output, ///< read data to this structure225 psImageFReadHeader(psMetadata *output, ///< read data to this structure 243 226 const char *extname, ///< MEF extension name ("PHU" for primary header) 244 227 int extnum, ///< MEF extension number (-1 for "PHU", 0 : Nextend - 1) … … 249 232 /// Clip image values outside of range to given values. Return number of clipped pixels. 250 233 int 251 psImageClip(psImage *input, ///< clip this image234 psImageClip(psImage *input, ///< Image to be clipped, and output 252 235 float min, ///< clip pixels with values < min 253 236 float vmin, ///< set min-clipped pixels to vmin
Note:
See TracChangeset
for help on using the changeset viewer.
