Changeset 1319 for trunk/psLib/src/image/psImageManip.c
- Timestamp:
- Jul 28, 2004, 3:20:10 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/image/psImageManip.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImageManip.c
r1292 r1319 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-07-2 4 02:00:21$12 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-07-29 01:20:10 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 276 276 277 277 if (input == NULL) { 278 psError(__func__,"Can not perform clip on NULL image"); 278 279 return 0; 279 280 } … … 301 302 psError(__func__, "Specified vmin (%g%+gi) is outside of image's " \ 302 303 typename " pixel range", \ 303 realfcn(vmin),imagfcn(vmin)); \ 304 creal(vmin),cimag(vmin)); \ 305 break; \ 304 306 } \ 305 307 if (realfcn(vmax) > PS_MAX_##type || imagfcn(vmax) > PS_MAX_##type || \ … … 307 309 psError(__func__, "Specified vmax (%g%+gi) is outside of image's " \ 308 310 typename " pixel range", \ 309 realfcn(vmax),imagfcn(vmax)); \ 311 creal(vmax),cimag(vmax)); \ 312 break; \ 310 313 } \ 311 314 for (unsigned int row = 0;row<numRows;row++) { \ … … 313 316 for (unsigned int col = 0; col < numCols; col++) { \ 314 317 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) ){ \ 315 321 inputRow[col] = (ps##type)vmin; \ 316 numClipped++; \317 } else if ( (realfcn(inputRow[col]) < realMin) || (imagfcn(inputRow[col]) < imagMax) ){ \318 inputRow[col] = (ps##type)vmax; \319 322 numClipped++; \ 320 323 } \
Note:
See TracChangeset
for help on using the changeset viewer.
