IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 1:32:23 PM (20 years ago)
Author:
jhoblitt
Message:

bug #790 - remove psErrorText.h and inline all error codes. all newly inlined error codes are wrapped with the _() macro from future gettextification

Location:
trunk/psLib/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src

    • Property svn:ignore
      •  

        old new  
        1010libpslib.la.temp
        1111config.h.in
        12 psErrorText.h
        1312*.bb
        1413*.bbg
  • trunk/psLib/src/imageops/psImageConvolve.c

    r7914 r8232  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-07-15 02:57:12 $
     7 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-08-08 23:32:23 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121#include "psError.h"
    2222
    23 #include "psErrorText.h"
     23
    2424
    2525#define FOURIER_PADDING 32 /* padding amount in every side of the image for fourier convolution */
     
    120120    if (tShifts == NULL || xShifts == NULL || yShifts == NULL) {
    121121        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    122                 PS_ERRORTEXT_psImageConvolve_SHIFT_NULL);
     122                _("Specified shift vectors can not be NULL."));
    123123        return NULL;
    124124    }
     
    134134        PS_TYPE_NAME(typeTStr,tShifts->type.type);
    135135        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."),
    137137                typeTStr, typeXStr, typeYStr);
    138138        return NULL;
     
    257257                PS_TYPE_NAME(typeStr,xShifts->type.type);
    258258                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    259                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     259                        _("Specified psImage type, %s, is not supported."),
    260260                        typeStr);
    261261            }
     
    280280                PS_TYPE_NAME(typeStr,xShifts->type.type);
    281281                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    282                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     282                        _("Specified psImage type, %s, is not supported."),
    283283                        typeStr);
    284284            }
     
    301301    if (kernel == NULL) {
    302302        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    303                 PS_ERRORTEXT_psImageConvolve_KERNEL_NULL);
     303                _("Specified psKernel can not be NULL."));
    304304        psFree(out);
    305305        return NULL;
     
    361361                PS_TYPE_NAME(typeStr,in->type.type);
    362362                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    363                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     363                        _("Specified psImage type, %s, is not supported."),
    364364                        typeStr);
    365365                psFree(out);
     
    380380        if (kRows >= numRows || kCols >= numCols) {
    381381            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."),
    383383                    kCols,kRows,
    384384                    numCols, numRows);
     
    434434        if (kernelFourier == NULL) {
    435435            psError(PS_ERR_UNKNOWN, false,
    436                     PS_ERRORTEXT_psImageConvolve_KERNEL_FFT_FAILED);
     436                    _("Failed to perform a fourier transform of kernel."));
    437437            psFree(out);
    438438            return NULL;
     
    442442        if (inFourier == NULL) {
    443443            psError(PS_ERR_UNKNOWN, false,
    444                     PS_ERRORTEXT_psImageConvolve_FFT_FAILED);
     444                    _("Failed to perform a fourier transform of input image."));
    445445            psFree(out);
    446446            return NULL;
     
    460460        if (complexOut == NULL) {
    461461            psError(PS_ERR_UNKNOWN, false,
    462                     PS_ERRORTEXT_psImageConvolve_FFT_FAILED);
     462                    _("Failed to perform a fourier transform of input image."));
    463463            psFree(out);
    464464            return NULL;
     
    665665            PS_TYPE_NAME(typeStr,image->type.type);
    666666            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    667                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     667                    _("Specified psImage type, %s, is not supported."),
    668668                    typeStr);
    669669            return false;
  • trunk/psLib/src/imageops/psImageGeomManip.c

    r7999 r8232  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-07-28 00:44:05 $
     12 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-08 23:32:23 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3030#include "psMemory.h"
    3131#include "psAssert.h"
    32 #include "psErrorText.h"
     32
    3333#include "psCoord.h"
    3434
     
    5151    if (in == NULL) {
    5252        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    53                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     53                _("Can not operate on a NULL psImage."));
    5454        psFree(out);
    5555        return NULL;
     
    5858    if (scale < 1) {
    5959        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    60                 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,
     60                _("Specified scale value, %d, must be a positive value."),
    6161                scale);
    6262        psFree(out);
     
    6666    if (stats == NULL) {
    6767        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    68                 PS_ERRORTEXT_psImage_STAT_NULL);
     68                _("Specified statistic can not be NULL."));
    6969        psFree(out);
    7070        return NULL;
     
    7474    if (statistic == 0) {
    7575        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."),
    7777                stats->options);
    7878        psFree(out);
     
    8787            PS_TYPE_NAME(typeStr,mask->type.type);
    8888            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."),
    9090                    typeStr, PS_TYPE_MASK_NAME);
    9191            psFree(out);
     
    159159            PS_TYPE_NAME(typeStr,in->type.type);
    160160            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    161                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     161                    _("Specified psImage type, %s, is not supported."),
    162162                    typeStr);
    163163            psFree(out);
     
    184184    if (in == NULL) {
    185185        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    186                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     186                _("Can not operate on a NULL psImage."));
    187187        psFree(out);
    188188        return NULL;
     
    191191    if (scale < 1) {
    192192        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    193                 PS_ERRORTEXT_psImageManip_SCALE_NOT_POSITIVE,
     193                _("Specified scale value, %d, must be a positive value."),
    194194                scale);
    195195        psFree(out);
     
    199199    if (mode > PS_INTERPOLATE_LANCZOS4_VARIANCE ) {
    200200        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    201                 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
     201                _("Specified interpolation mode, %d, is unsupported."),
    202202                mode);
    203203        psFree(out);
     
    241241            PS_TYPE_NAME(typeStr,in->type.type);
    242242            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    243                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     243                    _("Specified psImage type, %s, is not supported."),
    244244                    typeStr);
    245245            psFree(out);
     
    262262    if (input == NULL) {
    263263        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    264                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     264                _("Can not operate on a NULL psImage."));
    265265        psFree(out);
    266266        return NULL;
     
    311311    if (input == NULL) {
    312312        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    313                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     313                _("Can not operate on a NULL psImage."));
    314314        psFree(out);
    315315        return NULL;
     
    357357                PS_TYPE_NAME(typeStr,type);
    358358                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    359                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     359                        _("Specified psImage type, %s, is not supported."),
    360360                        typeStr);
    361361                psFree(out);
     
    403403                PS_TYPE_NAME(typeStr,type);
    404404                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    405                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     405                        _("Specified psImage type, %s, is not supported."),
    406406                        typeStr);
    407407                psFree(out);
     
    448448                PS_TYPE_NAME(typeStr,type);
    449449                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    450                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     450                        _("Specified psImage type, %s, is not supported."),
    451451                        typeStr);
    452452                psFree(out);
     
    503503                    cimag(exposed) > PS_MAX_##TYPE) { \
    504504                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]."), \
    506506                        "exposed", \
    507507                        creal(exposed),cimag(exposed), \
     
    570570                PS_TYPE_NAME(typeStr,type); \
    571571                psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
    572                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \
     572                        _("Specified psImage type, %s, is not supported."), \
    573573                        typeStr); \
    574574                psFree(out); \
     
    584584        default:
    585585            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    586                     PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
     586                    _("Specified interpolation mode, %d, is unsupported."),
    587587                    mode);
    588588            psFree(out);
     
    608608    if (input == NULL) {
    609609        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    610                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     610                _("Can not operate on a NULL psImage."));
    611611        psFree(out);
    612612        return NULL;
     
    627627            cimag(exposed) > PS_MAX_##TYPE) { \
    628628        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]."), \
    630630                "exposed", \
    631631                creal(exposed),cimag(exposed), \
     
    666666            PS_TYPE_NAME(typeStr,type); \
    667667            psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
    668                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \
     668                    _("Specified psImage type, %s, is not supported."), \
    669669                    typeStr); \
    670670            psFree(out); \
     
    680680    default:
    681681        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    682                 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
     682                _("Specified interpolation mode, %d, is unsupported."),
    683683                mode);
    684684        psFree(out);
     
    702702    if (input == NULL) {
    703703        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    704                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     704                _("Can not operate on a NULL psImage."));
    705705        psFree(output);
    706706        return NULL;
     
    715715        if (input->numRows != inputMask->numRows || input->numCols != inputMask->numCols) {
    716716            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."),
    718718                    input->numCols, input->numRows,
    719719                    inputMask->numCols, inputMask->numRows );
     
    725725            PS_TYPE_NAME(typeStr,inputMask->type.type);
    726726            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."),
    728728                    typeStr, PS_TYPE_MASK_NAME);
    729729            psFree(output);
     
    734734    if (outToIn == NULL) {
    735735        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    736                 PS_ERRORTEXT_psImageManip_TRANSFORM_NULL);
     736                _("Specified input transform can not be NULL."));
    737737        return NULL;
    738738    }
     
    853853            PS_TYPE_NAME(typeStr,type); \
    854854            psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
    855                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, \
     855                    _("Specified psImage type, %s, is not supported."), \
    856856                    typeStr); \
    857857            psFree(output); \
     
    867867    default:
    868868        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    869                 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
     869                _("Specified interpolation mode, %d, is unsupported."),
    870870                mode);
    871871        psFree(output);
  • trunk/psLib/src/imageops/psImageMaskOps.c

    r7766 r8232  
    88 *  @author David Robbins, MHPCC
    99 *
    10  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-06-30 02:20:06 $
     10 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:23 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2626#include "psMemory.h"
    2727#include "psAssert.h"
    28 #include "psErrorText.h"
     28
    2929#include "psCoord.h"
    3030
  • trunk/psLib/src/imageops/psImagePixelExtract.c

    r7999 r8232  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-07-28 00:44:05 $
     10 *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:23 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121#include "psError.h"
    2222
    23 #include "psErrorText.h"
     23
    2424
    2525#define VECTOR_STORE_ROW_CASE(TYPE) \
     
    3434    if (input == NULL || input->data.V == NULL) {
    3535        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    36                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     36                _("Can not operate on a NULL psImage."));
    3737        psFree(out);
    3838        return NULL;
     
    124124    if (input == NULL || input->data.V == NULL) {
    125125        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    126                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     126                _("Can not operate on a NULL psImage."));
    127127        psFree(out);
    128128        return NULL;
     
    223223    if (input == NULL || input->data.V == NULL) {
    224224        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    225                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     225                _("Can not operate on a NULL psImage."));
    226226        psFree(out);
    227227        return NULL;
     
    350350        if (inRows != mask->numRows || inCols != mask->numCols) {
    351351            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."),
    353353                    mask->numCols,mask->numRows,
    354354                    inCols, inRows);
     
    360360            PS_TYPE_NAME(typeStr,mask->type.type);
    361361            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."),
    363363                    typeStr, PS_TYPE_MASK_NAME);
    364364            psFree(out);
     
    369369    if (stats == NULL) {
    370370        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    371                 PS_ERRORTEXT_psImage_STAT_NULL);
     371                _("Specified statistic can not be NULL."));
    372372        psFree(out);
    373373        return NULL;
     
    378378    if (statistic == 0) {
    379379        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);
    381381        psFree(out);
    382382        return NULL;
     
    466466                PS_TYPE_NAME(typeStr,type);
    467467                psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    468                         PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     468                        _("Specified psImage type, %s, is not supported."),
    469469                        typeStr);
    470470                psFree(out);
     
    531531    } else { // don't know what the direction flag is
    532532        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    533                 PS_ERRORTEXT_psImage_SLICE_DIRECTION_INVALID,
     533                _("Specified slice direction, %d, is invalid."),
    534534                direction);
    535535        psFree(out);
     
    555555    if (input == NULL || input->data.V == NULL) {
    556556        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    557                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     557                _("Can not operate on a NULL psImage."));
    558558        psFree(out);
    559559        return NULL;
     
    588588    if (nSamples < 2) {
    589589        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."),
    591591                nSamples);
    592592        psFree(out);
     
    639639    if (mode < PS_INTERPOLATE_FLAT ) {
    640640        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    641                 PS_ERRORTEXT_psImageManip_INTERPOLATION_MODE_UNSUPPORTED,
     641                _("Specified interpolation mode, %d, is unsupported."),
    642642                mode);
    643643        psFree(out);
     
    648648        if (numRows != mask->numRows || numCols != mask->numCols) {
    649649            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."),
    651651                    mask->numCols,mask->numRows,
    652652                    numCols-1, numRows);
     
    658658            PS_TYPE_NAME(typeStr,mask->type.type);
    659659            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."),
    661661                    typeStr, PS_TYPE_MASK_NAME);
    662662            psFree(out);
     
    719719            PS_TYPE_NAME(typeStr,input->type.type);
    720720            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    721                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     721                    _("Specified psImage type, %s, is not supported."),
    722722                    typeStr);
    723723            psFree(out);
     
    742742    if (input == NULL || input->data.V == NULL) {
    743743        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    744                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     744                _("Can not operate on a NULL psImage."));
    745745        psFree(out);
    746746        return NULL;
     
    752752        if (numRows != mask->numRows || numCols != mask->numCols) {
    753753            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."),
    755755                    mask->numCols,mask->numRows,
    756756                    numCols, numRows);
     
    762762            PS_TYPE_NAME(typeStr,mask->type.type);
    763763            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."),
    765765                    typeStr, PS_TYPE_MASK_NAME);
    766766            psFree(out);
     
    774774            y < input->row0 || y >= (input->row0 + numRows) ) {
    775775        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]."),
    777777                x, y,
    778778                numCols-1, numRows-1);
     
    783783    if (radii == NULL) {
    784784        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    785                 PS_ERRORTEXT_psImage_RADII_VECTOR_NULL);
     785                _("Specified radii vector can not be NULL."));
    786786        psFree(out);
    787787        return NULL;
     
    790790    if (radii->n < 2) {
    791791        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."),
    793793                radii->n);
    794794        psFree(out);
     
    798798    if (stats == NULL) {
    799799        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    800                 PS_ERRORTEXT_psImage_STAT_NULL);
     800                _("Specified statistic can not be NULL."));
    801801        psFree(out);
    802802        return NULL;
     
    807807    if (statistic == 0) {
    808808        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."),
    810810                stats->options);
    811811        psFree(out);
  • trunk/psLib/src/imageops/psImagePixelManip.c

    r7766 r8232  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2006-06-30 02:20:06 $
     12 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2006-08-08 23:32:23 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include "psMemory.h"
    2929#include "psAssert.h"
    30 #include "psErrorText.h"
     30
    3131#include "psCoord.h"
    3232
     
    4747    if (max < min) {
    4848        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."),
    5050                (double)min,(double)max);
    5151        return 0;
     
    6161            if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \
    6262                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)."), \
    6464                        "vmin",vmin, PS_TYPE_##type##_NAME, \
    6565                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    6767            if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \
    6868                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)."), \
    7070                        "vmax",vmax, PS_TYPE_##type##_NAME, \
    7171                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    9090            if (vmin < PS_MIN_##type || vmin > PS_MAX_##type) { \
    9191                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)."), \
    9393                        "vmin",vmin, PS_TYPE_##type##_NAME, \
    9494                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    9696            if (vmax > PS_MAX_##type || vmax < PS_MIN_##type) { \
    9797                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)."), \
    9999                        "vmax",vmax, PS_TYPE_##type##_NAME, \
    100100                        (psF64)PS_MIN_##type,(psF64)PS_MAX_##type); \
     
    132132            PS_TYPE_NAME(typeStr,input->type.type);
    133133            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    134                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     134                    _("Specified psImage type, %s, is not supported."),
    135135                    typeStr);
    136136        }
     
    177177            PS_TYPE_NAME(typeStr,input->type.type);
    178178            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    179                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     179                    _("Specified psImage type, %s, is not supported."),
    180180                    typeStr);
    181181        }
     
    202202    if (image == NULL || overlay == NULL) {
    203203        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    204                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     204                _("Can not operate on a NULL psImage."));
    205205        return pixelsOverlaid;
    206206    }
     
    208208    if (op == NULL) {
    209209        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    210                 PS_ERRORTEXT_psImageManip_OPERATION_NULL);
     210                _("Operation can not be NULL."));
    211211        return pixelsOverlaid;
    212212    }
     
    220220        PS_TYPE_NAME(typeStrOverlay,overlay->type.type);
    221221        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."),
    223223                typeStrOverlay, typeStr);
    224224        return pixelsOverlaid;
     
    239239
    240240        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]."),
    242242                x0, imageColLimit, y0, imageRowLimit,
    243243                imageNumCols, imageNumRows);
     
    295295    default: \
    296296        psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
    297                 PS_ERRORTEXT_psImageManip_OVERLAY_OPERATOR_INVALID, \
     297                _("Specified operation, '%s', is not supported."), \
    298298                op); \
    299299        return pixelsOverlaid; \
     
    319319            PS_TYPE_NAME(typeStr,type);
    320320            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    321                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     321                    _("Specified psImage type, %s, is not supported."),
    322322                    typeStr);
    323323            return pixelsOverlaid;
     
    344344    if (input == NULL) {
    345345        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    346                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     346                _("Can not operate on a NULL psImage."));
    347347        return 0;
    348348    }
     
    350350    if (realMax < realMin) {
    351351        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."),
    353353                (double)realMin, (double)realMax);
    354354        return 0;
     
    356356    if (imagMax < imagMin) {
    357357        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."),
    359359                (double)imagMin, (double)imagMax);
    360360        return 0;
     
    369369                realfcn(vmin) > PS_MAX_##type || imagfcn(vmin) > PS_MAX_##type ) { \
    370370            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]."), \
    372372                    "vmin", creal(vmin), cimag(vmin), \
    373373                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
     
    377377                realfcn(vmax) < PS_MIN_##type || imagfcn(vmax) < PS_MIN_##type ) { \
    378378            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]."), \
    380380                    "vmax", creal(vmax), cimag(vmax), \
    381381                    PS_TYPE_##type##_NAME, PS_MIN_##type, PS_MAX_##type); \
     
    406406            PS_TYPE_NAME(typeStr,input->type.type);
    407407            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    408                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     408                    _("Specified psImage type, %s, is not supported."),
    409409                    typeStr);
    410410        }
  • trunk/psLib/src/imageops/psImageStats.c

    r7766 r8232  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.98 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-06-30 02:20:06 $
     11 *  @version $Revision: 1.99 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-08-08 23:32:23 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3030#include "psImageStats.h"
    3131#include "psAssert.h"
    32 #include "psErrorText.h"
     32
    3333#include "psRegion.h"
    3434#include "psRegionForImage.h"
     
    497497        if (mask == NULL) {
    498498            psError(PS_ERR_BAD_PARAMETER_NULL, true,
    499                     PS_ERRORTEXT_psImage_IMAGE_NULL);
     499                    _("Can not operate on a NULL psImage."));
    500500            return -1;
    501501        }
     
    592592        return -1;
    593593    }/* 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                                    */
    599599    x0 = col0;
    600600    x1 = col1;
     
    632632    default:
    633633        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);
    635635        return -1;
    636636    }
  • trunk/psLib/src/imageops/psImageStructManip.c

    r7524 r8232  
    88 *  @author Robert DeSonia, MHPCC
    99 *
    10  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2006-06-12 20:44:04 $
     10 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2006-08-08 23:32:23 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121#include "psError.h"
    2222
    23 #include "psErrorText.h"
     23
    2424
    2525static psImage* imageSubset(psImage* out,
     
    3535    if (image == NULL || image->data.V == NULL) {
    3636        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    37                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     37                _("Can not operate on a NULL psImage."));
    3838        return NULL;
    3939    }
     
    4141    if ( col0 < image->col0 || row0 < image->row0 ) {
    4242        //        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]."));
    4444        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]."),
    4646                col0, col1-1, row0, row1-1,
    4747                image->numCols-1, image->numRows-1);
     
    5151    if (image->type.dimen != PS_DIMEN_IMAGE) {
    5252        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."));
    5454        return NULL;
    5555    }
     
    6969            row1 > image->row0 + image->numRows ) {
    7070        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]."),
    7272                col0, col1-1, row0, row1-1,
    7373                image->numCols-1, image->numRows-1);
     
    153153    if (input == NULL || input->data.V == NULL) {
    154154        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    155                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     155                _("Can not operate on a NULL psImage."));
    156156        psFree(output);
    157157        return NULL;
     
    160160    if (input == output) {
    161161        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."));
    163163        psFree(output);
    164164        return NULL;
     
    167167    if (input->type.dimen != PS_DIMEN_IMAGE) {
    168168        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."));
    170170        psFree(output);
    171171        return NULL;
     
    287287            PS_TYPE_NAME(typeStr,type);
    288288            psError(PS_ERR_BAD_PARAMETER_TYPE, true,
    289                     PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED,
     289                    _("Specified psImage type, %s, is not supported."),
    290290                    typeStr);
    291291            psFree(output);
     
    302302    if (image == NULL || image->data.V == NULL) {
    303303        psError(PS_ERR_BAD_PARAMETER_NULL, true,
    304                 PS_ERRORTEXT_psImage_IMAGE_NULL);
     304                _("Can not operate on a NULL psImage."));
    305305        return NULL;
    306306    }
     
    335335            row0 >= row1 ) {
    336336        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]."),
    338338                col0, col1-1, row0, row1-1,
    339339                image->numCols-1, image->numRows-1);
Note: See TracChangeset for help on using the changeset viewer.