IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 14, 2007, 3:20:03 PM (18 years ago)
Author:
Paul Price
Message:

A little bit of cleaning up, and making it so that the statistic to be used may be specified.

File:
1 edited

Legend:

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

    r15599 r15841  
    77 *  @author Eugene Magnier, IfA
    88 *
    9  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-11-13 18:28:02 $
     9 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-12-15 01:20:03 $
    1111 *
    1212 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    3232#include "psStats.h"
    3333#include "psImageBinning.h"
    34 #include "psImageMap.h"
    3534#include "psImagePixelInterpolate.h"
    3635#include "psImageUnbin.h"
    3736
     37#include "psImageMap.h"
     38
    3839static void psImageMapFree(psImageMap *map) {
    3940
    4041    if (!map) return;
    4142
    42     psFree (map->map);
    43     psFree (map->error);
    44     psFree (map->stats);
    45     psFree (map->binning);
     43    psFree(map->map);
     44    psFree(map->error);
     45    psFree(map->stats);
     46    psFree(map->binning);
    4647
    4748    return;
     
    103104}
    104105
    105 bool psImageMapModifyScale(psImageMap *map, int nXruff, int nYruff) {
    106 
     106bool psImageMapModifyScale(psImageMap *map, int nXruff, int nYruff)
     107{
    107108    assert (map);
    108109
     
    121122// generate a psImageMap (or NULL) with the given number of superpixels in X and Y
    122123// this function returns an error if the output map has impossible holes
    123 bool psImageMapGenerate (psImageMap *map, psVector *x, psVector *y, psVector *f, psVector *df, float badFrac) {
     124bool psImageMapGenerate(psImageMap *map, const psVector *x, const psVector *y,
     125                        const psVector *f, const psVector *df, float badFrac)
     126{
     127    // XXX asserts
    124128
    125129    psImage *mask = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_MASK);
     
    253257
    254258// using the points given, generate a map with maximum resolution that yields only good and ok pixels
    255 bool psImageMapGenerateScale (psImageMap *map, psVector *x, psVector *y, psVector *f, psVector *df, float badFrac) {
     259bool psImageMapGenerateScale(psImageMap *map, const psVector *x, const psVector *y,
     260                             const psVector *f, const psVector *df, float badFrac)
     261{
     262    // XXX Asserts
    256263
    257264    int nXruff, nYruff;
     
    297304
    298305// x,y are in fractional pixel coords of the fine image (pixel center: 0.5)
    299 double psImageMapEval (psImageMap *map, float x, float y) {
     306double psImageMapEval(const psImageMap *map, float x, float y) {
    300307
    301308    double result;
     
    306313}
    307314
    308 psVector *psImageMapEvalVector (psImageMap *map, psVector *x, psVector *y) {
     315psVector *psImageMapEvalVector(const psImageMap *map, const psVector *x, const psVector *y) {
    309316
    310317    assert (x);
Note: See TracChangeset for help on using the changeset viewer.