Changeset 15841 for trunk/psLib/src/imageops/psImageMap.c
- Timestamp:
- Dec 14, 2007, 3:20:03 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/imageops/psImageMap.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageMap.c
r15599 r15841 7 7 * @author Eugene Magnier, IfA 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2007-1 1-13 18:28:02$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2007-12-15 01:20:03 $ 11 11 * 12 12 * Copyright 2007 Institute for Astronomy, University of Hawaii … … 32 32 #include "psStats.h" 33 33 #include "psImageBinning.h" 34 #include "psImageMap.h"35 34 #include "psImagePixelInterpolate.h" 36 35 #include "psImageUnbin.h" 37 36 37 #include "psImageMap.h" 38 38 39 static void psImageMapFree(psImageMap *map) { 39 40 40 41 if (!map) return; 41 42 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); 46 47 47 48 return; … … 103 104 } 104 105 105 bool psImageMapModifyScale(psImageMap *map, int nXruff, int nYruff) {106 106 bool psImageMapModifyScale(psImageMap *map, int nXruff, int nYruff) 107 { 107 108 assert (map); 108 109 … … 121 122 // generate a psImageMap (or NULL) with the given number of superpixels in X and Y 122 123 // 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) { 124 bool psImageMapGenerate(psImageMap *map, const psVector *x, const psVector *y, 125 const psVector *f, const psVector *df, float badFrac) 126 { 127 // XXX asserts 124 128 125 129 psImage *mask = psImageAlloc (map->map->numCols, map->map->numRows, PS_TYPE_MASK); … … 253 257 254 258 // 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) { 259 bool psImageMapGenerateScale(psImageMap *map, const psVector *x, const psVector *y, 260 const psVector *f, const psVector *df, float badFrac) 261 { 262 // XXX Asserts 256 263 257 264 int nXruff, nYruff; … … 297 304 298 305 // x,y are in fractional pixel coords of the fine image (pixel center: 0.5) 299 double psImageMapEval (psImageMap *map, float x, float y) {306 double psImageMapEval(const psImageMap *map, float x, float y) { 300 307 301 308 double result; … … 306 313 } 307 314 308 psVector *psImageMapEvalVector (psImageMap *map, psVector *x,psVector *y) {315 psVector *psImageMapEvalVector(const psImageMap *map, const psVector *x, const psVector *y) { 309 316 310 317 assert (x);
Note:
See TracChangeset
for help on using the changeset viewer.
