IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2004, 12:42:57 PM (22 years ago)
Author:
desonia
Message:

renamed data.v to data.V in psImage struct to be same as psVector.

File:
1 edited

Legend:

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

    r821 r824  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-06-01 21:30:47 $
     11 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-06-01 22:42:57 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4848    psImage *image = (psImage *)psAlloc(sizeof(psImage));
    4949
    50     image->data.v = psAlloc(sizeof(void*)*numRows);
    51 
    52     image->data.v[0] = psAlloc(area*elementSize);
     50    image->data.V = psAlloc(sizeof(void*)*numRows);
     51
     52    image->data.V[0] = psAlloc(area*elementSize);
    5353
    5454    for(int i = 1; i < numRows; i++) {
    55         image->data.v[i] = (void*)((int8_t*)image->data.v[i-1]+rowSize);
     55        image->data.V[i] = (void*)((int8_t*)image->data.V[i-1]+rowSize);
    5656    }
    5757
     
    9191    psImageFreeChildren(image);
    9292
    93     psFree(image->data.v[0]);
    94     psFree(image->data.v);
    95     image->data.v = NULL;
     93    psFree(image->data.V[0]);
     94    psFree(image->data.V);
     95    image->data.V = NULL;
    9696
    9797    psFree(image);
     
    138138
    139139    // Resize the image buffer
    140     old->data.v[0] = psRealloc(old->data.v[0],numCols * numRows * elementSize);
    141     old->data.v = (void**) psRealloc(old->data.v,numRows * sizeof(void*));
     140    old->data.V[0] = psRealloc(old->data.V[0],numCols * numRows * elementSize);
     141    old->data.V = (void**) psRealloc(old->data.V,numRows * sizeof(void*));
    142142
    143143    // recreate the row pointers
    144144    for(int i = 1; i < numRows; i++) {
    145         old->data.v[i] = (void*)((int8_t*)old->data.v[i-1]+rowSize);
     145        old->data.V[i] = (void*)((int8_t*)old->data.V[i-1]+rowSize);
    146146    }
    147147
     
    161161    unsigned int inputColOffset;        // offset in bytes to first subset pixel in input row
    162162
    163     if (image == NULL || image->data.v == NULL) {
     163    if (image == NULL || image->data.V == NULL) {
    164164        psError(__func__,"Can not subset image because input image or its pixel buffer is NULL.");
    165165        return NULL;
     
    211211
    212212    for (int row = 0; row < numRows; row++) {
    213         memcpy(out->data.v[row],image->data.U8[row0+row] + inputColOffset,
     213        memcpy(out->data.V[row],image->data.U8[row0+row] + inputColOffset,
    214214               outputRowSize);
    215215    }
     
    250250    int numCols;
    251251
    252     if (input == NULL || input->data.v == NULL) {
     252    if (input == NULL || input->data.V == NULL) {
    253253        psError(__func__,"Can not copy image because input image or its pixel buffer is NULL.");
    254254        return NULL;
     
    280280    // cover the trival case of copy of the same datatype.
    281281    if (type == inDatatype) {
    282         memcpy(output->data.v[0],input->data.v[0],elementSize*numRows*numCols);
     282        memcpy(output->data.V[0],input->data.V[0],elementSize*numRows*numCols);
    283283        return output;
    284284    }
Note: See TracChangeset for help on using the changeset viewer.