IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 13, 2007, 4:36:28 PM (19 years ago)
Author:
magnier
Message:

changing p_psVectorBinDisect to psVectorBinaryDisect, adding psVectorBinaryDisectResult

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psHistogram.c

    r11759 r12434  
    55 *  @author GLG (MHPCC), EAM (IfA)
    66 *
    7  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-02-13 03:01:24 $
     7 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-03-14 02:36:28 $
    99 *
    1010 *  Copyright 2006 IfA, University of Hawaii
     
    306306                    // correct bin number requires a bit more work.
    307307                    tmpScalar.data.F32 = inF32->data.F32[i];
    308                     binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar);
    309                     if (binNum < 0) {
    310                         psLogMsg(__func__, PS_LOG_WARN,
    311                                  "WARNING: psVectorHistogram(): element outside histogram bounds.\n");
    312                     } else {
    313                         if (errorsF32 != NULL) {
    314                             if (!UpdateHistogramBins(binNum, out, inF32->data.F32[i], errors->data.F32[i])) {
    315                                 psLogMsg(__func__, PS_LOG_WARN, "WARNING: Failed to update the histogram "
    316                                          "bins with the errors vector.\n");
    317                             }
    318                         } else {
    319                             out->nums->data.F32[binNum] += 1.0;
    320                         }
    321                     }
     308                    psVectorBinaryDisectResult result;
     309                    binNum = psVectorBinaryDisect(&result, out->bounds, &tmpScalar);
     310                    if (result != PS_BINARY_DISECT_PASS) {
     311                        continue;
     312                    }
     313                    if (errorsF32 != NULL) {
     314                        if (!UpdateHistogramBins(binNum, out, inF32->data.F32[i], errors->data.F32[i])) {
     315                            psLogMsg(__func__, PS_LOG_WARN, "WARNING: Failed to update the histogram "
     316                                     "bins with the errors vector.\n");
     317                        }
     318                    } else {
     319                        out->nums->data.F32[binNum] += 1.0;
     320                    }
    322321                }
    323322            }
Note: See TracChangeset for help on using the changeset viewer.