IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 31, 2004, 11:29:01 PM (22 years ago)
Author:
eugene
Message:

updated basic image section

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/psLibSDRS.tex

    r363 r365  
    1 %%% $Id: psLibSDRS.tex,v 1.25 2004-04-01 09:16:12 eugene Exp $
     1%%% $Id: psLibSDRS.tex,v 1.26 2004-04-01 09:29:01 eugene Exp $
    22\documentclass[panstarrs]{panstarrs}
    33
     
    19471947is derived from the statistics of the pixels at that direction
    19481948coordinate.  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);
     1949specified by \code{stats}.
     1950\begin{verbatim}
     1951psFloatArray *psImageSlice(psFloatArray *out, psImage *input, int x, int y, int nx, int ny,
     1952                           int direction, const psStats *stats);
    19541953\end{verbatim}
    19551954
     
    19621961statistics of the pixels interpolated along the perpendicular
    19631962direction.  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);
     1963specified by \code{stats}.
     1964\begin{verbatim}
     1965psFloatArray *psImageCut(psFloatArray *out, psImage *input, float xs, float ys, float xe, float ye,
     1966                         float dw, psStats *stats);
     1967\end{verbatim}
     1968
     1969Extract radial annuli data to a vector.  A vector is constructed where
     1970each vector elements is derived from the statistics of the pixels
     1971which land in one of a sequence of annuli.  The annuli are centered on
     1972the image pixel coordinate \code{x,y}, and have width \code{dr}.  The
     1973number of annuli is $radius / dr$.  The statistic used to derive the
     1974output vector value is specified by \code{stats}
     1975\begin{verbatim}
     1976psFloatArray *psImageRadialCut(psFloatArray *out, psImage *input, float x, float y, float radius, float dr,
     1977                               psStats *stats);
    19821978\end{verbatim}
    19831979
     
    19891985input image pixels.  Each pixel in the output image is derived from
    19901986the statistics of the corresponding set of input image pixels based on
    1991 the statistics specified by \code{psStats stats}.
     1987the statistics specified by \code{stats}.
    19921988\begin{verbatim}
    19931989psImage *psImageRebin(psImage *out, psImage *input, float scale, psStats *stats);
     
    20242020
    20252021Determine statistics for image (or subimage).  The statistics to be
    2026 determined are specified by \code{psStats stats}.
     2022determined are specified by \code{stats}.
    20272023\begin{verbatim}
    20282024psStats *psImageGetStats(psImage *input, psStats *stats);
     
    20672063one-dimensional.
    20682064\begin{verbatim}
    2069 psImage *psImageReadSection(psImage *output,
    2070                             int x, int y, int nx, int ny, int z,
     2065psImage *psImageReadSection(psImage *output, int x, int y, int nx, int ny, int z,
    20712066                            char *extname, int extnum, char *filename);
    20722067\end{verbatim}
     
    20762071\code{psImageReadSection}.
    20772072\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);
     2073psImage *psImageFReadSection(psImage *output, int x, int y, int nx, int ny, int z,
     2074                             char *extname, int extnum, FILE *f);
    20822075\end{verbatim}
    20832076\tbd{The use of \code{FILE*} to carry around the file descriptor is to be reviewed.}
     
    20902083created.
    20912084\begin{verbatim}
    2092 psImage *psImageWriteSection(psImage *input,
    2093                              int x, int y, int z,
     2085psImage *psImageWriteSection(psImage *input, int x, int y, int z,
    20942086                             char *extname, int extnum, char *filename);
    20952087\end{verbatim}
     
    20972089Write an image section to file descriptor as above:
    20982090\begin{verbatim}
    2099 psImage *psImageFWriteSection(psImage *input,
    2100                               int x, int y, int z,
     2091psImage *psImageFWriteSection(psImage *input, int x, int y, int z,
    21012092                              char *extname, int extnum, FILE *f);
    21022093\end{verbatim}
     
    21572148
    21582149\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}
     2150psType *psBinaryOp (void *out, void *in1, char *op, void *in2);
     2151psType *psUnaryOp (void *out, void *in, char *op);
     2152\end{verbatim}
     2153These functions determine the type of the operands on the basis of
     2154their \code{psType} elements, which always are the first elements.
     2155Note that these functions return a pointer to the appropriate type for
     2156the operation.  Since the result may is cast to \code{psType}, the
     2157resulting type may be determined by examining the return value.  It is
     2158expected that the implementation of these functions will employ
     2159pre-processor macros to perform the onerous task of creating the
     2160loops.  Also note that \code{psVectors} is equivalent to
     2161\code{psFloatArray}.
    22312162
    22322163Binary operations between an image and a vector have a potential
Note: See TracChangeset for help on using the changeset viewer.