IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 23, 2007, 4:59:46 PM (19 years ago)
Author:
eugene
Message:

added APIs to define psImageMap without psImage pointer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageMap.c

    r14983 r14988  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-09-22 03:05:50 $
     9 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-09-24 02:59:46 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    6969    psImageBinningSetScale (map->binning, PS_IMAGE_BINNING_CENTER);
    7070    psImageBinningSetSkip (map->binning, map->field);
     71
     72    return map;
     73}
     74
     75// allocate the image map using the psImageBinning supplied
     76psImageMap *psImageMapNoImageAlloc(psImageBinning *binning, psStats *stats) {
     77
     78    assert (binning);
     79    assert (stats);
     80
     81    psImageMap *map = (psImageMap*)psAlloc(sizeof(psImageMap));
     82    psMemSetDeallocator(map, (psFreeFunc)psImageMapFree);
     83
     84    map->field   = NULL;
     85    map->stats   = psMemIncrRefCounter (stats);
     86    map->binning = psMemIncrRefCounter (binning);
     87
     88    map->map     = psImageAlloc (binning->nXruff, binning->nYruff, PS_TYPE_F32);
     89    psImageInit (map->map, 0.0);
     90
     91    map->error   = psImageAlloc (binning->nXruff, binning->nYruff, PS_TYPE_F32);
     92    psImageInit (map->error, 0.0);
    7193
    7294    return map;
Note: See TracChangeset for help on using the changeset viewer.