IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 28, 2004, 3:20:10 PM (22 years ago)
Author:
desonia
Message:

tested psImageClipComplexRegion.

File:
1 edited

Legend:

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

    r1292 r1319  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-07-24 02:00:21 $
     12 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-07-29 01:20:10 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    276276
    277277    if (input == NULL) {
     278        psError(__func__,"Can not perform clip on NULL image");
    278279        return 0;
    279280    }
     
    301302                psError(__func__, "Specified vmin (%g%+gi) is outside of image's " \
    302303                        typename " pixel range", \
    303                         realfcn(vmin),imagfcn(vmin)); \
     304                        creal(vmin),cimag(vmin)); \
     305                break; \
    304306            } \
    305307            if (realfcn(vmax) > PS_MAX_##type || imagfcn(vmax) > PS_MAX_##type || \
     
    307309                psError(__func__, "Specified vmax (%g%+gi) is outside of image's " \
    308310                        typename " pixel range", \
    309                         realfcn(vmax),imagfcn(vmax)); \
     311                        creal(vmax),cimag(vmax)); \
     312                break; \
    310313            } \
    311314            for (unsigned int row = 0;row<numRows;row++) { \
     
    313316                for (unsigned int col = 0; col < numCols; col++) { \
    314317                    if ( (realfcn(inputRow[col]) > realMax) || (imagfcn(inputRow[col]) > imagMax) ) { \
     318                        inputRow[col] = (ps##type)vmax; \
     319                        numClipped++; \
     320                    } else if ( (realfcn(inputRow[col]) < realMin) || (imagfcn(inputRow[col]) < imagMin) ){ \
    315321                        inputRow[col] = (ps##type)vmin; \
    316                         numClipped++; \
    317                     } else if ( (realfcn(inputRow[col]) < realMin) || (imagfcn(inputRow[col]) < imagMax) ){ \
    318                         inputRow[col] = (ps##type)vmax; \
    319322                        numClipped++; \
    320323                    } \
Note: See TracChangeset for help on using the changeset viewer.