IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7524


Ignore:
Timestamp:
Jun 12, 2006, 10:44:04 AM (20 years ago)
Author:
magnier
Message:

replaced dangerous code with P_PSIMAGE_SET_NUMCOLS, etc

Location:
trunk/psLib/src
Files:
3 edited

Legend:

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

    r7380 r7524  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-06-07 03:22:06 $
     12 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-06-12 20:44:04 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    776776        // create the output image.
    777777        output = psImageRecycle(output, numCols, numRows, input->type.type);
    778         *(psS32*)&output->col0 = region.x0;
    779         *(psS32*)&output->row0 = region.y0;
     778        output->col0 = region.x0;
     779        output->row0 = region.y0;
    780780    } else { // size of output is determined by output parameter
    781781        numRows = output->numRows;
  • trunk/psLib/src/imageops/psImageStructManip.c

    r7057 r7524  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-05-04 00:37:44 $
     10 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-06-12 20:44:04 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    109109
    110110    out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array
    111     *(psMathType*)&out->type = image->type;
    112     //    *(psU32*)&out->numCols = numCols;
    113     //    *(psU32*)&out->numRows = numRows;
    114     *(psS32*)&out->numCols = numCols;
    115     *(psS32*)&out->numRows = numRows;
    116     *(psS32*)&out->row0 = row0;
    117     *(psS32*)&out->col0 = col0;
     111    P_PSIMAGE_SET_TYPE(out, image->type);
     112    P_PSIMAGE_SET_NUMCOLS(out, numCols);
     113    P_PSIMAGE_SET_NUMROWS(out, numRows);
     114
     115    out->row0 = row0;
     116    out->col0 = col0;
    118117    out->parent = image;
    119118    out->children = NULL;
     
    356355    }
    357356
    358     *(psU32*)&image->numRows = numRows;
    359     *(psU32*)&image->numCols = numCols;
     357    P_PSIMAGE_SET_NUMCOLS(image, numCols);
     358    P_PSIMAGE_SET_NUMROWS(image, numRows);
    360359
    361360    // XXX: should I really resize the buffers?
  • trunk/psLib/src/mathtypes/psImage.c

    r7071 r7524  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-05-05 02:48:34 $
     11 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-06-12 20:43:16 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8585    }
    8686
    87     *(psS32 *)&image->col0 = 0;
    88     *(psS32 *)&image->row0 = 0;
    89     *(psU32 *)&image->numCols = numCols;
    90     *(psU32 *)&image->numRows = numRows;
    91     *(psDimen* ) & image->type.dimen = PS_DIMEN_IMAGE;
    92     *(psElemType* ) & image->type.type = type;
     87    image->col0 = 0;
     88    image->row0 = 0;
     89    P_PSIMAGE_SET_NUMCOLS (image, numCols);
     90    P_PSIMAGE_SET_NUMROWS (image, numRows);
     91
     92    psMathType imageType;
     93    imageType.dimen = PS_DIMEN_IMAGE;
     94    imageType.type = type;
     95    P_PSIMAGE_SET_TYPE (image, imageType);
     96
    9397    image->parent = NULL;
    9498    image->children = NULL;
Note: See TracChangeset for help on using the changeset viewer.