IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 5, 2005, 3:12:58 PM (21 years ago)
Author:
desonia
Message:

Removed PS_TYPE_PTR from psElemType, as per latest SDRS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImage.c

    r3446 r3671  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2005-03-18 02:35:14 $
     11 *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2005-04-06 01:12:58 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3535    if (image == NULL) {
    3636        return;
    37     }
    38 
    39     if (image->type.type == PS_TYPE_PTR) {
    40         // 2-D array of pointers -- must dereference elements
    41         psU32 oldNumRows = image->numRows;
    42         psU32 oldNumCols = image->numCols;
    43         psPtr* rowPtr;
    44 
    45         for (psU32 row = 0; row < oldNumRows; row++) {
    46             rowPtr = image->data.PTR[row];
    47             for (psU32 col = 0; col < oldNumCols; col++) {
    48                 psMemDecrRefCounter(rowPtr[col]);
    49             }
    50         }
    5137    }
    5238
     
    188174    }
    189175
    190     if (old->type.type == PS_TYPE_PTR) {
    191         // 2-D array of pointers -- must
    192         // dereference
    193         psU32 oldNumRows = old->numRows;
    194         psU32 oldNumCols = old->numCols;
    195         psPtr* rowPtr;
    196 
    197         for (psU32 row = 0; row < oldNumRows; row++) {
    198             rowPtr = old->data.PTR[row];
    199             for (psU32 col = 0; col < oldNumCols; col++) {
    200                 psMemDecrRefCounter(rowPtr[col]);
    201                 rowPtr[col] = NULL;
    202             }
    203         }
    204     }
    205 
    206176    /* image already the right size/type? */
    207177    if (numCols == old->numCols && numRows == old->numRows &&
     
    263233    elements = numRows * numCols;
    264234    elementSize = PSELEMTYPE_SIZEOF(inDatatype);
    265 
    266     if (inDatatype == PS_TYPE_PTR || type == PS_TYPE_PTR) {
    267         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    268                 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
    269                 PS_TYPE_PTR_NAME);
    270         psFree(output);
    271         return NULL;
    272     }
    273235
    274236    output = psImageRecycle(output, numCols, numRows, type);
Note: See TracChangeset for help on using the changeset viewer.