Changeset 21172 for trunk/psLib
- Timestamp:
- Jan 26, 2009, 2:00:45 PM (17 years ago)
- Location:
- trunk/psLib/src/imageops
- Files:
-
- 3 edited
-
psImageMap.c (modified) (3 diffs)
-
psImageMap.h (modified) (2 diffs)
-
psImageMapFit.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/imageops/psImageMap.c
r20767 r21172 7 7 * @author Eugene Magnier, IfA 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 200 8-11-17 02:37:28$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-01-27 00:00:21 $ 11 11 * 12 12 * Copyright 2007 Institute for Astronomy, University of Hawaii … … 353 353 } 354 354 355 psVector *psImageMapEvalVector(const psImageMap *map, const psVector * x, const psVector *y)355 psVector *psImageMapEvalVector(const psImageMap *map, const psVector *mask, psMaskType maskValue, const psVector *x, const psVector *y) 356 356 { 357 357 PS_ASSERT_IMAGE_MAP_NON_NULL(map, NULL); … … 365 365 366 366 for (int i = 0; i < x->n; i++) { 367 result->data.F32[i] = psImageUnbinPixel(x->data.F32[i], y->data.F32[i], map->map, map->binning); 367 if (mask && (mask->data.U8[i] & maskValue)) { 368 result->data.F32[i] = 0.0; 369 } else { 370 result->data.F32[i] = psImageUnbinPixel(x->data.F32[i], y->data.F32[i], map->map, map->binning); 371 } 368 372 } 369 373 -
trunk/psLib/src/imageops/psImageMap.h
r19960 r21172 7 7 * @author Eugene Magnier, IfA 8 8 * 9 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $10 * @date $Date: 200 8-10-07 22:23:06$9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-01-27 00:00:21 $ 11 11 * 12 12 * Copyright 2007 Institute for Astronomy, University of Hawaii … … 77 77 78 78 // apply the psImageMap to the given coordinate vectors (fine image pixels) 79 psVector *psImageMapEvalVector (const psImageMap *map, const psVector * x, const psVector *y);79 psVector *psImageMapEvalVector (const psImageMap *map, const psVector *mask, psMaskType maskValue, const psVector *x, const psVector *y); 80 80 81 81 /// @} -
trunk/psLib/src/imageops/psImageMapFit.c
r20075 r21172 7 7 * @author Eugene Magnier, IfA 8 8 * 9 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $10 * @date $Date: 200 8-10-13 01:55:48$9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-01-27 00:00:21 $ 11 11 * 12 12 * Copyright 2007 Institute for Astronomy, University of Hawaii … … 397 397 } 398 398 399 psVector *fit = psImageMapEvalVector(map, x, y);399 psVector *fit = psImageMapEvalVector(map, mask, maskValue, x, y); 400 400 if (fit == NULL) { 401 401 psError(PS_ERR_UNKNOWN, false, "Failure in psImageMapEvalVector().\n");
Note:
See TracChangeset
for help on using the changeset viewer.
