IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 21078


Ignore:
Timestamp:
Jan 1, 2009, 7:11:45 PM (18 years ago)
Author:
eugene
Message:

adding psMetadataLookup and Add functions for Mask, ImageMask, and VectorMask

Location:
branches/eam_branch_20081230/psLib/src/types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081230/psLib/src/types/psMetadata.c

    r20417 r21078  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.174 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2008-10-28 00:13:19 $
     14 *  @version $Revision: 1.174.8.1 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2009-01-02 05:11:45 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    866866METADATA_ADD_TYPE(F32,psF32,PS_DATA_F32)
    867867METADATA_ADD_TYPE(F64,psF64,PS_DATA_F64)
     868
     869METADATA_ADD_TYPE(Mask,psMaskType,PS_TYPE_MASK)
     870METADATA_ADD_TYPE(VectorMask,psVectorMaskType,PS_TYPE_VECTOR_MASK)
     871METADATA_ADD_TYPE(ImageMask,psImageMaskType,PS_TYPE_IMAGE_MASK)
     872
    868873METADATA_ADD_TYPE(List,psList*,PS_DATA_LIST)
    869874METADATA_ADD_TYPE(Str,const char*,PS_DATA_STRING)
     
    10111016}
    10121017
    1013 #define psMetadataLookupNumTYPE(TYPE) \
    1014 ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \
     1018#define psMetadataLookupNumTYPE(TYPE,NAME) \
     1019ps##TYPE psMetadataLookup##NAME(bool *status, const psMetadata *md, const char *key) \
    10151020{ \
    10161021    psMetadataItem *metadataItem = NULL; \
     
    10811086}
    10821087
    1083 psMetadataLookupNumTYPE(F32)
    1084 psMetadataLookupNumTYPE(F64)
    1085 psMetadataLookupNumTYPE(S8)
    1086 psMetadataLookupNumTYPE(S16)
    1087 psMetadataLookupNumTYPE(S32)
    1088 psMetadataLookupNumTYPE(S64)
    1089 psMetadataLookupNumTYPE(U8)
    1090 psMetadataLookupNumTYPE(U16)
    1091 psMetadataLookupNumTYPE(U32)
    1092 psMetadataLookupNumTYPE(U64)
    1093 psMetadataLookupNumTYPE(Bool)
     1088psMetadataLookupNumTYPE(F32,F32)
     1089psMetadataLookupNumTYPE(F64,F64)
     1090psMetadataLookupNumTYPE(S8,S8)
     1091psMetadataLookupNumTYPE(S16,S16)
     1092psMetadataLookupNumTYPE(S32,S32)
     1093psMetadataLookupNumTYPE(S64,S64)
     1094psMetadataLookupNumTYPE(U8,U8)
     1095psMetadataLookupNumTYPE(U16,U16)
     1096psMetadataLookupNumTYPE(U32,U32)
     1097psMetadataLookupNumTYPE(U64,U64)
     1098psMetadataLookupNumTYPE(Bool,Bool)
     1099
     1100psMetadataLookupNumTYPE(MaskType,Mask)
     1101psMetadataLookupNumTYPE(VectorMaskType,VectorMask)
     1102psMetadataLookupNumTYPE(ImageMaskType,ImageMask)
    10941103
    10951104psMetadataItem* psMetadataGet(const psMetadata *md,
  • branches/eam_branch_20081230/psLib/src/types/psMetadata.h

    r21072 r21078  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2008-08-14 03:18:41 $
     11*  @version $Revision: 1.105.18.1 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2009-01-02 05:11:45 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    763763
    764764
     765/** Add a psMaskType value to metadata collection.
     766 *
     767 *  @return bool:  True for success, False for failure.
     768 */
     769bool psMetadataAddMask(
     770    psMetadata* md,                    ///< Metadata collection to insert metadata item
     771    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     772    const char* name,                  ///< Name of metadata item
     773    int format,                        ///< psMetadataFlag options/flags
     774    const char* comment,               ///< Comment for metadata item
     775    psMaskType value                    ///< Value for metadata item data
     776);
     777
     778
     779/** Add a psVectorMaskType value to metadata collection.
     780 *
     781 *  @return bool:  True for success, False for failure.
     782 */
     783bool psMetadataAddVectorMask(
     784    psMetadata* md,                    ///< Metadata collection to insert metadata item
     785    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     786    const char* name,                  ///< Name of metadata item
     787    int format,                        ///< psMetadataFlag options/flags
     788    const char* comment,               ///< Comment for metadata item
     789    psVectorMaskType value                      ///< Value for metadata item data
     790);
     791
     792
     793/** Add a psImageMaskType value to metadata collection.
     794 *
     795 *  @return bool:  True for success, False for failure.
     796 */
     797bool psMetadataAddImageMask(
     798    psMetadata* md,                    ///< Metadata collection to insert metadata item
     799    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
     800    const char* name,                  ///< Name of metadata item
     801    int format,                        ///< psMetadataFlag options/flags
     802    const char* comment,               ///< Comment for metadata item
     803    psImageMaskType value                       ///< Value for metadata item data
     804);
     805
     806
     807
    765808/** Add a psList to metadata collection.
    766809 *
     
    10951138 */
    10961139psU64 psMetadataLookupU64(
     1140    bool *status,                      ///< Status of lookup.
     1141    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
     1142    const char *key                    ///< Name of metadata key.
     1143);
     1144
     1145
     1146/** Find an item in the metadata collection based on key name and return its integer value.
     1147 *
     1148 *  Items may be found in the metadata by providing a key. If the key is
     1149 *  non-unique, the value of the first item is returned. If the item is not
     1150 *  found, zero is returned.
     1151 *
     1152 * @return psMaskType : Value of metadata item.
     1153 */
     1154psMaskType psMetadataLookupMask(
     1155    bool *status,                      ///< Status of lookup.
     1156    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
     1157    const char *key                    ///< Name of metadata key.
     1158);
     1159
     1160
     1161/** Find an item in the metadata collection based on key name and return its integer value.
     1162 *
     1163 *  Items may be found in the metadata by providing a key. If the key is
     1164 *  non-unique, the value of the first item is returned. If the item is not
     1165 *  found, zero is returned.
     1166 *
     1167 * @return psVectorMaskType : Value of metadata item.
     1168 */
     1169psVectorMaskType psMetadataLookupVectorMask(
     1170    bool *status,                      ///< Status of lookup.
     1171    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
     1172    const char *key                    ///< Name of metadata key.
     1173);
     1174
     1175
     1176/** Find an item in the metadata collection based on key name and return its integer value.
     1177 *
     1178 *  Items may be found in the metadata by providing a key. If the key is
     1179 *  non-unique, the value of the first item is returned. If the item is not
     1180 *  found, zero is returned.
     1181 *
     1182 * @return psImageMaskType : Value of metadata item.
     1183 */
     1184psImageMaskType psMetadataLookupImageMask(
    10971185    bool *status,                      ///< Status of lookup.
    10981186    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
Note: See TracChangeset for help on using the changeset viewer.