Index: /branches/eam_branch_20081230/psLib/src/types/psMetadata.c
===================================================================
--- /branches/eam_branch_20081230/psLib/src/types/psMetadata.c	(revision 21077)
+++ /branches/eam_branch_20081230/psLib/src/types/psMetadata.c	(revision 21078)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.174 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-28 00:13:19 $
+ *  @version $Revision: 1.174.8.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-01-02 05:11:45 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -866,4 +866,9 @@
 METADATA_ADD_TYPE(F32,psF32,PS_DATA_F32)
 METADATA_ADD_TYPE(F64,psF64,PS_DATA_F64)
+
+METADATA_ADD_TYPE(Mask,psMaskType,PS_TYPE_MASK)
+METADATA_ADD_TYPE(VectorMask,psVectorMaskType,PS_TYPE_VECTOR_MASK)
+METADATA_ADD_TYPE(ImageMask,psImageMaskType,PS_TYPE_IMAGE_MASK)
+
 METADATA_ADD_TYPE(List,psList*,PS_DATA_LIST)
 METADATA_ADD_TYPE(Str,const char*,PS_DATA_STRING)
@@ -1011,6 +1016,6 @@
 }
 
-#define psMetadataLookupNumTYPE(TYPE) \
-ps##TYPE psMetadataLookup##TYPE(bool *status, const psMetadata *md, const char *key) \
+#define psMetadataLookupNumTYPE(TYPE,NAME) \
+ps##TYPE psMetadataLookup##NAME(bool *status, const psMetadata *md, const char *key) \
 { \
     psMetadataItem *metadataItem = NULL; \
@@ -1081,15 +1086,19 @@
 }
 
-psMetadataLookupNumTYPE(F32)
-psMetadataLookupNumTYPE(F64)
-psMetadataLookupNumTYPE(S8)
-psMetadataLookupNumTYPE(S16)
-psMetadataLookupNumTYPE(S32)
-psMetadataLookupNumTYPE(S64)
-psMetadataLookupNumTYPE(U8)
-psMetadataLookupNumTYPE(U16)
-psMetadataLookupNumTYPE(U32)
-psMetadataLookupNumTYPE(U64)
-psMetadataLookupNumTYPE(Bool)
+psMetadataLookupNumTYPE(F32,F32)
+psMetadataLookupNumTYPE(F64,F64)
+psMetadataLookupNumTYPE(S8,S8)
+psMetadataLookupNumTYPE(S16,S16)
+psMetadataLookupNumTYPE(S32,S32)
+psMetadataLookupNumTYPE(S64,S64)
+psMetadataLookupNumTYPE(U8,U8)
+psMetadataLookupNumTYPE(U16,U16)
+psMetadataLookupNumTYPE(U32,U32)
+psMetadataLookupNumTYPE(U64,U64)
+psMetadataLookupNumTYPE(Bool,Bool)
+
+psMetadataLookupNumTYPE(MaskType,Mask)
+psMetadataLookupNumTYPE(VectorMaskType,VectorMask)
+psMetadataLookupNumTYPE(ImageMaskType,ImageMask)
 
 psMetadataItem* psMetadataGet(const psMetadata *md,
Index: /branches/eam_branch_20081230/psLib/src/types/psMetadata.h
===================================================================
--- /branches/eam_branch_20081230/psLib/src/types/psMetadata.h	(revision 21077)
+++ /branches/eam_branch_20081230/psLib/src/types/psMetadata.h	(revision 21078)
@@ -9,6 +9,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2008-08-14 03:18:41 $
+*  @version $Revision: 1.105.18.1 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2009-01-02 05:11:45 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -763,4 +763,47 @@
 
 
+/** Add a psMaskType value to metadata collection.
+ *
+ *  @return bool:  True for success, False for failure.
+ */
+bool psMetadataAddMask(
+    psMetadata* md,                    ///< Metadata collection to insert metadata item
+    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    const char* name,                  ///< Name of metadata item
+    int format,                        ///< psMetadataFlag options/flags
+    const char* comment,               ///< Comment for metadata item
+    psMaskType value			///< Value for metadata item data
+);
+
+
+/** Add a psVectorMaskType value to metadata collection.
+ *
+ *  @return bool:  True for success, False for failure.
+ */
+bool psMetadataAddVectorMask(
+    psMetadata* md,                    ///< Metadata collection to insert metadata item
+    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    const char* name,                  ///< Name of metadata item
+    int format,                        ///< psMetadataFlag options/flags
+    const char* comment,               ///< Comment for metadata item
+    psVectorMaskType value			///< Value for metadata item data
+);
+
+
+/** Add a psImageMaskType value to metadata collection.
+ *
+ *  @return bool:  True for success, False for failure.
+ */
+bool psMetadataAddImageMask(
+    psMetadata* md,                    ///< Metadata collection to insert metadata item
+    long location,                     ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL
+    const char* name,                  ///< Name of metadata item
+    int format,                        ///< psMetadataFlag options/flags
+    const char* comment,               ///< Comment for metadata item
+    psImageMaskType value			///< Value for metadata item data
+);
+
+
+
 /** Add a psList to metadata collection.
  *
@@ -1095,4 +1138,49 @@
  */
 psU64 psMetadataLookupU64(
+    bool *status,                      ///< Status of lookup.
+    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
+    const char *key                    ///< Name of metadata key.
+);
+
+
+/** Find an item in the metadata collection based on key name and return its integer value.
+ *
+ *  Items may be found in the metadata by providing a key. If the key is
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
+ *
+ * @return psMaskType : Value of metadata item.
+ */
+psMaskType psMetadataLookupMask(
+    bool *status,                      ///< Status of lookup.
+    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
+    const char *key                    ///< Name of metadata key.
+);
+
+
+/** Find an item in the metadata collection based on key name and return its integer value.
+ *
+ *  Items may be found in the metadata by providing a key. If the key is
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
+ *
+ * @return psVectorMaskType : Value of metadata item.
+ */
+psVectorMaskType psMetadataLookupVectorMask(
+    bool *status,                      ///< Status of lookup.
+    const psMetadata *md,              ///< Metadata collection to lookup metadata item.
+    const char *key                    ///< Name of metadata key.
+);
+
+
+/** Find an item in the metadata collection based on key name and return its integer value.
+ *
+ *  Items may be found in the metadata by providing a key. If the key is
+ *  non-unique, the value of the first item is returned. If the item is not
+ *  found, zero is returned.
+ *
+ * @return psImageMaskType : Value of metadata item.
+ */
+psImageMaskType psMetadataLookupImageMask(
     bool *status,                      ///< Status of lookup.
     const psMetadata *md,              ///< Metadata collection to lookup metadata item.
