Changeset 21183 for trunk/psModules/src/objects/pmSource.c
- Timestamp:
- Jan 26, 2009, 8:40:07 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/objects/pmSource.c (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/pmSource.c
r20937 r21183 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.6 6$ $Name: not supported by cvs2svn $9 * @date $Date: 200 8-12-08 02:51:14$8 * @version $Revision: 1.67 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-01-27 06:39:38 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 171 171 172 172 // the maskObj is a unique mask array; create a new mask image 173 source->maskObj = in->maskObj ? psImageCopy (NULL, in->maskObj, PS_TYPE_ MASK) : NULL;173 source->maskObj = in->maskObj ? psImageCopy (NULL, in->maskObj, PS_TYPE_IMAGE_MASK) : NULL; 174 174 175 175 source->type = in->type; … … 205 205 mySource->maskView = psImageSubset(readout->mask, srcRegion); 206 206 // the object mask is a copy, and used to define the source pixels 207 mySource->maskObj = psImageCopy(NULL, mySource->maskView, PS_TYPE_ MASK);207 mySource->maskObj = psImageCopy(NULL, mySource->maskView, PS_TYPE_IMAGE_MASK); 208 208 } 209 209 mySource->region = srcRegion; … … 255 255 // re-copy the main mask pixels. NOTE: the user will need to reset the object mask 256 256 // pixels (eg, with psImageKeepCircle) 257 mySource->maskObj = psImageCopy (mySource->maskObj, mySource->maskView, PS_TYPE_ MASK);257 mySource->maskObj = psImageCopy (mySource->maskObj, mySource->maskView, PS_TYPE_IMAGE_MASK); 258 258 259 259 // drop the old modelFlux pixels and force the user to re-create … … 505 505 *****************************************************************************/ 506 506 507 bool pmSourceRoughClass(psRegion *region, psArray *sources, psMetadata *recipe, pmPSFClump clump, ps MaskType maskSat)507 bool pmSourceRoughClass(psRegion *region, psArray *sources, psMetadata *recipe, pmPSFClump clump, psImageMaskType maskSat) 508 508 { 509 509 psTrace("psModules.objects", 5, "---- begin ----"); … … 738 738 psF32 *vPix = source->pixels->data.F32[row]; 739 739 psF32 *vWgt = source->weight->data.F32[row]; 740 ps U8 *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.U8[row];740 psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row]; 741 741 742 742 for (psS32 col = 0; col < source->pixels->numCols ; col++, vPix++, vWgt++) { … … 848 848 # endif 849 849 // construct a realization of the source model 850 bool pmSourceCacheModel (pmSource *source, ps MaskType maskVal) {850 bool pmSourceCacheModel (pmSource *source, psImageMaskType maskVal) { 851 851 PS_ASSERT_PTR_NON_NULL(source, false); 852 852 // select appropriate model … … 867 867 // construct a realization of the source model 868 868 // XXX this function should optionally save an existing psf image from modelFlux 869 bool pmSourceCachePSF (pmSource *source, ps MaskType maskVal) {869 bool pmSourceCachePSF (pmSource *source, psImageMaskType maskVal) { 870 870 PS_ASSERT_PTR_NON_NULL(source, false); 871 871 … … 885 885 886 886 // should we call pmSourceCacheModel if it does not exist? 887 bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, ps MaskType maskVal, int dx, int dy)887 bool pmSourceOp (pmSource *source, pmModelOpMode mode, bool add, psImageMaskType maskVal, int dx, int dy) 888 888 { 889 889 PS_ASSERT_PTR_NON_NULL(source, false); … … 915 915 } 916 916 917 ps U8**mask = NULL;917 psImageMaskType **mask = NULL; 918 918 if (source->maskObj) { 919 mask = source->maskObj->data. U8;919 mask = source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA; 920 920 } 921 921 … … 957 957 } 958 958 959 bool pmSourceAdd (pmSource *source, pmModelOpMode mode, ps MaskType maskVal) {959 bool pmSourceAdd (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal) { 960 960 return pmSourceOp (source, mode, true, maskVal, 0, 0); 961 961 } 962 962 963 bool pmSourceSub (pmSource *source, pmModelOpMode mode, ps MaskType maskVal) {963 bool pmSourceSub (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal) { 964 964 return pmSourceOp (source, mode, false, maskVal, 0, 0); 965 965 } 966 966 967 bool pmSourceAddWithOffset (pmSource *source, pmModelOpMode mode, ps MaskType maskVal, int dx, int dy) {967 bool pmSourceAddWithOffset (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal, int dx, int dy) { 968 968 return pmSourceOp (source, mode, true, maskVal, dx, dy); 969 969 } 970 970 971 bool pmSourceSubWithOffset (pmSource *source, pmModelOpMode mode, ps MaskType maskVal, int dx, int dy) {971 bool pmSourceSubWithOffset (pmSource *source, pmModelOpMode mode, psImageMaskType maskVal, int dx, int dy) { 972 972 return pmSourceOp (source, mode, false, maskVal, dx, dy); 973 973 }
Note:
See TracChangeset
for help on using the changeset viewer.
