Changeset 4992 for trunk/psModules/src/pmImageSubtract.h
- Timestamp:
- Sep 11, 2005, 12:25:39 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmImageSubtract.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmImageSubtract.h
r4417 r4992 7 7 * @author GLG, MHPCC 8 8 * 9 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 6-28 23:23:55$9 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-09-11 22:25:39 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 27 27 28 28 typedef enum { 29 PM_SUBTRACTION_KERNEL_POIS, ///< POIS kernel --- delta functions30 PM_SUBTRACTION_KERNEL_ISIS ///< ISIS kernel --- gaussians modified by polynomials29 PM_SUBTRACTION_KERNEL_POIS, ///< POIS kernel --- delta functions 30 PM_SUBTRACTION_KERNEL_ISIS ///< ISIS kernel --- gaussians modified by polynomials 31 31 } pmSubtractionKernelsType; 32 32 33 33 typedef struct 34 34 { 35 pmSubtractionKernelsType type; ///< Type ofKernels --- allowing the use of multiple kernels36 psVector *u, *v; ///< Offset (for POIS) or polynomial order (for ISIS)37 psVector *sigma; ///< Width of Gaussian (for ISIS)38 psVector *xOrder, *yOrder; ///< Spatial Polynomial order (for all)39 int subIndex; ///< Index of kernel to be subtracted to maintain flux conservation40 psArray *preCalc; ///< Array of images containing pre-calculated kernel (to35 pmSubtractionKernelsType type; ///< Type ofKernels --- allowing the use of multiple kernels 36 psVector *u, *v; ///< Offset (for POIS) or polynomial order (for ISIS) 37 psVector *sigma; ///< Width of Gaussian (for ISIS) 38 psVector *xOrder, *yOrder; ///< Spatial Polynomial order (for all) 39 int subIndex; ///< Index of kernel to be subtracted to maintain flux conservation 40 psArray *preCalc; ///< Array of images containing pre-calculated kernel (to 41 41 ///< accelerate ISIS; don't use for POIS) 42 psS32 p_size;///< The halfsize of the kernel43 psS32 p_spatialOrder;///< The spatial order of the kernels42 psS32 size; ///< The halfsize of the kernel 43 psS32 spatialOrder; ///< The spatial order of the kernels 44 44 } 45 45 psSubtractionKernels; 46 46 47 psSubtractionKernels *pmSubtractionKernelsAllocPOIS(int size, 48 int SpatialOrder); 47 psSubtractionKernels *pmSubtractionKernelsAllocPOIS( 48 int size, 49 int SpatialOrder 50 ); 49 51 50 psSubtractionKernels *pmSubtractionKernelsAllocISIS(const psVector *sigmas, 51 const psVector *orders, 52 int size, 53 int SpatialOrder); 52 psSubtractionKernels *pmSubtractionKernelsAllocISIS( 53 const psVector *sigmas, 54 const psVector *orders, 55 int size, 56 int SpatialOrder 57 ); 54 58 55 59 typedef enum { 56 PM_STAMP_INIT, ///< Initial state57 PM_STAMP_USED, ///< Use this stamp58 PM_STAMP_REJECTED, ///< This stamp has been rejected59 PM_STAMP_RECALC, ///< Having been reset, this stamp is to be recalculated60 PM_STAMP_NONE ///< No stamp in this region60 PM_STAMP_INIT, ///< Initial state 61 PM_STAMP_USED, ///< Use this stamp 62 PM_STAMP_REJECTED, ///< This stamp has been rejected 63 PM_STAMP_RECALC, ///< Having been reset, this stamp is to be recalculated 64 PM_STAMP_NONE ///< No stamp in this region 61 65 } pmStampStatus; 62 66 63 67 typedef struct 64 68 { 65 int x, y; ///< Position69 int x, y; ///< Position 66 70 int p_xSize; 67 71 int p_ySize; … … 70 74 int p_yMin; 71 75 int p_yMax; 72 psImage *matrix; ///< Associated matrix73 psVector *vector; ///< Assoicated vector74 pmStampStatus status; ///< Status ofstamp76 psImage *matrix; ///< Associated matrix 77 psVector *vector; ///< Assoicated vector 78 pmStampStatus status; ///< Status ofstamp 75 79 } 76 80 pmStamp; 77 81 78 psArray *pmSubtractionFindStamps(psArray *stamps, ///< Output stamps, or NULL 79 const psImage *image, ///< Image for which to find stamps 80 const psImage *mask, ///< Mask 81 psU32 maskVal, ///< Value for mask 82 psF32 threshold, ///< Threshold for stamps in the image 83 psS32 xNum, ///< Number of stamps in x 84 psS32 yNum, ///< Number of stamps in y 85 psS32 border ///< Border around image to ignore (should be size of kernel) 86 ); 82 psArray *pmSubtractionFindStamps( 83 psArray *stamps, ///< Output stamps, or NULL 84 const psImage *image, ///< Image for which to find stamps 85 const psImage *mask, ///< Mask 86 psU32 maskVal, ///< Value for mask 87 psF32 threshold, ///< Threshold for stamps in the image 88 psS32 xNum, ///< Number of stamps in x 89 psS32 yNum, ///< Number of stamps in y 90 psS32 border ///< Border around image to ignore (should be size of kernel) 91 ); 87 92 88 bool pmSubtractionCalculateEquation(psArray *stamps, ///< The stamps for which to calculate the equation, 89 const psImage *reference, ///< Reference image 90 const psImage *input, ///< Input image 91 const psSubtractionKernels *kernels, ///< The kernel basis functions 92 psS32 footprint ///< Half-size of region over which to calculate equation 93 ); 93 bool pmSubtractionCalculateEquation( 94 psArray *stamps, ///< The stamps for which to calculate the equation, 95 const psImage *reference, ///< Reference image 96 const psImage *input, ///< Input image 97 const psSubtractionKernels *kernels,///< The kernel basis functions 98 psS32 footprint ///< Half-size of region over which to calculate equation 99 ); 94 100 95 101 96 psVector *pmSubtractionSolveEquation(psVector *solution, ///< Solution vector, or NULL 97 const psArray *stamps ///< Array of stamps 98 ); 102 psVector *pmSubtractionSolveEquation( 103 psVector *solution, ///< Solution vector, or NULL 104 const psArray *stamps ///< Array of stamps 105 ); 99 106 100 bool pmSubtractionRejectStamps(psArray *stamps, ///< Array of stamps to check for rejection 101 psImage *mask, ///< Mask image 102 psU32 badStampMaskVal, ///< Value to use in mask for bad stamp 103 psS32 footprint, ///< Region to mask if stamp is bad 104 psF32 sigmaRej, ///< Number of RMS deviations above zero at which to reject 105 const psImage *refImage, ///< Reference image 106 const psImage *inImage, ///< Input image 107 const psVector *solution, ///< Solution vector 108 const psSubtractionKernels *kernels ///< Array of kernel parameters 109 ); 107 bool pmSubtractionRejectStamps( 108 psArray *stamps, ///< Array of stamps to check for rejection 109 psImage *mask, ///< Mask image 110 psU32 badStampMaskVal, ///< Value to use in mask for bad stamp 111 psS32 footprint, ///< Region to mask if stamp is bad 112 psF32 sigmaRej, ///< Number of RMS deviations above zero at which to reject 113 const psImage *refImage, ///< Reference image 114 const psImage *inImage, ///< Input image 115 const psVector *solution, ///< Solution vector 116 const psSubtractionKernels *kernels ///< Array of kernel parameters 117 ); 110 118 111 psImage *pmSubtractionKernelImage(psImage *out, 112 const psVector *solution, 113 const psSubtractionKernels *kernels, 114 psF32 x, 115 psF32 y 116 ); 119 psImage *pmSubtractionKernelImage( 120 psImage *out, 121 const psVector *solution, 122 const psSubtractionKernels *kernels, 123 psF32 x, 124 psF32 y 125 ); 117 126 118 127 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
