IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2006, 3:02:08 PM (20 years ago)
Author:
Paul Price
Message:

Applying RHL patch. Generally improves the error handling and traceback. pmConcepts.c and pmConceptsRead.c done by PAP (RHL did this also, but I had already done them). Resolved conflicts, except for pmFPAfile.c, which uses psAbort in some instances where RHL's patch had psError; leave this for Gene to decide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSource.c

    r7283 r7311  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-06-02 02:16:05 $
     8 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-06-03 01:02:08 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4646{
    4747    psTrace(__func__, 3, "---- %s() begin ----\n", __func__);
     48    static int id = 1;
    4849    pmSource *tmp = (pmSource *) psAlloc(sizeof(pmSource));
     50    *(int *)&tmp->id = id++;
    4951    tmp->peak = NULL;
    5052    tmp->pixels = NULL;
     
    6971}
    7072
     73bool pmIsSource(const psPtr ptr)
     74{
     75    return (psMemGetDeallocator(ptr) == (psFreeFunc)sourceFree);
     76}
     77
    7178// x,y are defined in the parent image coords of readout->image
    7279bool pmSourceDefinePixels(pmSource *mySource,
     
    8289    srcRegion = psRegionForImage (readout->image, srcRegion);
    8390
    84     mySource->pixels = psImageSubset(readout->image, srcRegion);
    85     mySource->weight = psImageSubset(readout->weight, srcRegion);
    86     mySource->mask   = psImageSubset(readout->mask,  srcRegion);
     91    mySource->pixels = psMemIncrRefCounter(psImageSubset(readout->image, srcRegion));
     92    mySource->weight = psMemIncrRefCounter(psImageSubset(readout->weight, srcRegion));
     93    mySource->mask   = psMemIncrRefCounter(psImageSubset(readout->mask,  srcRegion));
    8794    mySource->region = srcRegion;
    8895
     
    123130        psFree (mySource->mask);
    124131
    125         mySource->pixels = psImageSubset(readout->image,  newRegion);
    126         mySource->weight = psImageSubset(readout->weight, newRegion);
    127         mySource->mask   = psImageSubset(readout->mask,   newRegion);
     132        mySource->pixels = psMemIncrRefCounter(psImageSubset(readout->image,  newRegion));
     133        mySource->weight = psMemIncrRefCounter(psImageSubset(readout->weight, newRegion));
     134        mySource->mask   = psMemIncrRefCounter(psImageSubset(readout->mask,   newRegion));
    128135        mySource->region = newRegion;
    129136    }
Note: See TracChangeset for help on using the changeset viewer.