IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13031


Ignore:
Timestamp:
Apr 25, 2007, 12:55:04 PM (19 years ago)
Author:
magnier
Message:

forcing biassec and trimsec to have integer bounds

Location:
branches/eam_02_branch/psModules/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_02_branch/psModules/src/camera/pmFPACopy.c

    r12838 r13031  
    211211        if (mdok && trimsec && !psRegionIsNaN(*trimsec)) {
    212212            *trimsec = psImageBinningSetRuffRegion(binning, *trimsec);
     213            // force integer pixels : truncate x0, roundup x1:
     214            trimsec->x0 = (int)trimsec->x0;
     215            if (trimsec->x1 > (int)trimsec->x1) {
     216                trimsec->x1 = (int)trimsec->x1 + 1;
     217            } else {
     218                trimsec->x1 = (int)trimsec->x1;
     219            }           
     220            trimsec->y0 = (int)trimsec->y0;
     221            if (trimsec->y1 > (int)trimsec->y1) {
     222                trimsec->y1 = (int)trimsec->y1 + 1;
     223            } else {
     224                trimsec->y1 = (int)trimsec->y1;
     225            }           
    213226        }
    214227        psList *biassecs = psMetadataLookupPtr(&mdok, target->concepts, "CELL.BIASSEC"); // The bias sections
     
    219232                if (!psRegionIsNaN(*biassec)) {
    220233                    *biassec = psImageBinningSetRuffRegion(binning, *biassec);
     234                    // force integer pixels : truncate x0, roundup x1:
     235                    biassec->x0 = (int)biassec->x0;
     236                    if (biassec->x1 > (int)biassec->x1) {
     237                        biassec->x1 = (int)biassec->x1 + 1;
     238                    } else {
     239                        biassec->x1 = (int)biassec->x1;
     240                    }           
     241                    biassec->y0 = (int)biassec->y0;
     242                    if (biassec->y1 > (int)biassec->y1) {
     243                        biassec->y1 = (int)biassec->y1 + 1;
     244                    } else {
     245                        biassec->y1 = (int)biassec->y1;
     246                    }           
    221247                }
    222248            }
  • branches/eam_02_branch/psModules/src/concepts/pmConceptsUpdate.c

    r12696 r13031  
    4444            psRegion *trimsec = psMetadataLookupPtr(NULL, cell->concepts, "CELL.TRIMSEC"); // Trim section
    4545            *trimsec = psImageBinningSetRuffRegion (binning, *trimsec);
     46            // force integer pixels : truncate x0, roundup x1:
     47            trimsec->x0 = (int)trimsec->x0;
     48            if (trimsec->x1 > (int)trimsec->x1) {
     49                trimsec->x1 = (int)trimsec->x1 + 1;
     50            } else {
     51                trimsec->x1 = (int)trimsec->x1;
     52            }           
     53            trimsec->y0 = (int)trimsec->y0;
     54            if (trimsec->y1 > (int)trimsec->y1) {
     55                trimsec->y1 = (int)trimsec->y1 + 1;
     56            } else {
     57                trimsec->y1 = (int)trimsec->y1;
     58            }           
    4659            psMetadataRemoveKey(cell->concepts, "CELL.TRIMSEC.UPDATE");
    4760        }
     
    5467            while ((biassec = psListGetAndIncrement(biassecsIter))) {
    5568                *biassec = psImageBinningSetRuffRegion (binning, *biassec);
     69                // force integer pixels : truncate x0, roundup x1:
     70                biassec->x0 = (int)biassec->x0;
     71                if (biassec->x1 > (int)biassec->x1) {
     72                    biassec->x1 = (int)biassec->x1 + 1;
     73                } else {
     74                    biassec->x1 = (int)biassec->x1;
     75                }               
     76                biassec->y0 = (int)biassec->y0;
     77                if (biassec->y1 > (int)biassec->y1) {
     78                    biassec->y1 = (int)biassec->y1 + 1;
     79                } else {
     80                    biassec->y1 = (int)biassec->y1;
     81                }               
    5682            }
    5783            psFree(biassecsIter);
Note: See TracChangeset for help on using the changeset viewer.