IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3744


Ignore:
Timestamp:
Apr 21, 2005, 1:48:57 PM (21 years ago)
Author:
Paul Price
Message:

Updated psPixels, following bug 371

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

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

    r3734 r3744  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.86 2005-04-21 03:26:00 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.87 2005-04-21 23:48:56 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    537537 
    538538\item Add \code{PS_META_TIME} to \code{psMetadataType}
    539 \item Changed \code{psPixels} to \code{psArray}s of \code{psPixelCoord}.
    540 \end{itemize}
     539\item Changed \code{psPixels} to vector-like array of \code{psPixelCoord}.
     540\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r3734 r3744  
    1 %%% $Id: psLibSDRS.tex,v 1.203 2005-04-21 03:26:00 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.204 2005-04-21 23:48:57 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    28572857psImage *psImageTransform(psImage *output, psArray **blankPixels, const psImage *input,
    28582858                          const psImage *inputMask, int inputMaskVal, const psPlaneTransform *outToIn,
    2859                           const psRegion *region, const psArray *pixels, psImageInterpolateMode mode,
     2859                          const psRegion *region, const psPixels *pixels, psImageInterpolateMode mode,
    28602860                          double exposedValue);
    28612861\end{verbatim}
     
    28822882image does not correspond to a pixel in the input image (or all
    28832883appropriate pixels in the input image are masked), the value shall be
    2884 set to \code{exposed}, and the appropriate \code{psPixelCoord} added
    2885 to the array of \code{blankPixels} for return to the user.  This
    2886 function 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}.
     2884set to \code{exposed}, and the pixel added to the appropriate list of
     2885pixels (\code{psPixels}) in the array of \code{blankPixels} for return
     2886to the user.  This function must be capable of handling the following
     2887types for the \code{input} (with corresponding types for the
     2888\code{output}): \code{psF32}, \code{psF64}.
    28892889
    28902890
     
    30533053    int y;                      // y coordinate
    30543054} psPixelCoord;
    3055 \end{verbatim}
    3056 
    3057 \begin{verbatim}
    3058 psImage *psPixelsToMask(psImage *out, const psArray *pixels, const psRegion *region, unsigned int maskVal);
    3059 psArray *psMaskToPixels(psArray *out, const psImage *mask, unsigned int maskVal);
     3055
     3056typedef struct {
     3057    int n;                      // Number in use
     3058    const int nalloc;           // Number allocated
     3059    psPixelCoord *data;         // The pixel coordinates
     3060} psPixels;
     3061\end{verbatim}
     3062
     3063\begin{verbatim}
     3064psImage *psPixelsToMask(psImage *out, const psPixels *pixels, const psRegion *region, unsigned int maskVal);
     3065psPixels *psMaskToPixels(psPixels *out, const psImage *mask, unsigned int maskVal);
    30603066\end{verbatim}
    30613067
    30623068\code{psPixelsToMask} shall return an image of type U8 with the
    3063 \code{pixels} (being a \code{psArray} of \code{psPixelCoord}s) lying
    3064 within the specified \code{region} set to the \code{maskVal}.  The
    3065 \code{out} image shall be modified if supplied, or allocated and
    3066 returned 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
    3069 event that either of \code{pixels} or \code{region} are \code{NULL},
    3070 the 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}
    3074 that match the \code{maskVal}.  The \code{out} pixel list shall be
    3075 modified if supplied, or allocated and returned if \code{NULL}.  In
    3076 hte event that \code{mask} is \code{NULL}, the function shall generate
    3077 an error and return \code{NULL}.
    3078 
    3079 \begin{verbatim}
    3080 psArray *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}.
    3085 In the event that \code{out} is \code{NULL}, a new \code{psArray}
    3086 shall be allocated, and the contents of \code{pixels} simply copied
    3087 in.  If \code{pixels} is \code{NULL}, the function shall generate an
    3088 error and return \code{NULL}.  The function shall take care to ensure
    3089 that there are no duplicate pixels in \code{out} (since the order in
    3090 which the pixels are stored is not important, the values may be
    3091 sorted, allowing the use of a faster algorithm than a linear scan).
     3069\code{pixels} lying within the specified \code{region} set to the
     3070\code{maskVal}.  The \code{out} image shall be modified if supplied,
     3071or allocated and returned if \code{NULL}.  The size of the output
     3072image shall be \code{region->x1 - region->x0} by \code{region->y1 -
     3073region->y0}, with \code{out->x0 = region->x0} and \code{out->y0 =
     3074region->y0}.  In the event that either of \code{pixels} or
     3075\code{region} are \code{NULL}, the function shall generate an error
     3076and return \code{NULL}.
     3077
     3078\code{psMaskToPixels} shall return a \code{psPixels} containing the
     3079coordinates in the \code{mask} that match the \code{maskVal}.  The
     3080\code{out} pixel list shall be modified if supplied, or allocated and
     3081returned if \code{NULL}.  In hte event that \code{mask} is
     3082\code{NULL}, the function shall generate an error and return
     3083\code{NULL}.
     3084
     3085\begin{verbatim}
     3086psPixels *psPixelsConcatenate(psPixels *out, const psPixels *pixels);
     3087\end{verbatim}
     3088
     3089\code{psPixelsConcatenate} shall concatenate the \code{pixels} onto
     3090\code{out}.  In the event that \code{out} is \code{NULL}, a new
     3091\code{psPixels} shall be allocated, and the contents of \code{pixels}
     3092simply copied in.  If \code{pixels} is \code{NULL}, the function shall
     3093generate an error and return \code{NULL}.  The function shall take
     3094care to ensure that there are no duplicate pixels in \code{out} (since
     3095the order in which the pixels are stored is not important, the values
     3096may be sorted, allowing the use of a faster algorithm than a linear
     3097scan).
    30923098
    30933099%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    51435149
    51445150\begin{verbatim}
    5145 psArray *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
     5151psPixels *psPixelsTransform(psPixels *out, const psPixels *input, const psPlaneTransform *inToOut);
     5152\end{verbatim}
     5153
     5154\code{psPixelsTransform} shall generate a list of pixels in the output
     5155coordinate frame that overlap the \code{input} pixels in the input
    51515156coordinate frame through the specified transformation, \code{inToOut}.
    51525157Note that this is more complicated than simply transforming the
Note: See TracChangeset for help on using the changeset viewer.