IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 30, 2005, 4:07:12 PM (21 years ago)
Author:
drobbin
Message:

Updated code w.r.t the latest api-delta report

Location:
trunk/psLib/src/imageops
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageConvolve.c

    r4898 r4920  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-08-30 01:14:13 $
     7 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-08-31 02:07:11 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    488488
    489489void psImageSmooth (psImage *image,
    490                     float sigma,
    491                     float Nsigma)
     490                    double sigma,
     491                    double Nsigma)
    492492{
    493493
    494494    int Nx, Ny, Npixel, Nrange;
    495     float factor, g, s;
     495    double factor, g, s;
    496496    psVector *temp;
    497497
     
    505505
    506506    // generate gaussian
    507     psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F32);
     507    psVector *gaussnorm = psVectorAlloc (Npixel, PS_TYPE_F64);
    508508    for (int i = -Nrange; i < Nrange + 1; i++) {
    509         gaussnorm->data.F32[i+Nrange] = exp (factor*i*i);
    510     }
    511     psF32 *gauss = &gaussnorm->data.F32[Nrange];
     509        gaussnorm->data.F64[i+Nrange] = exp (factor*i*i);
     510    }
     511    psF64 *gauss = &gaussnorm->data.F64[Nrange];
    512512
    513513    // smooth in X direction
    514     temp = psVectorAlloc (Nx, PS_TYPE_F32);
     514    temp = psVectorAlloc (Nx, PS_TYPE_F64);
    515515    for (int j = 0; j < Ny; j++) {
    516         psF32 *vi = image->data.F32[j];
    517         psF32 *vo = temp->data.F32;
     516        psF64 *vi = image->data.F64[j];
     517        psF64 *vo = temp->data.F64;
    518518        for (int i = 0; i < Nx; i++) {
    519519            g = s = 0;
     
    528528            vo[i] = s / g;
    529529        }
    530         memcpy (image->data.F32[j], temp->data.F32, Nx*sizeof(psF32));
     530        memcpy (image->data.F64[j], temp->data.F64, Nx*sizeof(psF64));
    531531    }
    532532    psFree (temp);
    533533
    534534    // smooth in Y direction
    535     temp = psVectorAlloc (image->numRows, PS_TYPE_F32);
     535    temp = psVectorAlloc (image->numRows, PS_TYPE_F64);
    536536    for (int i = 0; i < Nx; i++) {
    537         psF32  *vo = temp->data.F32;
    538         psF32 **vi = image->data.F32;
     537        psF64  *vo = temp->data.F64;
     538        psF64 **vi = image->data.F64;
    539539        for (int j = 0; j < Ny; j++) {
    540540            g = s = 0;
  • trunk/psLib/src/imageops/psImageConvolve.h

    r4898 r4920  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-08-30 01:14:13 $
     9 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-08-31 02:07:11 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    144144void psImageSmooth(
    145145    psImage *image,                    ///< the image to be smoothed
    146     float sigma,                       ///< the width of the smoothing kernel in pixels
    147     float Nsigma                       ///< the size of the smoothing box in sigmas
     146    double  sigma,                     ///< the width of the smoothing kernel in pixels
     147    double  Nsigma                     ///< the size of the smoothing box in sigmas
    148148);
    149149
  • trunk/psLib/src/imageops/psImageGeomManip.c

    r4608 r4920  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-07-25 20:49:04 $
     12 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-08-31 02:07:11 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    305305                       const psImage* input,
    306306                       float angle,
    307                        complex exposed,
     307                       complex double exposed,
    308308                       psImageInterpolateMode mode)
    309309{
     
    597597                      float dx,
    598598                      float dy,
    599                       complex exposed,
     599                      complex double exposed,
    600600                      psImageInterpolateMode mode)
    601601{
  • trunk/psLib/src/imageops/psImageGeomManip.h

    r4608 r4920  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-07-25 20:49:04 $
     10 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-08-31 02:07:11 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7777    const psImage* input,              ///< input image
    7878    float angle,                       ///< the rotation angle in radians.
    79     complex exposed,                   ///< the output image pixel values for non-imagery areas
     79    complex double exposed,            ///< the output image pixel values for non-imagery areas
    8080    psImageInterpolateMode mode        ///< the interpolation mode used
    8181);
     
    9797    float dx,                          ///< the shift in x direction.
    9898    float dy,                          ///< the shift in y direction.
    99     complex exposed,                   ///< the output image pixel values for non-imagery areas
     99    complex double exposed,            ///< the output image pixel values for non-imagery areas
    100100    psImageInterpolateMode mode        ///< the interpolation mode to use
    101101);
     
    151151    psRegion region,                   ///< the size of the transformed image
    152152    const psPixels* pixels,            /**< if not NULL, consists of psPixelCoords and specifies which pixels in
    153                                                                  *  output image shall be transformed; otherwise, entire image generated*/
     153                                                                     *  output image shall be transformed; otherwise, entire image generated*/
    154154    psImageInterpolateMode mode,       ///< the interpolation scheme to be used
    155155    double exposedValue                   ///< Exposed value to which non-corresponding pixels are set
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r4815 r4920  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2005-08-18 21:44:40 $
     12 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2005-08-31 02:07:11 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    311311
    312312int psImageClipComplexRegion(psImage* input,
    313                              complex min,
    314                              complex vmin,
    315                              complex max,
    316                              complex vmax)
     313                             complex double min,
     314                             complex double vmin,
     315                             complex double max,
     316                             complex double vmax)
    317317{
    318318    psS32 numClipped = 0;
     
    401401                       psRegion *region,
    402402                       bool logical_and,
    403                        int maskValue)
     403                       psMaskType maskValue)
    404404{
    405405
     
    428428                       psRegion *region,
    429429                       bool logical_and,
    430                        int maskValue)
     430                       psMaskType maskValue)
    431431{
    432432
     
    459459                       double radius,
    460460                       bool logical_and,
    461                        int maskValue)
     461                       psMaskType maskValue)
    462462{
    463463
     
    489489                       double radius,
    490490                       bool logical_and,
    491                        int maskValue)
     491                       psMaskType maskValue)
    492492{
    493493
  • trunk/psLib/src/imageops/psImagePixelManip.h

    r4815 r4920  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2005-08-18 21:44:40 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2005-08-31 02:07:11 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151int psImageClipComplexRegion(
    5252    psImage* input,                    ///< the image to clip
    53     complex min,                       ///< the minimum image value allowed
    54     complex vmin,                      ///< the value pixels < min are set to
    55     complex max,                       ///< the maximum image value allowed
    56     complex vmax                       ///< the value pixels > max are set to
     53    complex double min,                       ///< the minimum image value allowed
     54    complex double vmin,                      ///< the value pixels < min are set to
     55    complex double max,                       ///< the maximum image value allowed
     56    complex double vmax                       ///< the value pixels > max are set to
    5757);
    5858
     
    9696    psRegion *region,                  ///< the specified region
    9797    bool logical_and,                  ///< the logical operation
    98     int maskValue                      ///< the specified bits
     98    psMaskType maskValue               ///< the specified bits
    9999);
    100100
     
    108108    psRegion *region,                  ///< the specified region
    109109    bool logical_and,                  ///< the logical operation
    110     int maskValue                      ///< the specified bits
     110    psMaskType maskValue               ///< the specified bits
    111111);
    112112
     
    122122    double radius,                     ///< the radius of the specified circle
    123123    bool logical_and,                  ///< the logical operation
    124     int maskValue                      ///< the specified bits
     124    psMaskType maskValue               ///< the specified bits
    125125);
    126126
     
    136136    double radius,                     ///< the radius of the specified circle
    137137    bool logical_and,                  ///< the logical operation
    138     int maskValue                      ///< the specified bits
     138    psMaskType maskValue               ///< the specified bits
    139139);
    140140
Note: See TracChangeset for help on using the changeset viewer.