IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 4253


Ignore:
Timestamp:
Jun 14, 2005, 2:30:28 PM (21 years ago)
Author:
eugene
Message:

added psImageMask/KeepRegion/Circle, psRegionForSquare

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

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

    r4252 r4253  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.139 2005-06-14 20:28:53 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.140 2005-06-15 00:30:28 eugene Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    710710  appropriate.  Noted that metadata functions must copy strings in to
    711711  a \code{psMetadataItem}.
    712 \end{itemize}
     712\item added psRegionForSquare
     713\item added psImageMaskRegion, psImageKeepRegion
     714\item added psImageMaskCircle, psImageKeepCircle
     715\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r4252 r4253  
    1 %%% $Id: psLibSDRS.tex,v 1.281 2005-06-14 20:28:53 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.282 2005-06-15 00:30:28 eugene Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    32123212for the bounds of a specific image with \code{psRegionForImage}.  The
    32133213output of this function is a region with negative upper limits
    3214 replaced by their corrected value appropriate to the given image.
     3214replaced by their corrected value appropriate to the given image.  In
     3215addition, the lower and upper limits are forced to lie within the
     3216bounds of the image.  If the lower-limit coordinates are less than the
     3217lower bound of the image, they are limited to the lower bound of the
     3218image.  Conversely, if the upper-limit coordinates are greater than
     3219the upper bound of the image, they are truncated to define only valid
     3220pixels.  If the lower-limit coordinates are greater than the upper
     3221bounds of the image, or the upper-limit coorindates are less than the
     3222lower bounds of the image, the coordinates should saturate on those
     3223limits.  The output of this function is always a valid region, though
     3224it may define an area of 0 pixels.
     3225
     3226
     3227\begin{prototype}
     3228psRegion psRegionForSquare(double x, double y, double radius);
     3229\end{prototype}
     3230This utility function defines a \code{psRegion} corresponding to the
     3231square with center at coordinate \code{x,y} and with code{radius}.
     3232The width of the square is thus \code{2radius + 1}.
    32153233
    32163234\pagebreak
     
    49414959\code{NULL}.
    49424960
     4961\begin{prototype}
     4962void psImageMaskRegion (psImage *image, psRegion region, bool logical_and, int maskValue);
     4963void psImageKeepRegion (psImage *image, psRegion region, bool logical_and, int maskValue);
     4964\end{prototype
     4965
     4966These two complementary functions set bit specified bits
     4967(\code{maskValue}) in the mask \code{image} interior to or exterior to
     4968the specified \code{region}.  The first function,
     4969\code{psImageMaskRegion}, sets the bits inside the region, ignoring
     4970pixels outside.  The second, \code{psImageKeepRegion}, sets the bits
     4971outside the region, ignoring pixels inside.  The pixel values are set
     4972by combining the existing pixel value and the given \code{maskValue}
     4973with a logical \code{and} if \code{logical_and} is set, otherwise it
     4974uses a logical \code{or}.
     4975
     4976\begin{prototype}
     4977void psImageMaskCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue);
     4978void psImageKeepCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue);
     4979\end{prototype}
     4980
     4981These two complementary functions set bit specified bits
     4982(\code{maskValue}) in the mask \code{image} interior to or exterior to
     4983the specified circle, defined by the center coordinates \code{x,y} and
     4984a \code{radius}.  The first function, \code{psImageMaskCircle}, sets
     4985the bits inside the circle, ignoring pixels outside.  The second,
     4986\code{psImageKeepCircle}, sets the bits outside the circle, ignoring
     4987pixels inside.  The pixel values are set by combining the existing
     4988pixel value and the given \code{maskValue} with a logical \code{and}
     4989if \code{logical_and} is set, otherwise it uses a logical \code{or}.
     4990
    49434991%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    49444992
Note: See TracChangeset for help on using the changeset viewer.