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.1.1.1 $ $Name: $ 00011 * @date $Date: 2005/06/15 21:08:12 $ 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 psS32 The number of clipped pixels 00033 */ 00034 psS32 psImageClip( 00035 psImage* input, ///< the image to clip 00036 psF64 min, ///< the minimum image value allowed 00037 psF64 vmin, ///< the value pixels < min are set to 00038 psF64 max, ///< the maximum image value allowed 00039 psF64 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 psS32 The number of clipped pixels 00050 */ 00051 psS32 psImageClipComplexRegion( 00052 psImage* input, ///< the image to clip 00053 psC64 min, ///< the minimum image value allowed 00054 psC64 vmin, ///< the value pixels < min are set to 00055 psC64 max, ///< the maximum image value allowed 00056 psC64 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 psS32 The number of clipped pixels 00065 */ 00066 psS32 psImageClipNaN( 00067 psImage* input, ///< the image to clip 00068 psF64 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 psS32 0 if success, non-zero if failed. 00081 */ 00082 psS32 psImageOverlaySection( 00083 psImage* image, ///< target image 00084 const psImage* overlay, ///< the overlay image 00085 psS32 col0, ///< the column to start overlay 00086 psS32 row0, ///< 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
1.4.1