Changeset 8232 for trunk/psLib/src/imageops
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 8 edited
-
. (modified) (1 prop)
-
imageops/psImageConvolve.c (modified) (13 diffs)
-
imageops/psImageGeomManip.c (modified) (30 diffs)
-
imageops/psImageMaskOps.c (modified) (2 diffs)
-
imageops/psImagePixelExtract.c (modified) (25 diffs)
-
imageops/psImagePixelManip.c (modified) (21 diffs)
-
imageops/psImageStats.c (modified) (5 diffs)
-
imageops/psImageStructManip.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/imageops/psImageConvolve.c
r7914 r8232 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-0 7-15 02:57:12$7 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-08-08 23:32:23 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define FOURIER_PADDING 32 /* padding amount in every side of the image for fourier convolution */ … … 120 120 if (tShifts == NULL || xShifts == NULL || yShifts == NULL) { 121 121 psError(PS_ERR_BAD_PARAMETER_NULL, true, 122 PS_ERRORTEXT_psImageConvolve_SHIFT_NULL);122 _("Specified shift vectors can not be NULL.")); 123 123 return NULL; 124 124 } … … 134 134 PS_TYPE_NAME(typeTStr,tShifts->type.type); 135 135 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 136 PS_ERRORTEXT_psImageConvolve_SHIFT_TYPE_MISMATCH,136 _("Input t-, x-, and y-shift vector types (%s/%s/%s) must match."), 137 137 typeTStr, typeXStr, typeYStr); 138 138 return NULL; … … 257 257 PS_TYPE_NAME(typeStr,xShifts->type.type); 258 258 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 259 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,259 _("Specified psImage type, %s, is not supported."), 260 260 typeStr); 261 261 } … … 280 280 PS_TYPE_NAME(typeStr,xShifts->type.type); 281 281 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 282 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,282 _("Specified psImage type, %s, is not supported."), 283 283 typeStr); 284 284 } … … 301 301 if (kernel == NULL) { 302 302 psError(PS_ERR_BAD_PARAMETER_NULL, true, 303 PS_ERRORTEXT_psImageConvolve_KERNEL_NULL);303 _("Specified psKernel can not be NULL.")); 304 304 psFree(out); 305 305 return NULL; … … 361 361 PS_TYPE_NAME(typeStr,in->type.type); 362 362 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 363 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,363 _("Specified psImage type, %s, is not supported."), 364 364 typeStr); 365 365 psFree(out); … … 380 380 if (kRows >= numRows || kCols >= numCols) { 381 381 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 382 PS_ERRORTEXT_psImageConvolve_KERNEL_TOO_LARGE,382 _("Specified psKernel size, %dx%d, can not be larger than input psImage size, %dx%d."), 383 383 kCols,kRows, 384 384 numCols, numRows); … … 434 434 if (kernelFourier == NULL) { 435 435 psError(PS_ERR_UNKNOWN, false, 436 PS_ERRORTEXT_psImageConvolve_KERNEL_FFT_FAILED);436 _("Failed to perform a fourier transform of kernel.")); 437 437 psFree(out); 438 438 return NULL; … … 442 442 if (inFourier == NULL) { 443 443 psError(PS_ERR_UNKNOWN, false, 444 PS_ERRORTEXT_psImageConvolve_FFT_FAILED);444 _("Failed to perform a fourier transform of input image.")); 445 445 psFree(out); 446 446 return NULL; … … 460 460 if (complexOut == NULL) { 461 461 psError(PS_ERR_UNKNOWN, false, 462 PS_ERRORTEXT_psImageConvolve_FFT_FAILED);462 _("Failed to perform a fourier transform of input image.")); 463 463 psFree(out); 464 464 return NULL; … … 665 665 PS_TYPE_NAME(typeStr,image->type.type); 666 666 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 667 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,667 _("Specified psImage type, %s, is not supported."), 668 668 typeStr); 669 669 return false; -
trunk/psLib/src/imageops/psImageGeomManip.c
r7999 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-28 00:44:05$12 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 30 30 #include "psMemory.h" 31 31 #include "psAssert.h" 32 #include "psErrorText.h" 32 33 33 #include "psCoord.h" 34 34 … … 51 51 if (in == NULL) { 52 52 psError(PS_ERR_BAD_PARAMETER_NULL, true, 53 PS_ERRORTEXT_psImage_IMAGE_NULL);53 _("Can not operate on a NULL psImage.")); 54 54 psFree(out); 55 55 return NULL; … … 58 58 if (scale < 1) { 59 59 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 60 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,60 _("Specified scale value, %d, must be a positive value."), 61 61 scale); 62 62 psFree(out); … … 66 66 if (stats == NULL) { 67 67 psError(PS_ERR_BAD_PARAMETER_NULL, true, 68 PS_ERRORTEXT_psImage_STAT_NULL);68 _("Specified statistic can not be NULL.")); 69 69 psFree(out); 70 70 return NULL; … … 74 74 if (statistic == 0) { 75 75 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 76 PS_ERRORTEXT_psImage_BAD_STAT,76 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."), 77 77 stats->options); 78 78 psFree(out); … … 87 87 PS_TYPE_NAME(typeStr,mask->type.type); 88 88 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 89 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,89 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 90 90 typeStr, PS_TYPE_MASK_NAME); 91 91 psFree(out); … … 159 159 PS_TYPE_NAME(typeStr,in->type.type); 160 160 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 161 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,161 _("Specified psImage type, %s, is not supported."), 162 162 typeStr); 163 163 psFree(out); … … 184 184 if (in == NULL) { 185 185 psError(PS_ERR_BAD_PARAMETER_NULL, true, 186 PS_ERRORTEXT_psImage_IMAGE_NULL);186 _("Can not operate on a NULL psImage.")); 187 187 psFree(out); 188 188 return NULL; … … 191 191 if (scale < 1) { 192 192 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 193 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,193 _("Specified scale value, %d, must be a positive value."), 194 194 scale); 195 195 psFree(out); … … 199 199 if (mode > PS_INTERPOLATE_LANCZOS4_VARIANCE ) { 200 200 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 201 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,201 _("Specified interpolation mode, %d, is unsupported."), 202 202 mode); 203 203 psFree(out); … … 241 241 PS_TYPE_NAME(typeStr,in->type.type); 242 242 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 243 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,243 _("Specified psImage type, %s, is not supported."), 244 244 typeStr); 245 245 psFree(out); … … 262 262 if (input == NULL) { 263 263 psError(PS_ERR_BAD_PARAMETER_NULL, true, 264 PS_ERRORTEXT_psImage_IMAGE_NULL);264 _("Can not operate on a NULL psImage.")); 265 265 psFree(out); 266 266 return NULL; … … 311 311 if (input == NULL) { 312 312 psError(PS_ERR_BAD_PARAMETER_NULL, true, 313 PS_ERRORTEXT_psImage_IMAGE_NULL);313 _("Can not operate on a NULL psImage.")); 314 314 psFree(out); 315 315 return NULL; … … 357 357 PS_TYPE_NAME(typeStr,type); 358 358 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 359 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,359 _("Specified psImage type, %s, is not supported."), 360 360 typeStr); 361 361 psFree(out); … … 403 403 PS_TYPE_NAME(typeStr,type); 404 404 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 405 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,405 _("Specified psImage type, %s, is not supported."), 406 406 typeStr); 407 407 psFree(out); … … 448 448 PS_TYPE_NAME(typeStr,type); 449 449 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 450 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,450 _("Specified psImage type, %s, is not supported."), 451 451 typeStr); 452 452 psFree(out); … … 503 503 cimag(exposed) > PS_MAX_##TYPE) { \ 504 504 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 505 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \505 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 506 506 "exposed", \ 507 507 creal(exposed),cimag(exposed), \ … … 570 570 PS_TYPE_NAME(typeStr,type); \ 571 571 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 572 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \572 _("Specified psImage type, %s, is not supported."), \ 573 573 typeStr); \ 574 574 psFree(out); \ … … 584 584 default: 585 585 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 586 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,586 _("Specified interpolation mode, %d, is unsupported."), 587 587 mode); 588 588 psFree(out); … … 608 608 if (input == NULL) { 609 609 psError(PS_ERR_BAD_PARAMETER_NULL, true, 610 PS_ERRORTEXT_psImage_IMAGE_NULL);610 _("Can not operate on a NULL psImage.")); 611 611 psFree(out); 612 612 return NULL; … … 627 627 cimag(exposed) > PS_MAX_##TYPE) { \ 628 628 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 629 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \629 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 630 630 "exposed", \ 631 631 creal(exposed),cimag(exposed), \ … … 666 666 PS_TYPE_NAME(typeStr,type); \ 667 667 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 668 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \668 _("Specified psImage type, %s, is not supported."), \ 669 669 typeStr); \ 670 670 psFree(out); \ … … 680 680 default: 681 681 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 682 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,682 _("Specified interpolation mode, %d, is unsupported."), 683 683 mode); 684 684 psFree(out); … … 702 702 if (input == NULL) { 703 703 psError(PS_ERR_BAD_PARAMETER_NULL, true, 704 PS_ERRORTEXT_psImage_IMAGE_NULL);704 _("Can not operate on a NULL psImage.")); 705 705 psFree(output); 706 706 return NULL; … … 715 715 if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) { 716 716 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 717 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,717 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 718 718 input->numCols, input->numRows, 719 719 inputMask->numCols, inputMask->numRows ); … … 725 725 PS_TYPE_NAME(typeStr,inputMask->type.type); 726 726 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 727 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,727 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 728 728 typeStr, PS_TYPE_MASK_NAME); 729 729 psFree(output); … … 734 734 if (outToIn == NULL) { 735 735 psError(PS_ERR_BAD_PARAMETER_NULL, true, 736 PS_ERRORTEXT_psImageManip_TRANSFORM_NULL);736 _("Specified input transform can not be NULL.")); 737 737 return NULL; 738 738 } … … 853 853 PS_TYPE_NAME(typeStr,type); \ 854 854 psError(PS_ERR_BAD_PARAMETER_TYPE, true, \ 855 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \855 _("Specified psImage type, %s, is not supported."), \ 856 856 typeStr); \ 857 857 psFree(output); \ … … 867 867 default: 868 868 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 869 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,869 _("Specified interpolation mode, %d, is unsupported."), 870 870 mode); 871 871 psFree(output); -
trunk/psLib/src/imageops/psImageMaskOps.c
r7766 r8232 8 8 * @author David Robbins, MHPCC 9 9 * 10 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-30 02:20:06$10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:23 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psMemory.h" 27 27 #include "psAssert.h" 28 #include "psErrorText.h" 28 29 29 #include "psCoord.h" 30 30 -
trunk/psLib/src/imageops/psImagePixelExtract.c
r7999 r8232 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.2 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-28 00:44:05$10 * @version $Revision: 1.26 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:23 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 #define VECTOR_STORE_ROW_CASE(TYPE) \ … … 34 34 if (input == NULL || input->data.V == NULL) { 35 35 psError(PS_ERR_BAD_PARAMETER_NULL, true, 36 PS_ERRORTEXT_psImage_IMAGE_NULL);36 _("Can not operate on a NULL psImage.")); 37 37 psFree(out); 38 38 return NULL; … … 124 124 if (input == NULL || input->data.V == NULL) { 125 125 psError(PS_ERR_BAD_PARAMETER_NULL, true, 126 PS_ERRORTEXT_psImage_IMAGE_NULL);126 _("Can not operate on a NULL psImage.")); 127 127 psFree(out); 128 128 return NULL; … … 223 223 if (input == NULL || input->data.V == NULL) { 224 224 psError(PS_ERR_BAD_PARAMETER_NULL, true, 225 PS_ERRORTEXT_psImage_IMAGE_NULL);225 _("Can not operate on a NULL psImage.")); 226 226 psFree(out); 227 227 return NULL; … … 350 350 if (inRows != mask->numRows || inCols != mask->numCols) { 351 351 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 352 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,352 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 353 353 mask->numCols,mask->numRows, 354 354 inCols, inRows); … … 360 360 PS_TYPE_NAME(typeStr,mask->type.type); 361 361 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 362 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,362 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 363 363 typeStr, PS_TYPE_MASK_NAME); 364 364 psFree(out); … … 369 369 if (stats == NULL) { 370 370 psError(PS_ERR_BAD_PARAMETER_NULL, true, 371 PS_ERRORTEXT_psImage_STAT_NULL);371 _("Specified statistic can not be NULL.")); 372 372 psFree(out); 373 373 return NULL; … … 378 378 if (statistic == 0) { 379 379 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 380 PS_ERRORTEXT_psImage_BAD_STAT,stats->options);380 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."),stats->options); 381 381 psFree(out); 382 382 return NULL; … … 466 466 PS_TYPE_NAME(typeStr,type); 467 467 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 468 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,468 _("Specified psImage type, %s, is not supported."), 469 469 typeStr); 470 470 psFree(out); … … 531 531 } else { // don't know what the direction flag is 532 532 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 533 PS_ERRORTEXT_psImage_SLICE_DIRECTION_INVALID,533 _("Specified slice direction, %d, is invalid."), 534 534 direction); 535 535 psFree(out); … … 555 555 if (input == NULL || input->data.V == NULL) { 556 556 psError(PS_ERR_BAD_PARAMETER_NULL, true, 557 PS_ERRORTEXT_psImage_IMAGE_NULL);557 _("Can not operate on a NULL psImage.")); 558 558 psFree(out); 559 559 return NULL; … … 588 588 if (nSamples < 2) { 589 589 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 590 PS_ERRORTEXT_psImage_nSamples_TOOSMALL,590 _("Specified number of samples, %d, must be greater than 1 to make a line."), 591 591 nSamples); 592 592 psFree(out); … … 639 639 if (mode < PS_INTERPOLATE_FLAT ) { 640 640 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 641 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,641 _("Specified interpolation mode, %d, is unsupported."), 642 642 mode); 643 643 psFree(out); … … 648 648 if (numRows != mask->numRows || numCols != mask->numCols) { 649 649 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 650 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,650 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 651 651 mask->numCols,mask->numRows, 652 652 numCols-1, numRows); … … 658 658 PS_TYPE_NAME(typeStr,mask->type.type); 659 659 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 660 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,660 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 661 661 typeStr, PS_TYPE_MASK_NAME); 662 662 psFree(out); … … 719 719 PS_TYPE_NAME(typeStr,input->type.type); 720 720 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 721 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,721 _("Specified psImage type, %s, is not supported."), 722 722 typeStr); 723 723 psFree(out); … … 742 742 if (input == NULL || input->data.V == NULL) { 743 743 psError(PS_ERR_BAD_PARAMETER_NULL, true, 744 PS_ERRORTEXT_psImage_IMAGE_NULL);744 _("Can not operate on a NULL psImage.")); 745 745 psFree(out); 746 746 return NULL; … … 752 752 if (numRows != mask->numRows || numCols != mask->numCols) { 753 753 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 754 PS_ERRORTEXT_psImage_IMAGE_MASK_SIZE,754 _("Input psImage mask size, %dx%d, does not match psImage input size, %dx%d."), 755 755 mask->numCols,mask->numRows, 756 756 numCols, numRows); … … 762 762 PS_TYPE_NAME(typeStr,mask->type.type); 763 763 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 764 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE,764 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), 765 765 typeStr, PS_TYPE_MASK_NAME); 766 766 psFree(out); … … 774 774 y < input->row0 || y >= (input->row0 + numRows) ) { 775 775 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 776 PS_ERRORTEXT_psImage_CENTER_NOT_IN_IMAGE,776 _("Specified center, (%g,%g), is outside of the psImage boundaries, [0:%d,0:%d]."), 777 777 x, y, 778 778 numCols-1, numRows-1); … … 783 783 if (radii == NULL) { 784 784 psError(PS_ERR_BAD_PARAMETER_NULL, true, 785 PS_ERRORTEXT_psImage_RADII_VECTOR_NULL);785 _("Specified radii vector can not be NULL.")); 786 786 psFree(out); 787 787 return NULL; … … 790 790 if (radii->n < 2) { 791 791 psError(PS_ERR_BAD_PARAMETER_SIZE, true, 792 PS_ERRORTEXT_psImage_RADII_VECTOR_TOOSMALL,792 _("Input radii vector size, %d, can not be less than 2."), 793 793 radii->n); 794 794 psFree(out); … … 798 798 if (stats == NULL) { 799 799 psError(PS_ERR_BAD_PARAMETER_NULL, true, 800 PS_ERRORTEXT_psImage_STAT_NULL);800 _("Specified statistic can not be NULL.")); 801 801 psFree(out); 802 802 return NULL; … … 807 807 if (statistic == 0) { 808 808 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 809 PS_ERRORTEXT_psImage_BAD_STAT,809 _("Specified statistic option, %d, is not valid. Must specify one and only one statistic type."), 810 810 stats->options); 811 811 psFree(out); -
trunk/psLib/src/imageops/psImagePixelManip.c
r7766 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 6-30 02:20:06$12 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:23 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 #include "psMemory.h" 29 29 #include "psAssert.h" 30 #include "psErrorText.h" 30 31 31 #include "psCoord.h" 32 32 … … 47 47 if (max < min) { 48 48 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 49 PS_ERRORTEXT_psImageManip_MAXMIN,49 _("Specified min value, %g, can not be greater than the specified max value, %g."), 50 50 (double)min,(double)max); 51 51 return 0; … … 61 61 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 62 62 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 63 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \63 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 64 64 "vmin",vmin, PS_TYPE_##type##_NAME, \ 65 65 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 67 67 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 68 68 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 69 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \69 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 70 70 "vmax",vmax, PS_TYPE_##type##_NAME, \ 71 71 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 90 90 if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \ 91 91 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 92 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \92 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 93 93 "vmin",vmin, PS_TYPE_##type##_NAME, \ 94 94 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 96 96 if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \ 97 97 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 98 PS_ERRORTEXT_psImage_PARAMETER_OUTOF_TYPERANGE, \98 _("Specified %s value, %g, is outside of psImage type's range (%s: %g to %g)."), \ 99 99 "vmax",vmax, PS_TYPE_##type##_NAME, \ 100 100 (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \ … … 132 132 PS_TYPE_NAME(typeStr,input->type.type); 133 133 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 134 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,134 _("Specified psImage type, %s, is not supported."), 135 135 typeStr); 136 136 } … … 177 177 PS_TYPE_NAME(typeStr,input->type.type); 178 178 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 179 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,179 _("Specified psImage type, %s, is not supported."), 180 180 typeStr); 181 181 } … … 202 202 if (image == NULL || overlay == NULL) { 203 203 psError(PS_ERR_BAD_PARAMETER_NULL, true, 204 PS_ERRORTEXT_psImage_IMAGE_NULL);204 _("Can not operate on a NULL psImage.")); 205 205 return pixelsOverlaid; 206 206 } … … 208 208 if (op == NULL) { 209 209 psError(PS_ERR_BAD_PARAMETER_NULL, true, 210 PS_ERRORTEXT_psImageManip_OPERATION_NULL);210 _("Operation can not be NULL.")); 211 211 return pixelsOverlaid; 212 212 } … … 220 220 PS_TYPE_NAME(typeStrOverlay,overlay->type.type); 221 221 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 222 PS_ERRORTEXT_psImageManip_OVERLAY_TYPE_MISMATCH,222 _("Input overlay psImage type, %s, must match input psImage type, %s."), 223 223 typeStrOverlay, typeStr); 224 224 return pixelsOverlaid; … … 239 239 240 240 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 241 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,241 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 242 242 x0, imageColLimit, y0, imageRowLimit, 243 243 imageNumCols, imageNumRows); … … 295 295 default: \ 296 296 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 297 PS_ERRORTEXT_psImageManip_OVERLAY_OPERATOR_INVALID, \297 _("Specified operation, '%s', is not supported."), \ 298 298 op); \ 299 299 return pixelsOverlaid; \ … … 319 319 PS_TYPE_NAME(typeStr,type); 320 320 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 321 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,321 _("Specified psImage type, %s, is not supported."), 322 322 typeStr); 323 323 return pixelsOverlaid; … … 344 344 if (input == NULL) { 345 345 psError(PS_ERR_BAD_PARAMETER_NULL, true, 346 PS_ERRORTEXT_psImage_IMAGE_NULL);346 _("Can not operate on a NULL psImage.")); 347 347 return 0; 348 348 } … … 350 350 if (realMax < realMin) { 351 351 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 352 PS_ERRORTEXT_psImageManip_MAXMIN_REAL,352 _("Specified real-portion of min value, %g, can not be greater than the real-portion of max value, %g."), 353 353 (double)realMin, (double)realMax); 354 354 return 0; … … 356 356 if (imagMax < imagMin) { 357 357 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 358 PS_ERRORTEXT_psImageManip_MAXMIN_IMAG,358 _("Specified imaginary-portion of min value, %g, can not be greater than the imaginary-portion of max value, %g."), 359 359 (double)imagMin, (double)imagMax); 360 360 return 0; … … 369 369 realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \ 370 370 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 371 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \371 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 372 372 "vmin", creal(vmin), cimag(vmin), \ 373 373 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 377 377 realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \ 378 378 psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ 379 PS_ERRORTEXT_psImageManip_CLIP_VALUE_INVALID, \379 _("Specified %s value, %g%+gi, is not the the range of input psImage's valid pixel values (%s), i.e. [%g:%g]."), \ 380 380 "vmax", creal(vmax), cimag(vmax), \ 381 381 PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \ … … 406 406 PS_TYPE_NAME(typeStr,input->type.type); 407 407 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 408 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,408 _("Specified psImage type, %s, is not supported."), 409 409 typeStr); 410 410 } -
trunk/psLib/src/imageops/psImageStats.c
r7766 r8232 9 9 * @author GLG, MHPCC 10 10 * 11 * @version $Revision: 1.9 8$ $Name: not supported by cvs2svn $12 * @date $Date: 2006-0 6-30 02:20:06$11 * @version $Revision: 1.99 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2006-08-08 23:32:23 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 30 30 #include "psImageStats.h" 31 31 #include "psAssert.h" 32 #include "psErrorText.h" 32 33 33 #include "psRegion.h" 34 34 #include "psRegionForImage.h" … … 497 497 if (mask == NULL) { 498 498 psError(PS_ERR_BAD_PARAMETER_NULL, true, 499 PS_ERRORTEXT_psImage_IMAGE_NULL);499 _("Can not operate on a NULL psImage.")); 500 500 return -1; 501 501 } … … 592 592 return -1; 593 593 }/* else if (col0 == col1 && row0 == row1) { 594 psError(PS_ERR_BAD_PARAMETER_VALUE, true,595 "Invalid psRegion specified. Region contains only 1 pixel.\n");596 return -1;597 }598 */594 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 595 "Invalid psRegion specified. Region contains only 1 pixel.\n"); 596 return -1; 597 } 598 */ 599 599 x0 = col0; 600 600 x1 = col1; … … 632 632 default: 633 633 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 634 PS_ERRORTEXT_psImage_IMAGE_MASK_TYPE, type, PS_TYPE_U8);634 _("Input psImage mask type, %s, is not the supported mask datatype of %s."), type, PS_TYPE_U8); 635 635 return -1; 636 636 } -
trunk/psLib/src/imageops/psImageStructManip.c
r7524 r8232 8 8 * @author Robert DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-12 20:44:04$10 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:23 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 21 21 #include "psError.h" 22 22 23 #include "psErrorText.h" 23 24 24 25 25 static psImage* imageSubset(psImage* out, … … 35 35 if (image == NULL || image->data.V == NULL) { 36 36 psError(PS_ERR_BAD_PARAMETER_NULL, true, 37 PS_ERRORTEXT_psImage_IMAGE_NULL);37 _("Can not operate on a NULL psImage.")); 38 38 return NULL; 39 39 } … … 41 41 if ( col0 < image->col0 || row0 < image->row0 ) { 42 42 // psError(PS_ERR_BAD_PARAMETER_VALUE, true, 43 // PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID);43 // _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d].")); 44 44 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,45 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 46 46 col0, col1-1, row0, row1-1, 47 47 image->numCols-1, image->numRows-1); … … 51 51 if (image->type.dimen != PS_DIMEN_IMAGE) { 52 52 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 53 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);53 _("The input psImage must have a PS_DIMEN_IMAGE dimension type.")); 54 54 return NULL; 55 55 } … … 69 69 row1 > image->row0 + image->numRows ) { 70 70 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 71 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,71 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 72 72 col0, col1-1, row0, row1-1, 73 73 image->numCols-1, image->numRows-1); … … 153 153 if (input == NULL || input->data.V == NULL) { 154 154 psError(PS_ERR_BAD_PARAMETER_NULL, true, 155 PS_ERRORTEXT_psImage_IMAGE_NULL);155 _("Can not operate on a NULL psImage.")); 156 156 psFree(output); 157 157 return NULL; … … 160 160 if (input == output) { 161 161 psError(PS_ERR_BAD_PARAMETER_NULL, true, 162 PS_ERRORTEXT_psImage_INPLACE_NOTSUPPORTED);162 _("Specified input and output psImage can not reference the same psImage.")); 163 163 psFree(output); 164 164 return NULL; … … 167 167 if (input->type.dimen != PS_DIMEN_IMAGE) { 168 168 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 169 PS_ERRORTEXT_psImage_NOT_AN_IMAGE);169 _("The input psImage must have a PS_DIMEN_IMAGE dimension type.")); 170 170 psFree(output); 171 171 return NULL; … … 287 287 PS_TYPE_NAME(typeStr,type); 288 288 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 289 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,289 _("Specified psImage type, %s, is not supported."), 290 290 typeStr); 291 291 psFree(output); … … 302 302 if (image == NULL || image->data.V == NULL) { 303 303 psError(PS_ERR_BAD_PARAMETER_NULL, true, 304 PS_ERRORTEXT_psImage_IMAGE_NULL);304 _("Can not operate on a NULL psImage.")); 305 305 return NULL; 306 306 } … … 335 335 row0 >= row1 ) { 336 336 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 337 PS_ERRORTEXT_psImage_SUBSET_RANGE_INVALID,337 _("Specified subset range, [%d:%d,%d:%d], is invalid or outside input psImage's boundaries, [0:%d,0:%d]."), 338 338 col0, col1-1, row0, row1-1, 339 339 image->numCols-1, image->numRows-1);
Note:
See TracChangeset
for help on using the changeset viewer.
