Changeset 198 for trunk/archive/pslib/include/psImages.h
- Timestamp:
- Mar 9, 2004, 5:54:55 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psImages.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psImages.h
r189 r198 1 1 # ifndef PS_IMAGES_H 2 2 # define PS_IMAGES_H 3 4 #include "psStdArrays.h" 5 #include "psUtils.h" 6 #include "psObjects.h" 7 #include "psMetaData.h" 8 #include "psStats.h" 3 9 4 10 /** General image manipulation functions. … … 15 21 16 22 PS_DECLARE_ARRAY_TYPE(psFloatArray); ///< Declare an array of real vectors (psFloatArrayArray). 17 PS_CREATE_ARRAY_TYPE(psFloatArray); ///< Create the data type (psFloatArrayArray).18 23 19 24 typedef unsigned char psU8; ///< BITPIX 8 (unsigned short) … … 34 39 psF32 **rows_f32; ///< pointers to psF32 data 35 40 psF64 **rows_f64; ///< pointers to psF64 data 36 psImage *parent;///< parent, if a subimage37 psImage *children;///< children of this region41 struct psImage *parent; ///< parent, if a subimage 42 struct psImage *children; ///< children of this region 38 43 int Nchildren; ///< number of subimages 39 psDlist md;///< metadata associated with image40 psObject Tableobjtable; ///< objects associated with image44 struct psMetaDataSet *md; ///< metadata associated with image 45 psObjectArray *objtable; ///< objects associated with image 41 46 } psImage; 42 47 … … 75 80 76 81 /*** various image pixel extractions ***/ 82 83 typedef enum { PS_STAT_MODE_MEDIAN } psStatMode; 84 77 85 /// Extract pixels from rectlinear region to a vector. 78 86 psFloatArray * … … 82 90 int nx, ///< width of region in x 83 91 int ny, ///< width of region in y 84 enum direction,///< direction of vector along slice85 enum statmode///< statistic applied to pixel group to find output value92 int direction, ///< direction of vector along slice 93 psStatMode statmode ///< statistic applied to pixel group to find output value 86 94 ); 87 95 … … 94 102 float ye, ///< ending y coord of cut 95 103 float dw, ///< width of cut 96 enumstatmode ///< statistic applied to pixel group to find output value97 );104 psStatMode statmode ///< statistic applied to pixel group to find output value 105 ); 98 106 99 107 /// Extract radial annulii data to a vector. … … 104 112 float radius, ///< outer radius of annulii 105 113 float dr, ///< radial step size of annulii 106 enum statmode///< statistic applied to pixel group to find output value107 );114 psStatMode statmode ///< statistic applied to pixel group to find output value 115 ); 108 116 109 117 /// Extract a 2-d contour from an image at the given threshold. … … 114 122 ); 115 123 116 /// Extract a 2-d contour from an image at the given threshold.117 psSpanArray *118 psImageContour (psImage *input, ///< create contour for this image119 float threshold ///< image at this threshold120 );121 122 124 /*** various image geometry manipulation ***/ 123 125 /// Rebin image to new scale. … … 125 127 psImageRebin (psImage *input, ///< rebin this image 126 128 float scale, ///< rebinning scale: doutput = scale*dinput 127 enum statmode///< statistic used in performing interpolation / summing129 psStatMode statmode ///< statistic used in performing interpolation / summing 128 130 ); 129 131 … … 155 157 /// How to represent the output values? 156 158 void 157 psImageGetStats (psImage *input, enumstatmode);159 psImageGetStats (psImage *input, psStatMode statmode); 158 160 159 161 /// Construct a histogram from an image (or subimage). 160 162 psHistogram * 161 psImageHistogram (psHistogram ,///< input histogram description & target162 psImage *input ,///< determine histogram of this image163 );163 psImageHistogram (psHistogram *hist, ///< input histogram description & target 164 psImage *input ///< determine histogram of this image 165 ); 164 166 165 167 /// Fit a 2-D polynomial surface to an image. 166 168 psFloatArrayArray * 167 169 psImageFitPolynomial (psImage *input, ///< image to fit 168 int xorder ///< order of polynomial in x-dir170 int xorder, ///< order of polynomial in x-dir 169 171 int yorder ///< order of polynomial in y-dir 170 172 ); … … 207 209 /// Write an image section to named file (which may exist). 208 210 psImage * 209 psImageFWriteSection (psImage *input, ///< image to write out210 int x, ///< starting x coord of region211 int y, ///< starting y coord of region212 int z, ///< plane of interest213 char *extname, ///< MEF extension name214 FILE *f ///< file descriptor to write data to211 psImageFWriteSection(psImage *input, ///< image to write out 212 int x, ///< starting x coord of region 213 int y, ///< starting y coord of region 214 int z, ///< plane of interest 215 char *extname, ///< MEF extension name 216 FILE *f ///< file descriptor to write data to 215 217 ); 216 218 217 219 /// Read only header from image file. 218 psMetadata *219 psImageReadHeader (psMetadata *output, ///< read data to this structure220 char *extname, ///< MEF extension name ("PHU" for primary header)221 char *filename ///< file to read from220 struct psMetadata * 221 psImageReadHeader(struct psMetadata *output, ///< read data to this structure 222 char *extname, ///< MEF extension name ("PHU" for primary header) 223 char *filename ///< file to read from 222 224 ); 223 225 224 226 /// Read only header from image file descriptor. 225 psMetadata *226 psImageFReadHeader ( psMetadata *output,///< read data to this structure227 struct psMetadata * 228 psImageFReadHeader (struct psMetadata *output, ///< read data to this structure 227 229 char *extname, ///< MEF extension name ("PHU" for primary header) 228 230 FILE *f ///< file descriptor to read from … … 233 235 psImage * 234 236 psImageFFT (psImage *input, ///< image to FFT 235 enumdirection ///< FFT direction237 int direction ///< FFT direction 236 238 ); 237 239
Note:
See TracChangeset
for help on using the changeset viewer.
