Changeset 365
- Timestamp:
- Mar 31, 2004, 11:29:01 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/doc/pslib/psLibSDRS.tex (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/psLibSDRS.tex
r363 r365 1 %%% $Id: psLibSDRS.tex,v 1.2 5 2004-04-01 09:16:12eugene Exp $1 %%% $Id: psLibSDRS.tex,v 1.26 2004-04-01 09:29:01 eugene Exp $ 2 2 \documentclass[panstarrs]{panstarrs} 3 3 … … 1947 1947 is derived from the statistics of the pixels at that direction 1948 1948 coordinate. The statistic used to derive the output vector value is 1949 specified by \code{psStats *stats}. 1950 \begin{verbatim} 1951 psFloatArray *psImageSlice(psFloatArray *out, psImage *input, 1952 int x, int y, int nx, int ny, 1953 int direction, const psStats *stats); 1949 specified by \code{stats}. 1950 \begin{verbatim} 1951 psFloatArray *psImageSlice(psFloatArray *out, psImage *input, int x, int y, int nx, int ny, 1952 int direction, const psStats *stats); 1954 1953 \end{verbatim} 1955 1954 … … 1962 1961 statistics of the pixels interpolated along the perpendicular 1963 1962 direction. The statistic used to derive the output vector value is 1964 specified by \code{psStats stats}. 1965 \begin{verbatim} 1966 psFloatArray *psImageCut(psFloatArray *out, psImage *input, 1967 float xs, float ys, float xe, float ye, float dw, 1968 const psStats *stats); 1969 \end{verbatim} 1970 1971 Extract radial annuli data to a vector. A vector is constructed 1972 where each vector elements is derived from the statistics of the 1973 pixels which land in one of a sequence of annuli. The annuli are 1974 centered on the image pixel coordinate \code{x,y}, and have width 1975 \code{dr}. The number of annuli is $radius / dr$. The statistic 1976 used to derive the output vector value is specified by \code{psStats 1977 stats} 1978 \begin{verbatim} 1979 psFloatArray *psImageRadialCut(psFloatArray *out, psImage *input, 1980 float x, float y, float radius, float dr, 1981 psStats *stats); 1963 specified by \code{stats}. 1964 \begin{verbatim} 1965 psFloatArray *psImageCut(psFloatArray *out, psImage *input, float xs, float ys, float xe, float ye, 1966 float dw, psStats *stats); 1967 \end{verbatim} 1968 1969 Extract radial annuli data to a vector. A vector is constructed where 1970 each vector elements is derived from the statistics of the pixels 1971 which land in one of a sequence of annuli. The annuli are centered on 1972 the image pixel coordinate \code{x,y}, and have width \code{dr}. The 1973 number of annuli is $radius / dr$. The statistic used to derive the 1974 output vector value is specified by \code{stats} 1975 \begin{verbatim} 1976 psFloatArray *psImageRadialCut(psFloatArray *out, psImage *input, float x, float y, float radius, float dr, 1977 psStats *stats); 1982 1978 \end{verbatim} 1983 1979 … … 1989 1985 input image pixels. Each pixel in the output image is derived from 1990 1986 the statistics of the corresponding set of input image pixels based on 1991 the statistics specified by \code{ psStatsstats}.1987 the statistics specified by \code{stats}. 1992 1988 \begin{verbatim} 1993 1989 psImage *psImageRebin(psImage *out, psImage *input, float scale, psStats *stats); … … 2024 2020 2025 2021 Determine statistics for image (or subimage). The statistics to be 2026 determined are specified by \code{ psStatsstats}.2022 determined are specified by \code{stats}. 2027 2023 \begin{verbatim} 2028 2024 psStats *psImageGetStats(psImage *input, psStats *stats); … … 2067 2063 one-dimensional. 2068 2064 \begin{verbatim} 2069 psImage *psImageReadSection(psImage *output, 2070 int x, int y, int nx, int ny, int z, 2065 psImage *psImageReadSection(psImage *output, int x, int y, int nx, int ny, int z, 2071 2066 char *extname, int extnum, char *filename); 2072 2067 \end{verbatim} … … 2076 2071 \code{psImageReadSection}. 2077 2072 \begin{verbatim} 2078 psImage * 2079 psImageFReadSection(psImage *output, 2080 int x, int y, int nx, int ny, int z, 2081 char *extname, int extnum, FILE *f); 2073 psImage *psImageFReadSection(psImage *output, int x, int y, int nx, int ny, int z, 2074 char *extname, int extnum, FILE *f); 2082 2075 \end{verbatim} 2083 2076 \tbd{The use of \code{FILE*} to carry around the file descriptor is to be reviewed.} … … 2090 2083 created. 2091 2084 \begin{verbatim} 2092 psImage *psImageWriteSection(psImage *input, 2093 int x, int y, int z, 2085 psImage *psImageWriteSection(psImage *input, int x, int y, int z, 2094 2086 char *extname, int extnum, char *filename); 2095 2087 \end{verbatim} … … 2097 2089 Write an image section to file descriptor as above: 2098 2090 \begin{verbatim} 2099 psImage *psImageFWriteSection(psImage *input, 2100 int x, int y, int z, 2091 psImage *psImageFWriteSection(psImage *input, int x, int y, int z, 2101 2092 char *extname, int extnum, FILE *f); 2102 2093 \end{verbatim} … … 2157 2148 2158 2149 \begin{verbatim} 2159 /** Perform a binary operation on two data items (psImage, psVector, psScalar). 2160 */ 2161 psType * 2162 psBinaryOp (void *out, ///< destination (may be NULL) 2163 void *in1, ///< first input 2164 char *operator, ///< operator 2165 void *in2 ///< second input 2166 ); 2167 \end{verbatim} 2168 2169 \begin{verbatim} 2170 /** Perform a unary operation on two data items (psImage, psVector, psScalar). 2171 */ 2172 psType * 2173 psUnaryOp (void *out, ///< destination (may be NULL) 2174 void *in, ///< input 2175 char *operator, ///< operator 2176 ); 2177 \end{verbatim} 2178 2179 Note that these functions should return the appropriate type (i.e., 2180 the \code{psType} return type refers to \code{psVector} and 2181 \code{psImage} and \code{psScalar}). It is expected that the 2182 implementation of these functions will employ pre-processor macros to 2183 perform the onerous task of creating the loops. 2184 2185 Vectors are defined as arrays of floats: 2186 \begin{verbatim} 2187 /** Define a vector as an array of real numbers */ 2188 typedef psFloatArray psVector; 2189 #define psVectorAlloc(S,N) psFloatArrayAlloc(S,N) ///< Constructor 2190 #define psVectorRealloc(A,S) psFloatArrayRealloc(A,S) ///< Reallocator 2191 #define psVectorFree(A) psFloatArrayFree(A) ///< Destructor 2192 \end{verbatim} 2193 2194 It is desirable to use the same functions for both vectors and 2195 images, so inputs are \code{void*}; this necessitates that vectors 2196 and images each have a type element at a pre-determined and constant 2197 location in the \code{struct}. 2198 2199 \begin{verbatim} 2200 /** The type of a data type */ 2201 typedef struct { 2202 psElemType type; ///< The type 2203 psDimen dimen; ///< The dimensionality 2204 } psType; 2205 2206 /** Types of the elements of vectors, images, etc. */ 2207 typedef enum { 2208 PS_TYPE_CHAR, ///< Character 2209 PS_TYPE_SHORT, ///< Short integer 2210 PS_TYPE_INT, ///< Integer 2211 PS_TYPE_LONG, ///< Long integer 2212 PS_TYPE_UCHAR, ///< Unsigned character 2213 PS_TYPE_USHORT, ///< Unsigned short integer 2214 PS_TYPE_UINT, ///< Unsigned integer 2215 PS_TYPE_ULONG, ///< Unsigned long integer 2216 PS_TYPE_FLOAT, ///< Floating point 2217 PS_TYPE_DOUBLE, ///< Double-precision floating point 2218 PS_TYPE_COMPLEX, ///< Complex numbers consisting of floating point 2219 PS_TYPE_OTHER, ///< Something else that's not supported for arithmetic 2220 } psElemType; 2221 2222 /** Dimensions of a data type */ 2223 typedef enum { 2224 PS_DIMEN_SCALAR, ///< Scalar 2225 PS_DIMEN_VECTOR, ///< A vector 2226 PS_DIMEN_TRANSV, ///< A transposed vector 2227 PS_DIMEN_IMAGE, ///< An image 2228 PS_DIMEN_OTHER ///< Something else that's not supported for arithmetic 2229 } psDimen; 2230 \end{verbatim} 2150 psType *psBinaryOp (void *out, void *in1, char *op, void *in2); 2151 psType *psUnaryOp (void *out, void *in, char *op); 2152 \end{verbatim} 2153 These functions determine the type of the operands on the basis of 2154 their \code{psType} elements, which always are the first elements. 2155 Note that these functions return a pointer to the appropriate type for 2156 the operation. Since the result may is cast to \code{psType}, the 2157 resulting type may be determined by examining the return value. It is 2158 expected that the implementation of these functions will employ 2159 pre-processor macros to perform the onerous task of creating the 2160 loops. Also note that \code{psVectors} is equivalent to 2161 \code{psFloatArray}. 2231 2162 2232 2163 Binary operations between an image and a vector have a potential
Note:
See TracChangeset
for help on using the changeset viewer.
