Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

psImageMaskOps.h

Go to the documentation of this file.
00001 /** @file  psImageMaskOps.h
00002  *
00003  *  @brief Contains basic image pixel manipulation operations, as
00004  *         specified in the PSLIB SDRS sections "Mask Operations"
00005  *
00006  *  @ingroup Image
00007  *
00008  *  @author David Robbins, MHPCC
00009  *
00010  *  @version $Revision: 1.1 $ $Name: rel12 $
00011  *  @date $Date: 2005/10/10 20:12:13 $
00012  *
00013  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00014  */
00015 #ifndef PS_IMAGE_MASK_OPS_H
00016 #define PS_IMAGE_MASK_OPS_H
00017 
00018 #include "psImage.h"
00019 #include "psCoord.h"
00020 #include "psStats.h"
00021 #include "psPixels.h"
00022 
00023 /// @addtogroup Image
00024 /// @{
00025 
00026 /** Sets the bits inside the region, ignoring pixels outside.
00027  *
00028  *  The pixels are set by combining the existing pixel value and the given maskValue
00029  *  with a logical operation.  The allowed operations are =, AND, OR, and XOR.
00030  */
00031 void psImageMaskRegion(
00032     psImage *image,                    ///< the image to set
00033     psRegion region,                   ///< the specified region
00034     const char *op,                    ///< the logical operation
00035     psMaskType maskValue               ///< the specified bits
00036 );
00037 
00038 /** Sets the bits outside the region, ignoring pixels inside.
00039  *
00040  *  The pixels are set by combining the existing pixel value and the given maskValue
00041  *  with a logical operation.  The allowed operations are =, AND, OR, and XOR.
00042  */
00043 void psImageKeepRegion(
00044     psImage *image,                    ///< the image to set
00045     psRegion region,                   ///< the specified region
00046     const char *op,                    ///< the logical operation
00047     psMaskType maskValue               ///< the specified bits
00048 );
00049 
00050 /** Sets the bits inside the circle, ignoring the pixels outside.
00051  *
00052  *  The pixel values are set by combining the existing pixel value and the given maskValue
00053  *  with a logical operation.  The allowed operations are =, AND, OR, and XOR.
00054  */
00055 void psImageMaskCircle(
00056     psImage *image,                    ///< the image to set
00057     double x,                          ///< the x coordinate of the circle's center
00058     double y,                          ///< the y coordinate of the circle's center
00059     double radius,                     ///< the radius of the specified circle
00060     const char *op,                    ///< the logical operation
00061     psMaskType maskValue               ///< the specified bits
00062 );
00063 
00064 /** Sets the bits outside the circle, ignoring the pixels inside.
00065  *
00066  *  The pixel values are set by combining the existing pixel value and the given maskValue
00067  *  with a logical operation.  The allowed operations are =, AND, OR, and XOR.
00068  */
00069 void psImageKeepCircle(
00070     psImage *image,                    ///< the image to set
00071     double x,                          ///< the x coordinate of the circle's center
00072     double y,                          ///< the y coordinate of the circle's center
00073     double radius,                     ///< the radius of the specified circle
00074     const char *op,                    ///< the logical operation
00075     psMaskType maskValue               ///< the specified bits
00076 );
00077 
00078 /** Grows the specified values on the imput mask image, in, returning the result.
00079  *
00080  *  If out is NULL, then a new image of the same type and dimension as in shall
00081  *  be allocated and returned; otherwise out shall be modified.  If out is non-
00082  *  NULL and does not have the same size and type as in, the function shall
00083  *  generate an error and return NULL.  Pixels in the in image within growSize
00084  *  pixels (either horizontal or vertical) of a pixel which matches the maskVal
00085  *  shall have the corresponding pixel in the out image set to the growVal.
00086  *
00087  *  @return psImage*:
00088  */
00089 psImage *psImageGrowMask(
00090     psImage *out,                      ///< the image to set and return
00091     const psImage *in,                 ///< the input to image
00092     psMaskType maskVal,                ///< the specified mask value
00093     unsigned int growSize,             ///< the range of values from maskVal
00094     psMaskType growVal                 ///< the output value to set
00095 );
00096 
00097 #endif // #ifndef PS_MASK_OPS_H

Generated on Mon Jul 3 14:13:44 2006 for Pan-STARRS Foundation Library by  doxygen 1.4.4