IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2005, 9:12:01 AM (21 years ago)
Author:
desonia
Message:

massive restructuring of codebase.

File:
1 edited

Legend:

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

    r4392 r4540  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2005-06-25 02:02:05 $
     7 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2005-07-12 19:12:01 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6565    result->image = psImageAlloc(numCols,numRows,PS_TYPE_KERNEL);
    6666    memset(result->image->rawDataBuffer,0,numCols*numRows*PSELEMTYPE_SIZEOF(PS_TYPE_KERNEL));
    67     result->p_kernelRows = psAlloc(sizeof(psKernelType*)*numRows);
    68 
    69     psKernelType** kernelRows = result->p_kernelRows;
    70     psKernelType** imageRows = result->image->data.PS_TYPE_KERNEL_DATA;
     67    result->p_kernelRows = psAlloc(sizeof(float*)*numRows);
     68
     69    float** kernelRows = result->p_kernelRows;
     70    float** imageRows = result->image->data.PS_TYPE_KERNEL_DATA;
    7171    for (psS32 i = 0; i < numRows; i++) {
    7272        kernelRows[i] = imageRows[i] - xMin;
     
    103103    psS32 yMax = 0;
    104104    psS32 length = 0;
    105     psKernelType normalizeTime = 1.0;  // fraction of total time for each shift clock
     105    float normalizeTime = 1.0;  // fraction of total time for each shift clock
    106106    psKernel* result = NULL;
    107     psKernelType** kernel = NULL;
     107    float** kernel = NULL;
    108108
    109109    // got non-NULL vectors?
     
    170170        } \
    171171        \
    172         normalizeTime = 1.0 / (psKernelType)(tShiftData[length-1]); \
     172        normalizeTime = 1.0 / (float)(tShiftData[length-1]); \
    173173        result = psKernelAlloc(xMin,xMax,yMin,yMax); \
    174174        kernel = result->kernel; \
     
    180180            y = lastY - yShiftData[i]; \
    181181            \
    182             kernel[y][x] += (psKernelType)t / (psKernelType)lastT; \
     182            kernel[y][x] += (float)t / (float)lastT; \
    183183            prevT = tShiftData[i]; \
    184184        } \
     
    216216        kernel = result->kernel; \
    217217        \
    218         normalizeTime = 1.0 / (psKernelType)t; \
     218        normalizeTime = 1.0 / (float)t; \
    219219        x = 0; \
    220220        y = 0; \
    221221        for (psS32 i = length-1; i >= 0; i--) { \
    222             kernel[y][x] += (psKernelType)(tShiftData[i]) * normalizeTime; \
     222            kernel[y][x] += (float)(tShiftData[i]) * normalizeTime; \
    223223            x -= xShiftData[i]; \
    224224            y -= yShiftData[i]; \
     
    296296    psS32 yMin = kernel->yMin;
    297297    psS32 yMax = kernel->yMax;
    298     psKernelType** kData = kernel->kernel;
     298    float** kData = kernel->kernel;
    299299
    300300    // make the output image to the proper size and type
     
    399399        // pad the kernel to the same size of paddedImage
    400400        psImage* paddedKernel = psImageAlloc(paddedCols,paddedRows,PS_TYPE_KERNEL);
    401         memset(paddedKernel->data.U8[0],0,sizeof(psKernelType)*numCols*numRows); // zero-out image
     401        memset(paddedKernel->data.U8[0],0,sizeof(float)*numCols*numRows); // zero-out image
    402402        psS32 yMax = kernel->yMax;
    403403        psS32 xMax = kernel->xMax;
     
    407407                padRow += paddedRows;
    408408            }
    409             psKernelType* padData = paddedKernel->data.PS_TYPE_KERNEL_DATA[padRow];
    410             psKernelType* kernelRow = kernel->kernel[row];
     409            float* padData = paddedKernel->data.PS_TYPE_KERNEL_DATA[padRow];
     410            float* kernelRow = kernel->kernel[row];
    411411            for (psS32 col = kernel->xMin; col <= xMax; col++) {
    412412                if (col < 0) {
Note: See TracChangeset for help on using the changeset viewer.