IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 20, 2005, 5:30:12 PM (21 years ago)
Author:
Paul Price
Message:

Changed psPixels to psArrays of psPixelCoord

File:
1 edited

Legend:

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

    r3686 r3734  
    1 %%% $Id: psLibSDRS.tex,v 1.202 2005-04-08 19:53:30 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.203 2005-04-21 03:26:00 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    28552855
    28562856\begin{verbatim}
    2857 psImage *psImageTransform(psImage *output, psPixels **blankPixels, const psImage *input,
     2857psImage *psImageTransform(psImage *output, psArray **blankPixels, const psImage *input,
    28582858                          const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn,
    2859                           const psRegion *region, const psPixels *pixels, psImageInterpolateMode mode,
     2859                          const psRegion *region, const psArray *pixels, psImageInterpolateMode mode,
    28602860                          double exposedValue);
    28612861\end{verbatim}
     
    28752875in the output image --- note that this is the reverse of what might be
    28762876naively expected, but it is what is required in order to use
    2877 \code{psImagePixelInterpolate}.  If \code{pixels} is non-\code{NULL},
    2878 then only those pixels in the output image are transformed; otherwise,
    2879 the entire image is generated.  The interpolation is performed using
    2880 the specified interpolation \code{mode}.  Where a pixel in the output
     2877\code{psImagePixelInterpolate}.  If the \code{pixels} array is
     2878non-\code{NULL}, it shall consist of \code{psPixelCoord}s, and only
     2879those pixels in the output image shall be transformed; otherwise, the
     2880entire image is generated.  The interpolation is performed using the
     2881specified interpolation \code{mode}.  Where a pixel in the output
    28812882image does not correspond to a pixel in the input image (or all
    28822883appropriate pixels in the input image are masked), the value shall be
    2883 set to \code{exposed}, and the pixel added to the list of
    2884 \code{blankPixels} for return to the user.  This function must be
    2885 capable of handling the following types for the \code{input} (with
    2886 corresponding types for the \code{output}): \code{psF32},
    2887 \code{psF64}.
     2884set to \code{exposed}, and the appropriate \code{psPixelCoord} added
     2885to the array of \code{blankPixels} for return to the user.  This
     2886function must be capable of handling the following types for the
     2887\code{input} (with corresponding types for the \code{output}):
     2888\code{psF32}, \code{psF64}.
    28882889
    28892890
     
    30493050\begin{verbatim}
    30503051typedef struct {
    3051     psVector *x;                        // x coordinate
    3052     psVector *y;                        // y coordinate
    3053 } psPixels;
    3054 \end{verbatim}
    3055 
    3056 Of course, the size of each of the vectors should match.  In the event
    3057 that they do not match, any function which detects the problem shall
    3058 generate a warning and use the size of the shorter of the vectors as
    3059 the size.  The order in which the pixels are kept is not considered
    3060 important.
    3061 
    3062 \begin{verbatim}
    3063 psImage *psPixelsToMask(psImage *out, const psPixels *pixels, const psRegion *region, unsigned int maskVal);
    3064 psPixels *psMaskToPixels(psPixels *out, const psImage *mask, unsigned int maskVal);
     3052    int x;                      // x coordinate
     3053    int y;                      // y coordinate
     3054} psPixelCoord;
     3055\end{verbatim}
     3056
     3057\begin{verbatim}
     3058psImage *psPixelsToMask(psImage *out, const psArray *pixels, const psRegion *region, unsigned int maskVal);
     3059psArray *psMaskToPixels(psArray *out, const psImage *mask, unsigned int maskVal);
    30653060\end{verbatim}
    30663061
    30673062\code{psPixelsToMask} shall return an image of type U8 with the
    3068 \code{pixels} lying within the specified \code{region} set to the
    3069 \code{maskVal}.  The \code{out} image shall be modified if supplied,
    3070 or allocated and returned if \code{NULL}.  The size of the output
    3071 image shall be \code{region->x1 - region->x0} by \code{region->y1 -
    3072 region->y0}, with \code{out->x0 = region->x0} and \code{out->y0 =
    3073 region->y0}.  In the event that either of \code{pixels} or
    3074 \code{region} are \code{NULL}, the function shall generate an error
    3075 and return \code{NULL}.
    3076 
    3077 \code{psMaskToPixels} shall return a \code{psPixels} consisting of the
    3078 coordinates in the \code{mask} that match the \code{maskVal}.  The
    3079 \code{out} pixel list shall be modified if supplied, or allocated and
    3080 returned if \code{NULL}.  In hte event that \code{mask} is
    3081 \code{NULL}, the function shall generate an error and return
    3082 \code{NULL}.
    3083 
    3084 \begin{verbatim}
    3085 psPixels *psPixelsConcatenate(psPixels *out, const psPixels *pixels);
    3086 \end{verbatim}
    3087 
    3088 \code{psPixelsConcatenate} shall concatenate \code{pixels} onto
    3089 \code{out}.  In the event that \code{out} is \code{NULL}, a new
    3090 \code{psPixels} shall be allocated, and the contents of \code{pixels}
    3091 simply copied in.  If \code{pixels} is \code{NULL}, the function shall
    3092 generate an error and return \code{NULL}.  The function shall take
    3093 care to ensure that there are no duplicate pixels in \code{out} (since
    3094 the order in which the pixels are stored is not important, the values
    3095 may be sorted, allowing the use of a faster algorithm than a linear
    3096 scan).
     3063\code{pixels} (being a \code{psArray} of \code{psPixelCoord}s) lying
     3064within the specified \code{region} set to the \code{maskVal}.  The
     3065\code{out} image shall be modified if supplied, or allocated and
     3066returned if \code{NULL}.  The size of the output image shall be
     3067\code{region->x1 - region->x0} by \code{region->y1 - region->y0}, with
     3068\code{out->x0 = region->x0} and \code{out->y0 = region->y0}.  In the
     3069event that either of \code{pixels} or \code{region} are \code{NULL},
     3070the function shall generate an error and return \code{NULL}.
     3071
     3072\code{psMaskToPixels} shall return a \code{psArray} containing one
     3073\code{psPixelCoord} for each of the coordinates in the \code{mask}
     3074that match the \code{maskVal}.  The \code{out} pixel list shall be
     3075modified if supplied, or allocated and returned if \code{NULL}.  In
     3076hte event that \code{mask} is \code{NULL}, the function shall generate
     3077an error and return \code{NULL}.
     3078
     3079\begin{verbatim}
     3080psArray *psPixelsConcatenate(psArray *out, const psArray *pixels);
     3081\end{verbatim}
     3082
     3083\code{psPixelsConcatenate} shall concatenate the array of
     3084\code{pixels} (consisting of \code{psPixelCoord}s) onto \code{out}.
     3085In the event that \code{out} is \code{NULL}, a new \code{psArray}
     3086shall be allocated, and the contents of \code{pixels} simply copied
     3087in.  If \code{pixels} is \code{NULL}, the function shall generate an
     3088error and return \code{NULL}.  The function shall take care to ensure
     3089that there are no duplicate pixels in \code{out} (since the order in
     3090which the pixels are stored is not important, the values may be
     3091sorted, allowing the use of a faster algorithm than a linear scan).
    30973092
    30983093%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    51485143
    51495144\begin{verbatim}
    5150 psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
    5151 \end{verbatim}
    5152 
    5153 \code{psPixelsTransform} shall generate a list of pixels in the output
    5154 coordinate frame that overlap the \code{input} pixels in the input
     5145psArray *psPixelsTransform(psArray *out, const psArray *input, const psPlaneTransform *inToOut);
     5146\end{verbatim}
     5147
     5148\code{psPixelsTransform} shall generate an array of pixels
     5149(\code{psPixelCoord} in the output coordinate frame that overlap the
     5150\code{input} pixels (an array of \code{psPixelCoord}s) in the input
    51555151coordinate frame through the specified transformation, \code{inToOut}.
    51565152Note that this is more complicated than simply transforming the
Note: See TracChangeset for help on using the changeset viewer.