IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1633


Ignore:
Timestamp:
Aug 26, 2004, 1:46:39 PM (22 years ago)
Author:
Paul Price
Message:

Updated psImageCut to exclude the width of the cut: just want a cut
through the data: no need to integrate perpendicular to the cut.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psImage.h

    r1585 r1633  
    8080/** Direction in which to cut */
    8181typedef enum {
    82     PS_CUT_X_POS,                       ///< Cut in positive x direction
    83     PS_CUT_X_NEG,                       ///< Cut in negative x direction
    84     PS_CUT_Y_POS,                       ///< Cut in positive y direction
    85     PS_CUT_Y_NEG                        ///< Cut in negative y direction
     82    PS_CUT_X_POS,                     ///< Cut in positive x direction
     83    PS_CUT_X_NEG,                     ///< Cut in negative x direction
     84    PS_CUT_Y_POS,                     ///< Cut in positive y direction
     85    PS_CUT_Y_NEG                      ///< Cut in negative y direction
    8686} psImageCutDirection;
    8787
     
    8989psVector *
    9090psImageSlice(psVector *out,             ///< Vector to output, or NULL
    91              psVector *coords,          ///< Returned coordinates along the slice, or NULL
    9291             const psImage *input,      ///< Input image
    9392             const psImage *mask,       ///< Ignore those pixels where mask & maskVal == 1.  May be NULL
    9493             unsigned int maskVal,      ///< Value in mask to ignore
    95              unsigned int x,            ///< starting x coord of region to slice
    96              unsigned int y,            ///< starting y coord of region to slice
    97              unsigned int nx,           ///< length of region in x
    98              unsigned int ny,           ///< length of region in y
     94             unsigned int x,            ///< starting x coord of region to slice
     95             unsigned int y,            ///< starting y coord of region to slice
     96             unsigned int nx,           ///< length of region in x
     97             unsigned int ny,           ///< length of region in y
    9998             psImageCutDirection direction, ///< Direction in which to cut
    100              const psStats *stats       ///< defines statistics used to find output values
     99             const psStats *stats       ///< defines statistics used to find output values
    101100    );
    102101
     
    111110           float xe,                    ///< ending x coord of cut
    112111           float ye,                    ///< ending y coord of cut
    113            float dw,                    ///< width of cut
    114            const psStats *stats)        ///< defines statistics used to find output values
    115 ;
     112           unsigned int nSamples,       ///< Number of samples along the slice
     113           psImageInterpolateMode mode  ///< defines statistics used to find output values
     114           );
    116115
    117116/// Extract radial annulii data to a vector.
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r1620 r1633  
    252252\item Added function \code{psTimeLeapSeconds} to calculate number of
    253253  leap seconds between two dates, required for time arithmetic.
     254\item Changed \code{psImageCut} to do a slice through the data in an
     255  arbitrary direction, instead of merging the data along a particular
     256  dimension.
    254257\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r1632 r1633  
    1 %%% $Id: psLibSDRS.tex,v 1.86 2004-08-26 21:43:50 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.87 2004-08-26 23:46:13 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    23412341\begin{verbatim}
    23422342typedef enum {
    2343     PS_CUT_X_POS,
    2344     PS_CUT_X_NEG,
    2345     PS_CUT_Y_POS,
    2346     PS_CUT_Y_NEG
     2343    PS_CUT_X_POS,                     ///< Cut in positive x direction
     2344    PS_CUT_X_NEG,                     ///< Cut in negative x direction
     2345    PS_CUT_Y_POS,                     ///< Cut in positive y direction
     2346    PS_CUT_Y_NEG                      ///< Cut in negative y direction
    23472347} psImageCutDirection;
    23482348
    2349 psVector *psImageSlice(psVector *out, 
     2349psVector *psImageSlice(psVector *out,
    23502350                       psVector *coords,
    2351                        const psImage *input, 
    2352                        const psImage *mask, 
     2351                       const psImage *input,
     2352                       const psImage *mask,
    23532353                       unsigned int maskVal,
    2354                        unsigned int x, 
    2355                        unsigned int y,
    2356                        unsigned int nx,
    2357                        unsigned int ny,
    2358                        psImageCutDirection direction, 
    2359                        const psStats *stats);
     2354                       unsigned int x,
     2355                       unsigned int y,
     2356                       unsigned int nx,
     2357                       unsigned int ny,
     2358                       psImageCutDirection direction,
     2359                       const psStats *stats);
    23602360\end{verbatim}
    23612361Extract pixels from rectlinear region to a vector (array of floats).
     
    23752375\begin{verbatim}
    23762376psVector *psImageCut(psVector *out, const psImage *input,
    2377                      const psImage *mask,
    2378                      unsigned int maskVal,
     2377                     const psImage *mask, unsigned int maskVal,
    23792378                     float xs, float ys, float xe, float ye,
    2380                      float dw, const psStats *stats);
    2381 \end{verbatim}
    2382 Extract pixels from an image along a line to a vector (array of
    2383 floats).  The vector \code{(xs,ys)} - \code{(xe,ye)} forms the basis
    2384 of the output vector.  Pixels are considered in a rectangular region
    2385 of width \code{dw} about this vector.  The input region is collapsed
    2386 in the perpendicular direction, and each element of the output vector
    2387 represents pixel-sized boxes, where the value is derived from the
    2388 statistics of the pixels interpolated along the perpendicular
    2389 direction.  The specific algorithm which must be used is described in
    2390 the PSLib ADD (PSDC-430-006).  The statistic used to derive the output
    2391 vector value is specified by \code{stats}.  Only one of the statistics
    2392 choices may be specified, otherwise the function must return an error.
    2393 The \code{mask} and \code{maskVal} entries are passed to the psLib
    2394 statistics function used to calculate the ensemble statistics.  This
    2395 function must be defined for the following types: \code{psS8},
    2396 \code{psU16}, \code{psF32}, \code{psF64}
     2379                     unsigned int nSamples, psImageInterpolateMode mode);
     2380\end{verbatim}
     2381Extract pixels along a line segment, \code{(xs,ys)} to \code{(xe,ye)},
     2382on the image to a vector (array of the appropriate data type).  The
     2383line segment is sampled \code{nSamples} times, hence the output vector
     2384contains \code{nSamples} elements.  The interpolation method used to
     2385derive the output vector value at each sample along the line segment
     2386is specified by \code{mode}.  If the \code{mask} is non-\code{NULL},
     2387then pixels for which the corresponding mask value is \code{maskVal}
     2388are not included in the interpolation.  This function must be defined
     2389for the following types: \code{psS8}, \code{psU16}, \code{psF32},
     2390\code{psF64}.
    23972391
    23982392\begin{verbatim}
Note: See TracChangeset for help on using the changeset viewer.