IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8820


Ignore:
Timestamp:
Sep 15, 2006, 4:33:02 PM (20 years ago)
Author:
Paul Price
Message:

Allow pixels to be specified by a floating point value, so long as it's not fractional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r8815 r8820  
    545545        TYPE_CASE(offset, concept, S32);
    546546    default:
    547         psError(PS_ERR_UNKNOWN, true, "Concept %s is not of integer type, as expected.\n", pattern->name);
    548         return NULL;
     547        if (concept->type == PS_TYPE_F32 && concept->data.F32 - (int)concept->data.F32 == 0) {
     548            offset = concept->data.F32;
     549        } else if (concept->type == PS_TYPE_F64 && concept->data.F64 - (int)concept->data.F64 == 0) {
     550            offset = concept->data.F64;
     551        } else {
     552            psError(PS_ERR_UNKNOWN, true, "Concept %s is not of integer type, as expected.\n", pattern->name);
     553            return NULL;
     554        }
    549555    }
    550556    offset -= fortranCorr(cameraFormat, pattern->name);
Note: See TracChangeset for help on using the changeset viewer.