Changeset 1822 for trunk/psModules/src/pmFlatField.h
- Timestamp:
- Sep 16, 2004, 2:49:04 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/pmFlatField.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/pmFlatField.h
r1814 r1822 1 1 /** @file pmFlatField.h 2 2 * 3 * @brief Given an input image and a flat-field image, pmFlatField shall divide the input image by the flat-field image. 3 * @brief Given an input image and a flat field image, pmFlatField shall divide the input image by the flat 4 * field image. 4 5 * 5 * The input image, in, and the flat-field image, flat, need not be the same size, since the input image may already have 6 * been trimmed (following overscan subtraction), but the function shall use the offsets in the image (in->x0 7 * and in->y0) to determine the appropriate offsets to obtain the correct pixel on the flat-field. In the event that the flat 8 * image is too small (i.e., pixels on the input image refer to pixels outside the range of the flat image), the function shall 9 * generate an error. Pixels which are negative or zero in the flat shall be masked in the input image with the value PM_MASK_FLAT 10 * Negative pixels in the flat may be set to zero so that they are treated identically to zeroes. Any pixels masked in the flat 11 * shall be masked with corresponding values in the output. The function shall not normalize the flat; this responsibility is 12 * left to the caller. This function is basically equivalent to a divide (with psImageOp), but with care for the region that is 13 * divided, checking for negative pixels, and copying of the mask from the flat to the output. 6 * The input image, in, and the flat field image, flat, need not be the same size, since the input image may 7 * already have been trimmed (following overscan subtraction), but the function shall use the offsets in the 8 * image (in->x0 and in->y0) to determine the appropriate offsets to obtain the correct pixel on the flat 9 * field. In the event that the flat image is too small (i.e., pixels on the input image refer to pixels 10 * outside the range of the flat image), the function shall generate an error. Pixels which are negative or 11 * zero in the flat shall be masked in the input image with the value PM_MASK_FLAT. Negative pixels in the 12 * flat may be set to zero so that they are treated identically to zeroes. Any pixels masked in the flat 13 * shall be masked with corresponding values in the output. The function shall not normalize the flat; this 14 * responsibility is left to the caller. This function is basically equivalent to a divide (with psImageOp), 15 * but with care for the region that is divided, checking for negative pixels, and copying of the mask from 16 * the flat to the output. 14 17 * 15 18 * @author Ross Harman, MHPCC 16 19 * 17 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $18 * @date $Date: 2004-09-1 5 01:04:50$20 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2004-09-17 00:49:04 $ 19 22 * 20 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 26 #include "pslib.h" 24 27 25 /** Mask values */ 26 typedef enum { 27 PM_MASK_TRAP = 0x0001, ///< The pixel is a charge trap 28 PM_MASK_BADCOL = 0x0002, ///< The pixel is a bad column 29 PM_MASK_SAT = 0x0004, ///< The pixel is saturated 30 PM_MASK_FLAT = 0x0008 ///< The pixel is non-positive in the flat-field 31 } pmMaskValue; 28 /** Execute flat field module. 29 * 30 * Given an input image and a flat-field image, pmFlatField shall divide the input image by the flat field 31 * image. 32 * 33 * @return bool: True or false for success or failure 34 */ 35 bool pmFlatField( 36 psReadout *in, ///< Redout with input image and mask 37 const psReadout *flat ///< Readout with flat image 38 ); 32 39 33 bool pmFlatField(psReadout *in, psReadout *inMask, const psReadout *flat);34
Note:
See TracChangeset
for help on using the changeset viewer.
