IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2009, 8:40:07 PM (17 years ago)
Author:
eugene
Message:

incorporating changes from 16bit mask upgrades (eam_branch_20081230)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfigMask.h

    r18598 r21183  
    44 *  @author Paul Price, IfA
    55 *
    6  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2008-07-17 20:37:20 $
     6 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2009-01-27 06:39:38 $
    88 *  Copyright 2007 Institute for Astronomy, University of Hawaii
    99 */
     
    2020/// @{
    2121
     22// structure to hold the properties of a mask value
     23typedef struct {
     24    char *badMaskName;                  // name for "bad" (i.e., mask me please) pixels
     25    char *fallbackName;                 // Fallback name in case a bad mask name is not defined
     26    psImageMaskType defaultMaskValue;   // Default value in case a bad mask name and its fallback are not defined
     27    bool isBad; // include this value as part of the MASK.VALUE entry (generically bad)
     28} pmConfigMaskInfo;
     29
     30// pmConfigMaskSetInMetadata examines named mask values and set the bits for maskValue and
     31// markValue.  Ensures that the below-named mask values are set, and calculates the mask value
     32// to catch all of the mask values marked as 'bad'.  Supplies the fallback name if the primary
     33// name is not found, or the default values if the fallback name is not found.
     34bool pmConfigMaskSetInMetadata(psImageMaskType *outMaskValue, // Value of MASK.VALUE, returned
     35                               psImageMaskType *outMarkValue, // Value of MARK.VALUE, returned
     36                               psMetadata *source  // Source of mask bits
     37  );
     38
     39
     40// Get a mask value by name(s)
     41psImageMaskType pmConfigMaskGetFromMetadata(psMetadata *source, // Source of masks
     42                                            const char *masks // Mask values to get
     43  );
     44
     45
     46// lookup an image mask value by name from a psMetadata, without requiring the entry to
     47// be of type psImageMaskType, but verifying that it will fit in psImageMaskType
     48psImageMaskType psMetadataLookupImageMaskFromGeneric (bool *status, const psMetadata *md, const char *name);
     49
     50// Remove from the header keywords starting with the provided string
     51int pmConfigMaskRemoveHeaderKeywords(psMetadata *header, // Header from which to remove keywords
     52                                     const char *start // Remove keywords that start with this string
     53  );
     54
    2255/// Return a mask value given a list of symbolic names
    2356///
    2457/// The mask values are derived from the MASKS recipe
    25 psMaskType pmConfigMaskGet(const char *masks, ///< List of symbolic names, space/comma delimited
     58psImageMaskType pmConfigMaskGet(const char *masks, ///< List of symbolic names, space/comma delimited
    2659                           const pmConfig *config ///< Configuration
    2760    );
    2861
    29 bool pmConfigMaskSet(const pmConfig *config, const char *maskName, psMaskType maskValue);
     62bool pmConfigMaskSet(const pmConfig *config, const char *maskName, psImageMaskType maskValue);
    3063
    3164// replace the named masks in the recipe with values in the header:
     
    3669bool pmConfigMaskWriteHeader(const pmConfig *config, psMetadata *header);
    3770
    38 bool pmConfigMaskSetBits(psMaskType *outMaskValue, psMaskType *outMarkValue, const pmConfig *config);
     71bool pmConfigMaskSetBits(psImageMaskType *outMaskValue, psImageMaskType *outMarkValue, const pmConfig *config);
    3972
    4073#endif
Note: See TracChangeset for help on using the changeset viewer.