IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2006, 10:20:27 AM (20 years ago)
Author:
magnier
Message:

added test psImageShiftKernel and related p_psImageShiftKernel_F32; added PS_INTERPOLATE_GAUSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageGeomManip.h

    r7380 r9927  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-06-07 03:22:06 $
     10 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-11-09 20:20:27 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    100100    psImageInterpolateMode mode        ///< the interpolation mode to use
    101101);
     102
     103/** Shift image by an arbitrary number of pixels (dx,dy) in either direction.
     104 *
     105 *  If the shift values are fractional, the output pixel values should
     106 *  interpolate between the input pixel values. The output image has the same
     107 *  dimensions as the input image. Pixels which fall off the edge of the
     108 *  output image are lost. Newly exposed pixels are set to the value given by
     109 *  exposed. This function must be defined for the following types: psU8,
     110 *  psU16, psS8, psS16, psF32, psF64, psC32, psC64.
     111 *
     112 *  This implementation uses a NxN kernel generated based on the interpolation method
     113 *  the image is first shifted by a fractional amount with the kernel, then
     114 *  shifted in place by an integer amount.
     115 *
     116 *  XXX the integer shift portion is not implemented
     117 *  XXX the exposed pixels are not properly replaced
     118 *  XXX the algorithm can properly handle a mask, but the API does not include
     119 *  it (and it is not implemented)
     120 *
     121 *  @return psImage*     the shifted image result.
     122 */
     123psImage* psImageShiftKernel(
     124    psImage* out,                      ///< an psImage to recycle.  If NULL, a new image is created
     125    const psImage* input,              ///< input image
     126    float dx,                          ///< the shift in x direction.
     127    float dy,                          ///< the shift in y direction.
     128    psImageInterpolateMode mode        ///< the interpolation mode to use
     129);
     130
     131// XXX should this be global private or local static?
     132psImage *p_psImageShiftKernel_F32(
     133    psImage *out,
     134    const psImage *input,
     135    const psImage *kernel);
    102136
    103137/** Roll image by an integer number of pixels in either direction.
     
    151185    psRegion region,                   ///< the size of the transformed image
    152186    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies
    153                                                 * which pixels in output image shall be transformed;
    154                                                 * otherwise, entire image generated*/
     187                                                    * which pixels in output image shall be transformed;
     188                                                    * otherwise, entire image generated*/
    155189    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    156190    double exposedValue                ///< Exposed value to which non-corresponding pixels are set
Note: See TracChangeset for help on using the changeset viewer.