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

psImagePixelManip.h

Go to the documentation of this file.
00001 /** @file  psImagePixelManip.h
00002  *
00003  *  @brief Contains basic image pixel manipulation operations, as
00004  *         specified in the PSLIB SDRS sections "Image Pixel Manipulations"
00005  *
00006  *  @ingroup Image
00007  *
00008  *  @author Robert DeSonia, MHPCC
00009  *
00010  *  @version $Revision: 1.15 $ $Name: rel12 $
00011  *  @date $Date: 2006/01/28 01:12:11 $
00012  *
00013  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
00014  */
00015 #ifndef PS_IMAGE_PIXEL_MANIP_H
00016 #define PS_IMAGE_PIXEL_MANIP_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 /** Clip image values outside of range to given values
00027  *
00028  *  All pixels with values less than min are set to the value vmin.  all pixels
00029  *  with values greater than max are set to the value vmax. This function is
00030  *  defined for psU8, psU16, psS8, psS16, psF32, psF64, psC32, and psC64.
00031  *
00032  *  @return int     The number of clipped pixels
00033  */
00034 int psImageClip(
00035     psImage* input,                    ///< the image to clip
00036     double min,                        ///< the minimum image value allowed
00037     double vmin,                       ///< the value pixels < min are set to
00038     double max,                        ///< the maximum image value allowed
00039     double vmax                        ///< the value pixels > max are set to
00040 );
00041 
00042 /** Clip image values outside of a specified complex region
00043  *
00044  *  All pixels outside of the rectangular region in complex space formed by
00045  *  the min and max input parameters are set to the value vmax (if either
00046  *  the real or imaginary portion exceeds the respective max values), or vmin.
00047  *  This function is defined for psC32, and psC64 imagery only.
00048  *
00049  *  @return int     The number of clipped pixels
00050  */
00051 int psImageClipComplexRegion(
00052     psImage* input,                    ///< the image to clip
00053     double complex min,                ///< the minimum image value allowed
00054     double complex vmin,               ///< the value pixels < min are set to
00055     double complex max,                ///< the maximum image value allowed
00056     double complex vmax                ///< the value pixels > max are set to
00057 );
00058 
00059 /** Clip NaN image pixels to given value.
00060  *
00061  *  Pixels with NaN, +Inf, or -Inf values are set to the specified value. This
00062  *  function is defined for psF32, psF64, psC32, and psC64.
00063  *
00064  *  @return int     The number of clipped pixels
00065  */
00066 int psImageClipNaN(
00067     psImage* input,                    ///< the image to clip
00068     float value                        ///< the value to set all NaN/Inf values to
00069 );
00070 
00071 /** Overlay subregion of image with another image
00072  *
00073  *  Replace the pixels in the image which correspond to the pixels in OVERLAY
00074  *  with values derived from the IMAGE and OVERLAY based on the given operator
00075  *  OP.  Valid operators are "=" (set image value to OVERLAY value), "+" (add
00076  *  OVERLAY value to image value), "-" (subtract OVERLAY from image), "*"
00077  *  (multiply OVERLAY times image), "/" (divide image by OVERLAY).  This
00078  *  function is defined for psU8, psS8, psS16, psF32, psF64, psC32, and psC64.
00079  *
00080  *  @return int         0 if success, non-zero if failed.
00081  */
00082 int psImageOverlaySection(
00083     psImage* image,                    ///< target image
00084     const psImage* overlay,            ///< the overlay image
00085     int x0,                            ///< the column to start overlay
00086     int y0,                            ///< the row to start overlay
00087     const char *op                     ///< the operation to perform for overlay
00088 );
00089 
00090 #endif // #ifndef PS_IMAGE_PIXEL_MANIP_H

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