IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 5, 2005, 1:43:58 PM (22 years ago)
Author:
gusciora
Message:

Added some type checking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmSubtractBias.c

    r2857 r2916  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-30 22:22:00 $
     8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-01-05 23:43:58 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    252252    PS_READOUT_CHECK_EMPTY(in, NULL);
    253253    PS_READOUT_CHECK_TYPE(in, PS_TYPE_F32, NULL);
     254
     255    //
     256    // If the overscans != NULL, then check the type of each image.
     257    //
     258    if (overscans != NULL) {
     259        psListElem *tmpOverscan = (psListElem *) overscans->head;
     260        while (NULL != tmpOverscan) {
     261            psImage *myOverscanImage = (psImage *) tmpOverscan->data;
     262            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
     263            tmpOverscan = tmpOverscan->next;
     264        }
     265    }
     266
    254267    if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
    255268        psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE).  Returning in image\n");
     
    301314    }
    302315
     316
     317
     318
    303319    if (overScanAxis == PM_OVERSCAN_NONE) {
    304320        if (fit != PM_FIT_NONE) {
     
    322338    //
    323339    // We subtract each overscan region from the image data.
     340    // If we get here we know that overscans != NULL.
    324341    //
     342
    325343    if (overScanAxis == PM_OVERSCAN_ALL) {
    326344        tmpOverscan = (psListElem *) overscans->head;
    327345        while (NULL != tmpOverscan) {
    328346            myOverscanImage = (psImage *) tmpOverscan->data;
     347
     348            PS_IMAGE_CHECK_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
    329349            psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff);
    330350            if (rc == NULL) {
Note: See TracChangeset for help on using the changeset viewer.