Files | |
| file | psType.h |
| Contains support for basic types. | |
Data Structures | |
| struct | psMathType |
| The type of a data type. More... | |
| struct | psMath |
| The type of a basic data type. More... | |
| struct | psArray |
| An array to support primitive types. More... | |
| struct | psBitSet |
| Struct containing array of bytes to hold bit data and corresponding array length. More... | |
| struct | psHashBucket |
| A bucket that holds an item of data. More... | |
| struct | psHash |
| The hash-table itself. More... | |
| struct | psListElem |
| Doubly-linked list element. More... | |
| struct | psList |
| The psList Linked list structure. More... | |
| struct | psListIterator |
| The psList iterator structure. More... | |
| struct | psLookupTable |
| Lookup table structure. More... | |
| struct | psMetadata |
| Metadata data structure. More... | |
| struct | psMetadataIterator |
| Metadata iterator. More... | |
| struct | psMetadataItem |
| Metadata item data structure. More... | |
| struct | psPixelCoord |
| Data structure for storing psPixel coordinates. More... | |
| struct | psPixels |
| list of pixel coordinates More... | |
Defines | |
| #define | PS_TYPE_MASK PS_TYPE_U8 |
| the psElemType to use for mask image | |
| #define | PS_TYPE_MASK_DATA U8 |
| the data member to use for mask image | |
| #define | PS_TYPE_MASK_NAME "psU8" |
| the data type for mask as a string | |
| #define | PS_MIN_S8 INT8_MIN |
| minimum valid psS8 value | |
| #define | PS_MIN_S16 INT16_MIN |
| minimum valid psS16 value | |
| #define | PS_MIN_S32 INT32_MIN |
| minimum valid psS32 value | |
| #define | PS_MIN_S64 INT64_MIN |
| minimum valid psS64 value | |
| #define | PS_MIN_U8 0 |
| minimum valid psU8 value | |
| #define | PS_MIN_U16 0 |
| minimum valid psU16 value | |
| #define | PS_MIN_U32 0 |
| minimum valid psU32 value | |
| #define | PS_MIN_U64 0 |
| minimum valid psU64 value | |
| #define | PS_MIN_F32 -FLT_MAX |
| minimum valid psF32 value | |
| #define | PS_MIN_F64 -DBL_MAX |
| minimum valid psF64 value | |
| #define | PS_MIN_C32 -FLT_MAX |
| minimum valid real or imaginary psC32 value | |
| #define | PS_MIN_C64 -DBL_MAX |
| minimum valid real or imaginary psC32 value | |
| #define | PS_MAX_S8 INT8_MAX |
| maximum valid psS8 value | |
| #define | PS_MAX_S16 INT16_MAX |
| maximum valid psS16 value | |
| #define | PS_MAX_S32 INT32_MAX |
| maximum valid psS32 value | |
| #define | PS_MAX_S64 INT64_MAX |
| maximum valid psS64 value | |
| #define | PS_MAX_U8 UINT8_MAX |
| maximum valid psU8 value | |
| #define | PS_MAX_U16 UINT16_MAX |
| maximum valid psU16 value | |
| #define | PS_MAX_U32 UINT32_MAX |
| maximum valid psU32 value | |
| #define | PS_MAX_U64 UINT64_MAX |
| maximum valid psU64 value | |
| #define | PS_MAX_F32 FLT_MAX |
| maximum valid psF32 value | |
| #define | PS_MAX_F64 DBL_MAX |
| maximum valid psF64 value | |
| #define | PS_MAX_C32 FLT_MAX |
| maximum valid real or imaginary psC32 value | |
| #define | PS_MAX_C64 DBL_MAX |
| maximum valid real or imaginary psC32 value | |
| #define | PS_TYPE_BOOL_NAME "psBool" |
| #define | PS_TYPE_S8_NAME "psS8" |
| #define | PS_TYPE_S16_NAME "psS16" |
| #define | PS_TYPE_S32_NAME "psS32" |
| #define | PS_TYPE_S64_NAME "psS64" |
| #define | PS_TYPE_U8_NAME "psU8" |
| #define | PS_TYPE_U16_NAME "psU16" |
| #define | PS_TYPE_U32_NAME "psU32" |
| #define | PS_TYPE_U64_NAME "psU64" |
| #define | PS_TYPE_F32_NAME "psF32" |
| #define | PS_TYPE_F64_NAME "psF64" |
| #define | PS_TYPE_C32_NAME "psC32" |
| #define | PS_TYPE_C64_NAME "psC64" |
| #define | PS_TYPE_NAME(value, type) |
| #define | PS_BADPIXEL_BITMASK 0x0f |
| Macro to get the bad pixel reason code (stored as part of mask value). | |
| #define | PS_GET_BADPIXEL(maskValue) (maskValue & PS_BADPIXEL_BITMASK) |
| #define | PS_IS_BADPIXEL(maskValue) (PS_GET_BADPIXEL(maskValue) != 0) |
| #define | PS_SET_BADPIXEL(maskValue, reasonCode) |
| Macro to apply a bad pixel reason code to mask image. | |
| #define | PS_IS_PSELEMTYPE_INT(x) ((x & 0x100) == 0x100) |
| Macro to determine if the psElemType is an integer. | |
| #define | PS_IS_PSELEMTYPE_UNSIGNED(x) ((x & 0x200) == 0x200) |
| Macro to determine if the psElemType is unsigned. | |
| #define | PS_IS_PSELEMTYPE_REAL(x) ((x & 0x400) == 0x400) |
| Macro to determine if the psElemType is a real (non-complex) floating-point type. | |
| #define | PS_IS_PSELEMTYPE_COMPLEX(x) ((x & 0x800) == 0x800) |
| Macro to determine if the psElemType is complex number type. | |
| #define | PS_IS_PSELEMTYPE_BOOL(x) ((x & 0x1000) == 0x1000) |
| Macro to determine if the psElemType is boolean type. | |
| #define | PSELEMTYPE_SIZEOF(x) (x & 0xFF) |
| Macro to determine the storage size, in bytes, of the psElemType. | |
| #define | P_PSARRAY_SET_NALLOC(vec, n) *(long*)&vec->nalloc = n |
| #define | PS_ASSERT_ARRAY_NON_NULL(NAME, RETURNVAL) PS_ASSERT_GENERAL_ARRAY_NON_NULL(NAME, return RETURNVAL) |
| #define | PS_ASSERT_GENERAL_ARRAY_NON_NULL(NAME, CLEANUP) |
| #define | PS_ASSERT_ARRAY_NON_EMPTY(NAME, RETURNVAL) PS_ASSERT_GENERAL_ARRAY_NON_EMPTY(NAME, return RETURNVAL) |
| #define | PS_ASSERT_GENERAL_ARRAY_NON_EMPTY(NAME, CLEANUP) |
| #define | PS_ASSERT_ARRAYS_SIZE_EQUAL(ARRAY1, ARRAY2, RVAL) |
| #define | PS_ASSERT_ARRAY_SIZE(ARRAY, SIZE, RVAL) |
| #define | PS_DATA_IS_PRIMITIVE(TYPE) |
| #define | PS_DATA_PRIMITIVE_TYPE(DATATYPE) |
| #define | PS_METADATA_FLAGS_MASK 0xFF000000 |
| #define | PS_METADATA_TYPE_MASK 0x00FFFFFF |
| #define | PS_ASSERT_METADATA_NON_NULL(NAME, RVAL) |
| Assert on metadata with extant hash and list components. | |
| #define | P_PSPIXELS_SET_NALLOC(pix, n) *(long*)&pix->nalloc = n |
Typedefs | |
| typedef uint8_t | psU8 |
| Basic data types used by the containers. 8-bit unsigned int. | |
| typedef uint16_t | psU16 |
| 16-bit unsigned int | |
| typedef uint32_t | psU32 |
| 32-bit unsigned int | |
| typedef uint64_t | psU64 |
| 64-bit unsigned int | |
| typedef int8_t | psS8 |
| 8-bit signed int | |
| typedef int16_t | psS16 |
| 16-bit signed int | |
| typedef int32_t | psS32 |
| 32-bit signed int | |
| typedef int64_t | psS64 |
| 64-bit signed int | |
| typedef float | psF32 |
| 32-bit floating point | |
| typedef double | psF64 |
| 64-bit floating point | |
| typedef float complex | psC32 |
| complex with 32-bit floating point Real and Imagary numbers | |
| typedef double complex | psC64 |
| complex with 64-bit floating point Real and Imagary numbers | |
| typedef char * | psString |
| string value | |
| typedef void * | psPtr |
| void pointer | |
| typedef bool | psBool |
| boolean value | |
| typedef psU8 | psMaskType |
| the C datatype for a mask image | |
| typedef psBool | psBOOL |
| allow psBOOL to be used instead of psBool (for macros) | |
Enumerations | |
| enum | psElemType { PS_TYPE_S8 = 0x0101, PS_TYPE_S16 = 0x0102, PS_TYPE_S32 = 0x0104, PS_TYPE_S64 = 0x0108, PS_TYPE_U8 = 0x0301, PS_TYPE_U16 = 0x0302, PS_TYPE_U32 = 0x0304, PS_TYPE_U64 = 0x0308, PS_TYPE_F32 = 0x0404, PS_TYPE_F64 = 0x0408, PS_TYPE_C32 = 0x0808, PS_TYPE_C64 = 0x0810, PS_TYPE_BOOL = 0x1301 } |
| Enumeration of data types for function elements. More... | |
| enum | psDataType { PS_DATA_S8 = PS_TYPE_S8, PS_DATA_S16 = PS_TYPE_S16, PS_DATA_S32 = PS_TYPE_S32, PS_DATA_S64 = PS_TYPE_S64, PS_DATA_U8 = PS_TYPE_U8, PS_DATA_U16 = PS_TYPE_U16, PS_DATA_U32 = PS_TYPE_U32, PS_DATA_U64 = PS_TYPE_U64, PS_DATA_F32 = PS_TYPE_F32, PS_DATA_F64 = PS_TYPE_F64, PS_DATA_BOOL = PS_TYPE_BOOL, PS_DATA_STRING = 0x10000, PS_DATA_ARRAY, PS_DATA_BITSET, PS_DATA_CUBE, PS_DATA_FITS, PS_DATA_HASH, PS_DATA_HISTOGRAM, PS_DATA_IMAGE, PS_DATA_KERNEL, PS_DATA_LINE, PS_DATA_LIST, PS_DATA_LOOKUPTABLE, PS_DATA_METADATA, PS_DATA_METADATAITEM, PS_DATA_MINIMIZATION, PS_DATA_PIXELS, PS_DATA_PLANE, PS_DATA_PLANEDISTORT, PS_DATA_PLANETRANSFORM, PS_DATA_POLYNOMIAL1D, PS_DATA_POLYNOMIAL2D, PS_DATA_POLYNOMIAL3D, PS_DATA_POLYNOMIAL4D, PS_DATA_PROJECTION, PS_DATA_REGION, PS_DATA_SCALAR, PS_DATA_SPHERE, PS_DATA_SPHEREROT, PS_DATA_SPLINE1D, PS_DATA_STATS, PS_DATA_TIME, PS_DATA_VECTOR, PS_DATA_UNKNOWN, PS_DATA_METADATA_MULTI } |
| Enumeration primarily used with metadata which defines a data structure e.g., list, array, FITS file, etc. More... | |
| enum | psDimen { PS_DIMEN_SCALAR, PS_DIMEN_VECTOR, PS_DIMEN_TRANSV, PS_DIMEN_IMAGE, PS_DIMEN_OTHER } |
| Dimensions of a data type. More... | |
| enum | { PS_LIST_HEAD = 0, PS_LIST_TAIL = -1 } |
| Special values of index into list. More... | |
| enum | psLookupStatusType { PS_LOOKUP_SUCCESS = 0x0000, PS_LOOKUP_PAST_TOP = 0x0101, PS_LOOKUP_PAST_BOTTOM = 0x0102, PS_LOOKUP_ERROR = 0x0104 } |
| Lookup table lookup status and error conditions. More... | |
| enum | psParseErrorType { PS_PARSE_SUCCESS = 0x0000, PS_PARSE_ERROR_TYPE = 0x0101, PS_PARSE_ERROR_VALUE = 0x0102, PS_PARSE_ERROR_GENERAL = 0x0104 } |
| Lookup table parse status and error conditions. More... | |
| enum | psMetadataFlags { PS_META_DEFAULT = 0, PS_META_REPLACE = 0x1000000, PS_META_NO_REPLACE = 0x2000000, PS_META_DUPLICATE_OK = 0x4000000, PS_META_NULL = 0x8000000 } |
| Option flags for psMetadata functions. More... | |
Functions | |
| bool | psMemCheckType (psDataType type, psPtr ptr) |
| Checks the deallocator to see if the pointer matches the desired datatype. | |
| bool | psMemCheckArray (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psArray * | psArrayAlloc (long nalloc) |
| Allocate an array, set the length to the number of allocated elements. | |
| psArray * | psArrayAllocEmpty (long nalloc) |
| Allocate an array, set the length to zero. | |
| psArray * | psArrayRealloc (psArray *array, long nalloc) |
| Reallocate an array. | |
| psArray * | psArrayAdd (psArray *array, long delta, psPtr data) |
| Add an element to the end the array, expanding the array storage if necessary. | |
| bool | psArrayRemoveData (psArray *array, const psPtr data) |
| Remove an element from the array by it's pointer. | |
| bool | psArrayRemoveIndex (psArray *array, long index) |
| Remove an element from the array. | |
| void | psArrayElementsFree (psArray *array) |
| Deallocate/Dereference elements of an array. | |
| psArray * | psArraySort (psArray *array, psComparePtrFunc func) |
| Sort the array according to an external compare function. | |
| bool | psArraySet (psArray *array, long position, psPtr data) |
| Set an element in the array. | |
| psPtr | psArrayGet (const psArray *array, long position) |
| Get an element from the array. | |
| long | psArrayLength (const psArray *array) |
| Get the number of elements in use from a specified psArray. | |
| bool | psMemCheckBitSet (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psBitSet * | psBitSetAlloc (long nalloc) |
| Allocate a psBitSet. | |
| psBitSet * | psBitSetSet (psBitSet *bitSet, long bit) |
| Set a bit. | |
| psBitSet * | psBitSetClear (psBitSet *bitSet, long bit) |
| Clear a bit. | |
| bool | psBitSetTest (const psBitSet *bitSet, long bit) |
| Test the value of a bit. | |
| psBitSet * | psBitSetOp (psBitSet *outBitSet, const psBitSet *inBitSet1, const char *operator, const psBitSet *inBitSet2) |
| Perform a binary operation on two psBitSets. | |
| psBitSet * | psBitSetNot (psBitSet *outBitSet, const psBitSet *inBitSet) |
| Perform a not operation on a psBitSet. | |
| psString | psBitSetToString (const psBitSet *bitSet) |
| Convert the psBitSet to a string of ones and zeros. | |
| bool | psMemCheckHash (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psHash * | psHashAlloc (long nalloc) |
| Allocate hash buckets in table. | |
| bool | psHashAdd (psHash *hash, const char *key, psPtr data) |
| Insert entry into table. | |
| psPtr | psHashLookup (const psHash *hash, const char *key) |
| Lookup key in table. | |
| bool | psHashRemove (psHash *hash, const char *key) |
| Remove key from table. | |
| psList * | psHashKeyList (const psHash *hash) |
| List all keys in table. | |
| psArray * | psHashToArray (const psHash *hash) |
| Create a psArray from a psHash contents. | |
| bool | psMemCheckList (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psList * | psListAlloc (psPtr data) |
| Creates a psList linked list object. | |
| psListIterator * | psListIteratorAlloc (psList *list, long location, bool mutable) |
| Creates a psListIterator object and associates it with a psList. | |
| bool | psListIteratorSet (psListIterator *iterator, long location) |
| Set the iterator of the list to a given position. | |
| bool | psListAdd (psList *list, long location, psPtr data) |
| Adds an element to a psList at position given. | |
| bool | psListAddAfter (psListIterator *iterator, psPtr data) |
| Adds an data item to a psList at position just after the list position given. | |
| bool | psListAddBefore (psListIterator *iterator, psPtr data) |
| Adds a data item to a psList at position just before the list position given. | |
| bool | psListRemove (psList *list, long location) |
| Remove an item at the specified location from a list. | |
| bool | psListRemoveData (psList *list, psPtr data) |
| Remove an item from a list. | |
| psPtr | psListGet (psList *list, long location) |
| Retrieve an item from a list. | |
| psPtr | psListGetAndIncrement (psListIterator *iterator) |
| Position the specified iterator to the next item in list. | |
| psPtr | psListGetAndDecrement (psListIterator *iterator) |
| Position the specified iterator to the previous item in list. | |
| psArray * | psListToArray (const psList *list) |
| Convert a linked list to an array. | |
| psList * | psArrayToList (const psArray *array) |
| Convert array to a doubly-linked list. | |
| psList * | psListSort (psList *list, psComparePtrFunc func) |
| Sort a list via a comparison function. | |
| long | psListLength (const psList *list) |
| Get the number of elements in use from a specified psList. | |
| bool | psMemCheckLookupTable (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psLookupTable * | psLookupTableAlloc (const char *filename, const char *format, long indexCol) |
| Allocator for psLookupTable struct. | |
| psArray * | psVectorsReadFromFile (const char *filename, const char *format) |
| Read vectors from file. | |
| psLookupTable * | psLookupTableImport (psLookupTable *table, const psArray *vectors, long indexCol) |
| Import arrays of vectors into a table. | |
| long | psLookupTableRead (psLookupTable *table) |
| Read lookup table. | |
| double | psLookupTableInterpolate (const psLookupTable *table, double index, long column) |
| Lookup and interpolate value from table. | |
| psVector * | psLookupTableInterpolateAll (const psLookupTable *table, double index) |
| Lookup and interpolate all values from table. | |
| psMetadataItem * | psMetadataItemAlloc (const char *name, psDataType type, const char *comment,...) |
| Create a metadata item. | |
| bool | psMemCheckMetadataItem (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psMetadataItem * | psMetadataItemAllocStr (const char *name, const char *comment, const char *value) |
| Create a metadata item with specified string data. | |
| psMetadataItem * | psMetadataItemAllocF32 (const char *name, const char *comment, psF32 value) |
| Create a metadata item with specified psF32 data. | |
| psMetadataItem * | psMetadataItemAllocF64 (const char *name, const char *comment, psF64 value) |
| Create a metadata item with specified psF64 data. | |
| psMetadataItem * | psMetadataItemAllocS8 (const char *name, const char *comment, psS8 value) |
| Create a metadata item with specified psS8 data. | |
| psMetadataItem * | psMetadataItemAllocS16 (const char *name, const char *comment, psS16 value) |
| Create a metadata item with specified psS16 data. | |
| psMetadataItem * | psMetadataItemAllocS32 (const char *name, const char *comment, psS32 value) |
| Create a metadata item with specified psS32 data. | |
| psMetadataItem * | psMetadataItemAllocS64 (const char *name, const char *comment, psS64 value) |
| Create a metadata item with specified psS64 data. | |
| psMetadataItem * | psMetadataItemAllocU8 (const char *name, const char *comment, psU8 value) |
| Create a metadata item with specified psU8 data. | |
| psMetadataItem * | psMetadataItemAllocU16 (const char *name, const char *comment, psU16 value) |
| Create a metadata item with specified psU16 data. | |
| psMetadataItem * | psMetadataItemAllocU32 (const char *name, const char *comment, psU32 value) |
| Create a metadata item with specified psU32 data. | |
| psMetadataItem * | psMetadataItemAllocU64 (const char *name, const char *comment, psU64 value) |
| Create a metadata item with specified psU64 data. | |
| psMetadataItem * | psMetadataItemAllocBool (const char *name, const char *comment, bool value) |
| Create a metadata item with specified psBool data. | |
| psMetadataItem * | psMetadataItemAllocPtr (const char *name, psDataType type, const char *comment, psPtr value) |
| Create a metadata item with specified psPtr data. | |
| psMetadataItem * | psMetadataItemAllocV (const char *name, psDataType type, const char *comment, va_list list) |
| Create a metadata item with va_list. | |
| psMetadata * | psMetadataAlloc (void) |
| Create a metadata collection. | |
| bool | psMemCheckMetadata (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psMetadataItem * | psMetadataItemCopy (const psMetadataItem *in) |
| Creates a new copy of a psMetadataItem. | |
| psMetadata * | psMetadataCopy (psMetadata *out, const psMetadata *in) |
| Create a copy of an existing psMetadata collection. | |
| bool | psMetadataItemTransfer (psMetadata *out, const psMetadata *in, const char *key) |
| Copy a metadata item from one psMetadata to another. | |
| bool | psMetadataAddItem (psMetadata *md, const psMetadataItem *item, int location, psS32 flags) |
| Add existing metadata item to metadata collection. | |
| bool | psMetadataAdd (psMetadata *md, long location, const char *name, int format, const char *comment,...) |
| Create and add a metadata item to metadata collection. | |
| bool | psMetadataAddV (psMetadata *md, long location, const char *name, int format, const char *comment, va_list list) |
| Create and add a metadata item to metadata collection. | |
| bool | psMetadataAddBool (psMetadata *md, long location, const char *name, int format, const char *comment, bool value) |
| Add a psBool value to metadata collection. | |
| bool | psMetadataAddS8 (psMetadata *md, long location, const char *name, int format, const char *comment, psS8 value) |
| Add a psS8 value to metadata collection. | |
| bool | psMetadataAddS16 (psMetadata *md, long location, const char *name, int format, const char *comment, psS16 value) |
| Add a psS16 value to metadata collection. | |
| bool | psMetadataAddS32 (psMetadata *md, long location, const char *name, int format, const char *comment, psS32 value) |
| Add a psS32 value to metadata collection. | |
| bool | psMetadataAddS64 (psMetadata *md, long location, const char *name, int format, const char *comment, psS64 value) |
| Add a psS64 value to metadata collection. | |
| bool | psMetadataAddU8 (psMetadata *md, long location, const char *name, int format, const char *comment, psU8 value) |
| Add a psU8 value to metadata collection. | |
| bool | psMetadataAddU16 (psMetadata *md, long location, const char *name, int format, const char *comment, psU16 value) |
| Add a psU16 value to metadata collection. | |
| bool | psMetadataAddU32 (psMetadata *md, long location, const char *name, int format, const char *comment, psU32 value) |
| Add a psU32 value to metadata collection. | |
| bool | psMetadataAddU64 (psMetadata *md, long location, const char *name, int format, const char *comment, psU64 value) |
| Add a psU64 value to metadata collection. | |
| bool | psMetadataAddF32 (psMetadata *md, long location, const char *name, int format, const char *comment, psF32 value) |
| Add a psF32 value to metadata collection. | |
| bool | psMetadataAddF64 (psMetadata *md, long location, const char *name, int format, const char *comment, psF64 value) |
| Add a psF64 value to metadata collection. | |
| bool | psMetadataAddList (psMetadata *md, long location, const char *name, int format, const char *comment, psList *value) |
| Add a psList to metadata collection. | |
| bool | psMetadataAddStr (psMetadata *md, long location, const char *name, int format, const char *comment, const char *value) |
| Add a string to metadata collection. | |
| bool | psMetadataAddVector (psMetadata *md, long location, const char *name, int format, const char *comment, psVector *value) |
| Add a vector to metadata collection. | |
| bool | psMetadataAddArray (psMetadata *md, long location, const char *name, int format, const char *comment, psArray *value) |
| Add a array to metadata collection. | |
| bool | psMetadataAddImage (psMetadata *md, long location, const char *name, int format, const char *comment, psImage *value) |
| Add an Image to metadata collection. | |
| bool | psMetadataAddTime (psMetadata *md, long location, const char *name, int format, const char *comment, psTime *value) |
| Add a Time to metadata collection. | |
| bool | psMetadataAddHash (psMetadata *md, long location, const char *name, int format, const char *comment, psHash *value) |
| Add a Hash to metadata collection. | |
| bool | psMetadataAddLookupTable (psMetadata *md, long location, const char *name, int format, const char *comment, psLookupTable *value) |
| Add a LookupTable to metadata collection. | |
| bool | psMetadataAddUnknown (psMetadata *md, long location, const char *name, int format, const char *comment, psPtr value) |
| Add an Unknown (psPtr) to metadata collection. | |
| bool | psMetadataAddPtr (psMetadata *md, long location, const char *name, psDataType type, const char *comment, psPtr value) |
| Add a psPtr to metadata collection. | |
| bool | psMetadataAddMetadata (psMetadata *md, long location, const char *name, int format, const char *comment, psMetadata *value) |
| Add Metadata to metadata collection. | |
| bool | psMetadataRemoveKey (psMetadata *md, const char *key) |
| Removes an item from metadata by key name. | |
| bool | psMetadataRemoveIndex (psMetadata *md, long location) |
| Removes an item from metadata by index number. | |
| psMetadataItem * | psMetadataLookup (const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name. | |
| psF64 | psMetadataLookupF64 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its double precision value. | |
| psF32 | psMetadataLookupF32 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its single precision value. | |
| psS8 | psMetadataLookupS8 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psS16 | psMetadataLookupS16 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psS32 | psMetadataLookupS32 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psS64 | psMetadataLookupS64 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psU8 | psMetadataLookupU8 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psU16 | psMetadataLookupU16 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psU32 | psMetadataLookupU32 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psU64 | psMetadataLookupU64 (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| bool | psMetadataLookupBool (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its boolean value. | |
| psPtr | psMetadataLookupPtr (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its integer value. | |
| psMetadataItem * | psMetadataGet (const psMetadata *md, int location) |
| Find an item in the metadata collection based on list index. | |
| psMetadataIterator * | psMetadataIteratorAlloc (const psMetadata *md, long location, const char *regex) |
| Creates a psMetadataIterator to iterate over the specified psMetadata. | |
| bool | psMetadataIteratorSet (psMetadataIterator *iterator, long location) |
| Set the iterator of the psMetadat to a given position. | |
| psMetadataItem * | psMetadataGetAndIncrement (psMetadataIterator *iterator) |
| Position the specified iterator to the next matching item in psMetadata, given the regular expression of the iterator. | |
| psMetadataItem * | psMetadataGetAndDecrement (psMetadataIterator *iterator) |
| Position the specified iterator to the previous matching item in psMetadata, given the regular expression of the iterator. | |
| psMetadata * | psMetadataLookupMetadata (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its metadata value. | |
| psString | psMetadataLookupStr (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return its string value. | |
| psTime * | psMetadataLookupTime (bool *status, const psMetadata *md, const char *key) |
| Find an item in the metadata collection based on key name and return it as a psTime pointer. | |
| bool | psMetadataPrint (FILE *fd, const psMetadata *md, int level) |
| Prints metadata collection. | |
| psPolynomial1D * | psPolynomial1DfromMetadata (const psMetadata *folder) |
| Allocates a new psPolynomial1D structure with information from a psMetadata. | |
| bool | psPolynomial1DtoMetadata (psMetadata *md, const psPolynomial1D *poly, const char *format,...) |
| Stores the information from a psPolynomial1D structure in a psMetadata container. | |
| psPolynomial2D * | psPolynomial2DfromMetadata (const psMetadata *folder) |
| Allocates a new psPolynomial2D structure with information from a psMetadata. | |
| bool | psPolynomial2DtoMetadata (psMetadata *md, const psPolynomial2D *poly, const char *format,...) |
| Stores the information from a psPolynomial2D structure in a psMetadata container. | |
| psPolynomial3D * | psPolynomial3DfromMetadata (const psMetadata *folder) |
| Allocates a new psPolynomial3D structure with information from a psMetadata. | |
| bool | psPolynomial3DtoMetadata (psMetadata *md, const psPolynomial3D *poly, const char *format,...) |
| Stores the information from a psPolynomial3D structure in a psMetadata container. | |
| psPolynomial4D * | psPolynomial4DfromMetadata (const psMetadata *folder) |
| Allocates a new psPolynomial4D structure with information from a psMetadata. | |
| bool | psPolynomial4DtoMetadata (psMetadata *md, const psPolynomial4D *poly, const char *format,...) |
| Stores the information from a psPolynomial4D structure in a psMetadata container. | |
| bool | psMetadataItemPrint (FILE *fd, const char *format, const psMetadataItem *item) |
| Print metadata item to file. | |
| psMetadata * | psMetadataConfigRead (psMetadata *md, unsigned int *nFail, const char *filename, bool overwrite) |
| Read metadata configuration file. | |
| psMetadata * | psMetadataConfigParse (psMetadata *md, unsigned int *nFail, const char *str, bool overwrite) |
| Parse metadata configuration string. | |
| psString | psMetadataConfigFormat (psMetadata *md) |
| Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string. | |
| bool | psMetadataConfigWrite (psMetadata *md, const char *filename) |
| Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written out to filename. | |
| bool | psMetadataConfigPrint (FILE *stream, psMetadata *md) |
| Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written a file stream. | |
| bool | psMetadataItemCompare (const psMetadataItem *compare, const psMetadataItem *template) |
| Compares two psMetadataItems. | |
| psBool | psMetadataItemParseBool (const psMetadataItem *item) |
| psF32 | psMetadataItemParseF32 (const psMetadataItem *item) |
| psF64 | psMetadataItemParseF64 (const psMetadataItem *item) |
| psS8 | psMetadataItemParseS8 (const psMetadataItem *item) |
| psS16 | psMetadataItemParseS16 (const psMetadataItem *item) |
| psS32 | psMetadataItemParseS32 (const psMetadataItem *item) |
| psU8 | psMetadataItemParseU8 (const psMetadataItem *item) |
| psU16 | psMetadataItemParseU16 (const psMetadataItem *item) |
| psU32 | psMetadataItemParseU32 (const psMetadataItem *item) |
| psString | psMetadataItemParseString (const psMetadataItem *item) |
| psPixels * | psPixelsAlloc (long nalloc) |
| Allocates a new psPixels structure. | |
| bool | psMemCheckPixels (psPtr ptr) |
| Checks the type of a particular pointer. | |
| psPixels * | psPixelsRealloc (psPixels *pixels, long nalloc) |
| resizes a psPixels structure | |
| psPixels * | p_psPixelsAppend (psPixels *pixels, long growth, float x, float y) |
| Add a pixel location to a psPixels. | |
| psPixels * | psPixelsCopy (psPixels *out, const psPixels *pixels) |
| Copies a psPixels object. | |
| psImage * | psPixelsToMask (psImage *out, const psPixels *pixels, psRegion region, psMaskType maskVal) |
| Generate a psImage from a psPixels. | |
| psPixels * | psPixelsFromMask (psPixels *out, const psImage *mask, psMaskType maskVal) |
| Generate a psPixels from a mask psImage. | |
| psPixels * | psPixelsConcatenate (psPixels *out, const psPixels *pixels) |
| Concatenates two psPixels. | |
| bool | p_psPixelsPrint (FILE *fd, psPixels *pixels, const char *name) |
| Prints a psPixels to specified destination. | |
| bool | psPixelsSet (psPixels *pixels, long position, psPixelCoord value) |
| Sets the value of the the pixels array at the specified position to value. | |
| psPixelCoord | psPixelsGet (const psPixels *pixels, long position) |
| Returns the value of the pixels array at the specified position. | |
| long | psPixelsLength (const psPixels *pixels) |
| Get the number of elements in use from a specified psPixels. | |
| #define P_PSARRAY_SET_NALLOC | ( | vec, | |||
| n | ) | *(long*)&vec->nalloc = n |
| #define P_PSPIXELS_SET_NALLOC | ( | pix, | |||
| n | ) | *(long*)&pix->nalloc = n |
Definition at line 51 of file psPixels.h.
| #define PS_ASSERT_ARRAY_NON_EMPTY | ( | NAME, | |||
| RETURNVAL | ) | PS_ASSERT_GENERAL_ARRAY_NON_EMPTY(NAME, return RETURNVAL) |
| #define PS_ASSERT_ARRAY_NON_NULL | ( | NAME, | |||
| RETURNVAL | ) | PS_ASSERT_GENERAL_ARRAY_NON_NULL(NAME, return RETURNVAL) |
| #define PS_ASSERT_ARRAY_SIZE | ( | ARRAY, | |||
| SIZE, | |||||
| RVAL | ) |
Value:
if ((ARRAY)->n != (SIZE)) { \ psError(PS_ERR_BAD_PARAMETER_SIZE, true, \ "psArray %s has size %ld instead of expected size %ld.", \ #ARRAY, (ARRAY)->n, SIZE); \ return RVAL; \ }
| #define PS_ASSERT_ARRAYS_SIZE_EQUAL | ( | ARRAY1, | |||
| ARRAY2, | |||||
| RVAL | ) |
Value:
if ((ARRAY1)->n != (ARRAY2)->n) { \ psError(PS_ERR_BAD_PARAMETER_SIZE, true, \ "psArray %s has size %ld, psArray %s has size %ld.", \ #ARRAY1, (ARRAY1)->n, #ARRAY2, (ARRAY2)->n); \ return(RVAL); \ }
| #define PS_ASSERT_GENERAL_ARRAY_NON_EMPTY | ( | NAME, | |||
| CLEANUP | ) |
Value:
if ((NAME)->n < 1) { \ psError(PS_ERR_BAD_PARAMETER_SIZE, true, \ "Unallowable operation: psArray %s has no elements.", \ #NAME); \ CLEANUP; \ } \
| #define PS_ASSERT_GENERAL_ARRAY_NON_NULL | ( | NAME, | |||
| CLEANUP | ) |
Value:
if ((NAME) == NULL || (NAME)->data == NULL) { \ psError(PS_ERR_BAD_PARAMETER_NULL, true, \ "Unallowable operation: psArray %s or its data is NULL.", \ #NAME); \ CLEANUP; \ } \
| #define PS_ASSERT_METADATA_NON_NULL | ( | NAME, | |||
| RVAL | ) |
Value:
if (!(NAME) || !(NAME)->hash || !(NAME)->list) { \ psError(PS_ERR_BAD_PARAMETER_VALUE, true, \ "Error: Metadata %s or one of its components is NULL.", \ #NAME); \ return RVAL; \ }
Definition at line 1191 of file psMetadata.h.
| #define PS_BADPIXEL_BITMASK 0x0f |
| #define PS_DATA_IS_PRIMITIVE | ( | TYPE | ) |
Value:
(TYPE == PS_DATA_S8 || \ TYPE == PS_DATA_S16 || \ TYPE == PS_DATA_S32 || \ TYPE == PS_DATA_S64 || \ TYPE == PS_DATA_U8 || \ TYPE == PS_DATA_U16 || \ TYPE == PS_DATA_U32 || \ TYPE == PS_DATA_U64 || \ TYPE == PS_DATA_F32 || \ TYPE == PS_DATA_F64 || \ TYPE == PS_DATA_BOOL)
Definition at line 32 of file psMetadata.h.
| #define PS_DATA_PRIMITIVE_TYPE | ( | DATATYPE | ) |
Value:
( \
(DATATYPE==PS_DATA_S8 || DATATYPE==PS_DATA_S16 || \
DATATYPE==PS_DATA_S32 || DATATYPE==PS_DATA_S64 || DATATYPE==PS_DATA_U8 || \
DATATYPE==PS_DATA_U16 || DATATYPE==PS_DATA_U32 || DATATYPE==PS_DATA_U64 || \
DATATYPE==PS_DATA_F32 || DATATYPE==PS_DATA_F64 || DATATYPE==PS_DATA_BOOL) ? DATATYPE : 0)
Definition at line 45 of file psMetadata.h.
| #define PS_GET_BADPIXEL | ( | maskValue | ) | (maskValue & PS_BADPIXEL_BITMASK) |
| #define PS_IS_BADPIXEL | ( | maskValue | ) | (PS_GET_BADPIXEL(maskValue) != 0) |
| #define PS_IS_PSELEMTYPE_BOOL | ( | x | ) | ((x & 0x1000) == 0x1000) |
| #define PS_IS_PSELEMTYPE_COMPLEX | ( | x | ) | ((x & 0x800) == 0x800) |
| #define PS_IS_PSELEMTYPE_INT | ( | x | ) | ((x & 0x100) == 0x100) |
| #define PS_IS_PSELEMTYPE_REAL | ( | x | ) | ((x & 0x400) == 0x400) |
| #define PS_IS_PSELEMTYPE_UNSIGNED | ( | x | ) | ((x & 0x200) == 0x200) |
| #define PS_MAX_C32 FLT_MAX |
| #define PS_MAX_C64 DBL_MAX |
| #define PS_METADATA_FLAGS_MASK 0xFF000000 |
Definition at line 66 of file psMetadata.h.
| #define PS_METADATA_TYPE_MASK 0x00FFFFFF |
Definition at line 67 of file psMetadata.h.
| #define PS_MIN_C32 -FLT_MAX |
| #define PS_MIN_C64 -DBL_MAX |
| #define PS_SET_BADPIXEL | ( | maskValue, | |||
| reasonCode | ) |
Value:
{ \
maskValue = (psMaskType)((reasonCode & PS_BADPIXEL_BITMASK) | (maskValue & ~PS_BADPIXEL_BITMASK)); \
}
| #define PS_TYPE_MASK PS_TYPE_U8 |
| #define PS_TYPE_MASK_DATA U8 |
| #define PS_TYPE_MASK_NAME "psU8" |
| #define PSELEMTYPE_SIZEOF | ( | x | ) | (x & 0xFF) |
| typedef float complex psC32 |
| typedef double complex psC64 |
| typedef psU8 psMaskType |
| typedef uint8_t psU8 |
| anonymous enum |
Special values of index into list.
This list of possible list position values should be contiguous non-positive values ending with PS_LIST_UNKNOWN. Any value less-than-or-equal-to PS_LIST_UNKNOWN is considered a undefined position.
| enum psDataType |
Enumeration primarily used with metadata which defines a data structure e.g., list, array, FITS file, etc.
| PS_DATA_S8 | psS8 |
| PS_DATA_S16 | psS16 |
| PS_DATA_S32 | psS32 |
| PS_DATA_S64 | psS64 |
| PS_DATA_U8 | psU8 |
| PS_DATA_U16 | psU16 |
| PS_DATA_U32 | psU32 |
| PS_DATA_U64 | psU64 |
| PS_DATA_F32 | psF32 |
| PS_DATA_F64 | psF64 |
| PS_DATA_BOOL | psBool |
| PS_DATA_STRING | psString (char *) |
| PS_DATA_ARRAY | psArray |
| PS_DATA_BITSET | psBitSet |
| PS_DATA_CUBE | psCube |
| PS_DATA_FITS | psFits |
| PS_DATA_HASH | psHash |
| PS_DATA_HISTOGRAM | psHistogram |
| PS_DATA_IMAGE | psImage |
| PS_DATA_KERNEL | psKernel |
| PS_DATA_LINE | psLine |
| PS_DATA_LIST | psList |
| PS_DATA_LOOKUPTABLE | psLookupTable |
| PS_DATA_METADATA | psMetadata |
| PS_DATA_METADATAITEM | psMetadataItem |
| PS_DATA_MINIMIZATION | psMinimization |
| PS_DATA_PIXELS | psPixels |
| PS_DATA_PLANE | psPlane |
| PS_DATA_PLANEDISTORT | psPlaneDistort |
| PS_DATA_PLANETRANSFORM | psPlaneTransform |
| PS_DATA_POLYNOMIAL1D | psPolynomial1D |
| PS_DATA_POLYNOMIAL2D | psPolynomial2D |
| PS_DATA_POLYNOMIAL3D | psPolynomial3D |
| PS_DATA_POLYNOMIAL4D | psPolynomial4D |
| PS_DATA_PROJECTION | psProjection |
| PS_DATA_REGION | psRegion |
| PS_DATA_SCALAR | psScalar |
| PS_DATA_SPHERE | psSphere |
| PS_DATA_SPHEREROT | psSphereTransform |
| PS_DATA_SPLINE1D | psSpline1D |
| PS_DATA_STATS | psStats |
| PS_DATA_TIME | psTime |
| PS_DATA_VECTOR | psVector |
| PS_DATA_UNKNOWN | Other data of an unknown type. |
| PS_DATA_METADATA_MULTI | Used internally for metadata; not a 'real' type. |
| enum psDimen |
Dimensions of a data type.
The dimensions of containers used by psLib are defined within this enum. This enum is used by the psType struct. *
| enum psElemType |
Enumeration of data types for function elements.
Contains replacements for native types.
| enum psLookupStatusType |
Lookup table lookup status and error conditions.
Success, failure, and status conditions for table lookups.
| PS_LOOKUP_SUCCESS | Table lookup succeeded. |
| PS_LOOKUP_PAST_TOP | Lookup off top of table. |
| PS_LOOKUP_PAST_BOTTOM | Lookup off bottom of table. |
| PS_LOOKUP_ERROR | Any other type of lookup error. |
Definition at line 48 of file psLookupTable.h.
| enum psMetadataFlags |
Option flags for psMetadata functions.
Enumeration for the modification of the behaviour in psMetadataAddItem.
| PS_META_DEFAULT | default behaviour (duplicate entry is an error) |
| PS_META_REPLACE | allow entry to be replaced |
| PS_META_NO_REPLACE | duplicate entry is silently skipped |
| PS_META_DUPLICATE_OK | allow duplicate entries |
| PS_META_NULL | psMetadataItem.data is a NULL value |
Definition at line 58 of file psMetadata.h.
| enum psParseErrorType |
Lookup table parse status and error conditions.
Success, failure, and status conditions for table parsing.
| PS_PARSE_SUCCESS | Table lookup succeeded. |
| PS_PARSE_ERROR_TYPE | Error parsing type. |
| PS_PARSE_ERROR_VALUE | Error parsing numerical value. |
| PS_PARSE_ERROR_GENERAL | Any other type of lookup error. |
Definition at line 59 of file psLookupTable.h.
Add a pixel location to a psPixels.
Grow the psPixels input by growth. If growth is less that 1, 10 is used. If a NULL psPixels is given, a new one is created.
| pixels | psPixels to append new coordinate to. |
| growth | Number of elements to grow the pixels list if necessary. |
| x | x coordinate to append |
| y | y coordinate to append |
| bool p_psPixelsPrint | ( | FILE * | fd, | |
| psPixels * | pixels, | |||
| const char * | name | |||
| ) |
Add an element to the end the array, expanding the array storage if necessary.
| array | array to operate on |
| delta | the amount to expand array, if necessary. If less than one, 10 will be used. |
| data | the data pointer to add to psArray |
| psArray* psArrayAlloc | ( | long | nalloc | ) |
Allocate an array, set the length to the number of allocated elements.
Uses psLib memory allocation functions to create an array collection of data
| nalloc | Total number of elements to make available. |
| psArray* psArrayAllocEmpty | ( | long | nalloc | ) |
Allocate an array, set the length to zero.
Uses psLib memory allocation functions to create an array collection of data
| nalloc | Total number of elements to make available. |
| void psArrayElementsFree | ( | psArray * | array | ) |
Deallocate/Dereference elements of an array.
Uses psLib memory allocation functions to deallocate/dereference elements of a array of void pointers. The array psArr is not freed, and its elements will all be set to NULL. Additionaly, the array size (n) is set to zero.
| array | Void pointer array to destroy. |
Get an element from the array.
| array | input array to get element from |
| position | the element position to get |
| long psArrayLength | ( | const psArray * | array | ) |
Reallocate an array.
Uses psLib memory allocation functions to reallocate an array collection of data.
| array | array to reallocate. |
| nalloc | Total number of elements to make available. |
Remove an element from the array by it's pointer.
Finds and removes the specified data pointer from the list.
| array | array to operate on |
| data | the data pointer to remove from psArray |
| bool psArrayRemoveIndex | ( | psArray * | array, | |
| long | index | |||
| ) |
Remove an element from the array.
Finds and removes the elements as the specified position
| array | array to operate on |
| index | the element to remove |
Set an element in the array.
If the current element is non-NULL, the old element is freed.
| array | input array to set element in |
| position | the element position to set |
| data | the value to set it to |
| psArray* psArraySort | ( | psArray * | array, | |
| psComparePtrFunc | func | |||
| ) |
Sort the array according to an external compare function.
Sorts an array via the specification of a comparison function to specify how the objects on the array should be sorted.
The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
If two members compare as equal, their order in the sorted array is undefined.
| array | input array to sort. |
| func | the compare function |
| psBitSet* psBitSetAlloc | ( | long | nalloc | ) |
Clear a bit.
Clear a bit at a given bit location. The bit is cleared based on a zero index with the first bit set in the zero bit slot of the zero element of the byte array.
| bitSet | Pointer to psBitSet to be cleared. |
| bit | Bit to be cleared. |
| psBitSet* psBitSetOp | ( | psBitSet * | outBitSet, | |
| const psBitSet * | inBitSet1, | |||
| const char * | operator, | |||
| const psBitSet * | inBitSet2 | |||
| ) |
Perform a binary operation on two psBitSets.
Perform an AND, OR, or XOR on two psBitSets. If the BitMasks are not the same size, the operation will not be performed and an error message will be logged.
Set a bit.
Sets a bit at a given bit location. The bit is set based on a zero index with the first bit set in the zero bit slot of the zero element of the byte array. As an example, setting bit 3 in an array with two elements would result in an psBitSet that looks like 00000000 00001000.
| bitSet | Pointer to psBitSet to be set. |
| bit | Bit to be set. |
| bool psBitSetTest | ( | const psBitSet * | bitSet, | |
| long | bit | |||
| ) |
Test the value of a bit.
Prints the value of a bit at a given bit location, either one or zero. The resulting bit is based on a zero index format with the first bit set in the zero bit slot of the zero element of the byte array. As an example, testing bit 3 in a psBitSet with two bytes that looks like 00000000 00001000 would return a value of one, since that is the value that was set.
| bitSet | Pointer psBitSet to be tested. |
| bit | Bit to be tested. |
Convert the psBitSet to a string of ones and zeros.
Converts the contents of a psBitSet to a string representation of its binary form of ones and zeros. The LSB is the right-most chracter. Each set of eight characters represents one byte.
| bitSet | psBitSet to convert |
Insert entry into table.
| hash | The table to insert in. |
| key | The key to use. |
| data | The data to insert. |
| psHash* psHashAlloc | ( | long | nalloc | ) |
Allocate hash buckets in table.
| nalloc | The number of buckets to allocate. |
List all keys in table.
| hash | The table to list keys from.. |
Lookup key in table.
| hash | The table to lookup key in. |
| key | The key to lookup. |
| bool psHashRemove | ( | psHash * | hash, | |
| const char * | key | |||
| ) |
Remove key from table.
| hash | The table to lookup key in. |
| key | The key to lookup. |
Adds an element to a psList at position given.
| list | list to add item to |
| location | index, PS_LIST_HEAD, PS_LIST_TAIL, or numbered location. |
| data | data item to add. If NULL, list is not modified. |
| bool psListAddAfter | ( | psListIterator * | iterator, | |
| psPtr | data | |||
| ) |
Adds an data item to a psList at position just after the list position given.
| iterator | list position to add item to |
| data | data item to add. If NULL, list is not modified. |
| bool psListAddBefore | ( | psListIterator * | iterator, | |
| psPtr | data | |||
| ) |
Adds a data item to a psList at position just before the list position given.
| iterator | list position to add item to |
| data | data item to add. If NULL, list is not modified. |
Retrieve an item from a list.
| list | list to retrieve element from |
| location | index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| psPtr psListGetAndDecrement | ( | psListIterator * | iterator | ) |
Position the specified iterator to the previous item in list.
| iterator | iterator to move |
| psPtr psListGetAndIncrement | ( | psListIterator * | iterator | ) |
Position the specified iterator to the next item in list.
| iterator | iterator to move |
| psListIterator* psListIteratorAlloc | ( | psList * | list, | |
| long | location, | |||
| bool | mutable | |||
| ) |
Creates a psListIterator object and associates it with a psList.
| list | the psList to iterate with |
| location | the initial starting point. This can be a numeric index, PS_LIST_HEAD, or PS_LIST_TAIL. |
| mutable | Is it permissible to modify list? |
| bool psListIteratorSet | ( | psListIterator * | iterator, | |
| long | location | |||
| ) |
Set the iterator of the list to a given position.
If location is invalid the iterator position is not changed.
| iterator | list iterator |
| location | index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| long psListLength | ( | const psList * | list | ) |
| bool psListRemove | ( | psList * | list, | |
| long | location | |||
| ) |
Remove an item at the specified location from a list.
| list | list to remove element from |
| location | index of item |
Remove an item from a list.
| list | list to remove element from |
| data | data item to find and remove |
| psList* psListSort | ( | psList * | list, | |
| psComparePtrFunc | func | |||
| ) |
Sort a list via a comparison function.
The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
If two members compare as equal, their order in the sorted array is undefined.
| list | the list to sort |
| func | the comparison function |
Convert a linked list to an array.
| list | List to convert |
| psLookupTable* psLookupTableAlloc | ( | const char * | filename, | |
| const char * | format, | |||
| long | indexCol | |||
| ) |
Allocator for psLookupTable struct.
Allocates a new psLookupTable struct.
| filename | Name of file to read |
| format | scanf-like format string |
| indexCol | Column of the index vector (starting at zero) |
| psLookupTable* psLookupTableImport | ( | psLookupTable * | table, | |
| const psArray * | vectors, | |||
| long | indexCol | |||
| ) |
Import arrays of vectors into a table.
Import array of vectors read from text file into a table structure
| table | Lookup table into which to import |
| vectors | Array of vectors |
| indexCol | Index of the index vector in the array of vectors |
| double psLookupTableInterpolate | ( | const psLookupTable * | table, | |
| double | index, | |||
| long | column | |||
| ) |
Lookup and interpolate value from table.
Interpolates value from table. Sets status bit for success or one of several possible failure conditions.
| table | Table with data |
| index | Value to be interpolated |
| column | Column in table to be interpolated |
| psVector* psLookupTableInterpolateAll | ( | const psLookupTable * | table, | |
| double | index | |||
| ) |
Lookup and interpolate all values from table.
Interpolates all values from table. Sets status bit for success or one of several possible failure conditions.
| table | Table with data |
| index | Value to be interpolated |
| long psLookupTableRead | ( | psLookupTable * | table | ) |
Read lookup table.
Reads a lookup table and fills corresponding psLookupTable struct.
| table | Table to read |
| bool psMemCheckArray | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckBitSet | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckHash | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckList | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckLookupTable | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckMetadata | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckMetadataItem | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckPixels | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| bool psMemCheckType | ( | psDataType | type, | |
| psPtr | ptr | |||
| ) |
Checks the deallocator to see if the pointer matches the desired datatype.
| type | The desired psDataType to match |
| ptr | The desired pointer to match |
| bool psMetadataAdd | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| ... | ||||
| ) |
Create and add a metadata item to metadata collection.
Creates a new metadata item add to the metadata collection.
| md | Metadata collection to insert metadata item. |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item. |
| format | psDataType of metadata item & options (psMetadataFlags) |
| comment | Comment for metadata item. |
| bool psMetadataAddArray | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psArray * | value | |||
| ) |
Add a array to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Vector for metadata item data |
| bool psMetadataAddBool | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| bool | value | |||
| ) |
Add a psBool value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddF32 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psF32 | value | |||
| ) |
Add a psF32 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddF64 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psF64 | value | |||
| ) |
Add a psF64 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddHash | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psHash * | value | |||
| ) |
Add a Hash to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Hash for metadata item data |
| bool psMetadataAddImage | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psImage * | value | |||
| ) |
Add an Image to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Image for metadata item data |
| bool psMetadataAddItem | ( | psMetadata * | md, | |
| const psMetadataItem * | item, | |||
| int | location, | |||
| psS32 | flags | |||
| ) |
Add existing metadata item to metadata collection.
Add a metadata item that has already been created to the metadata collection.
| md | Metadata collection to insert metadata item. |
| item | Metadata item to be added. |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| flags | Options flag mask, see psMetadataFlags enum |
| bool psMetadataAddList | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psList * | value | |||
| ) |
Add a psList to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | psList for metadata item data |
| bool psMetadataAddLookupTable | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psLookupTable * | value | |||
| ) |
Add a LookupTable to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | LookupTable for metadata item data |
| bool psMetadataAddMetadata | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psMetadata * | value | |||
| ) |
Add Metadata to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Metadata for metadata item data |
| bool psMetadataAddPtr | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| psDataType | type, | |||
| const char * | comment, | |||
| psPtr | value | |||
| ) |
Add a psPtr to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| type | psDataType for metadata item |
| comment | Comment for metadata item |
| value | Unknown for metadata item data |
| bool psMetadataAddS16 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psS16 | value | |||
| ) |
Add a psS16 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddS32 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psS32 | value | |||
| ) |
Add a psS32 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddS64 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psS64 | value | |||
| ) |
Add a psS64 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddS8 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psS8 | value | |||
| ) |
Add a psS8 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddStr | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| const char * | value | |||
| ) |
Add a string to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | String for metadata item data |
| bool psMetadataAddTime | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psTime * | value | |||
| ) |
Add a Time to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Time for metadata item data |
| bool psMetadataAddU16 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psU16 | value | |||
| ) |
Add a psU16 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddU32 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psU32 | value | |||
| ) |
Add a psU32 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddU64 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psU64 | value | |||
| ) |
Add a psU64 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddU8 | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psU8 | value | |||
| ) |
Add a psU8 value to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Value for metadata item data |
| bool psMetadataAddUnknown | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psPtr | value | |||
| ) |
Add an Unknown (psPtr) to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Unknown for metadata item data |
| bool psMetadataAddV | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| va_list | list | |||
| ) |
Create and add a metadata item to metadata collection.
Creates a new metadata item add to the metadata collection.
| md | Metadata collection to insert metadata item. |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item. |
| format | psDataType of metadata item & options (psMetadataFlags) |
| comment | Comment for metadata item. |
| list | Arguments for name formatting and metadata item data. |
| bool psMetadataAddVector | ( | psMetadata * | md, | |
| long | location, | |||
| const char * | name, | |||
| int | format, | |||
| const char * | comment, | |||
| psVector * | value | |||
| ) |
Add a vector to metadata collection.
| md | Metadata collection to insert metadata item |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| name | Name of metadata item |
| format | psMetadataFlag options/flags |
| comment | Comment for metadata item |
| value | Vector for metadata item data |
| psMetadata* psMetadataAlloc | ( | void | ) |
Create a metadata collection.
Returns an empty metadata container with fully allocated internal metadata containers.
| psString psMetadataConfigFormat | ( | psMetadata * | md | ) |
Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string.
A NULL shall be returned on error.
| md | The metadata to convert |
| psMetadata* psMetadataConfigParse | ( | psMetadata * | md, | |
| unsigned int * | nFail, | |||
| const char * | str, | |||
| bool | overwrite | |||
| ) |
Parse metadata configuration string.
Loads pre-defined settings by parsing a string into a psMetadata structure.
| md | Resulting metadata from read. |
| nFail | Number of failed lines. |
| str | String to process. |
| overwrite | Allow overwrite of duplicate specifications. |
| bool psMetadataConfigPrint | ( | FILE * | stream, | |
| psMetadata * | md | |||
| ) |
Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written a file stream.
| stream | file stream to write to |
| md | The metadata to convert |
| psMetadata* psMetadataConfigRead | ( | psMetadata * | md, | |
| unsigned int * | nFail, | |||
| const char * | filename, | |||
| bool | overwrite | |||
| ) |
Read metadata configuration file.
Loads pre-defined settings by parsing a configuration file into a psMetadata structure.
| md | Resulting metadata from read. |
| nFail | Number of failed lines. |
| filename | Name of file to read. |
| overwrite | Allow overwrite of duplicate specifications. |
| bool psMetadataConfigWrite | ( | psMetadata * | md, | |
| const char * | filename | |||
| ) |
Converts a psMetadata structure (including any nested psMetadata) into a configuration file formatted string that is written out to filename.
| md | The metadata to convert |
| filename | Name of file to write |
| psMetadata* psMetadataCopy | ( | psMetadata * | out, | |
| const psMetadata * | in | |||
| ) |
Create a copy of an existing psMetadata collection.
Creates a new copy of all the psMetadataItems in the psMetadata collection, in, and returns them in out, or creates a new container if out is NULL. If an error occurs, NULL is returned but out may still have been updated if it is non-NULL.
| out | output Metadata container for copying. |
| in | Metadata collection to be copied. |
| psMetadataItem* psMetadataGet | ( | const psMetadata * | md, | |
| int | location | |||
| ) |
Find an item in the metadata collection based on list index.
Items may be found in the metadata by their entry position in the list container.
| md | Metadata collection to retrieve metadata item. |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| psMetadataItem* psMetadataGetAndDecrement | ( | psMetadataIterator * | iterator | ) |
Position the specified iterator to the previous matching item in psMetadata, given the regular expression of the iterator.
| iterator | iterator to move |
| psMetadataItem* psMetadataGetAndIncrement | ( | psMetadataIterator * | iterator | ) |
Position the specified iterator to the next matching item in psMetadata, given the regular expression of the iterator.
| iterator | iterator to move |
| psMetadataItem* psMetadataItemAlloc | ( | const char * | name, | |
| psDataType | type, | |||
| const char * | comment, | |||
| ... | ||||
| ) |
Create a metadata item.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct. The name argument specifies the name to use for this item, and may include sprintf formatting codes. The format entry specifies both the metadata type and optional flags and is created by bit-wise or of the appropriate type and flag. The comment argument is a fixed string used to comment the metadata item. The arguments to the name formatting codes and the metadata itself are passed as arguments following the comment string. The data must be a pointer for any of the elements stored in data.void. The argument list must be interpreted appropriately by the va_list operators in the function specified size and type.
| name | Name of metadata item. |
| type | Type of metadata item. |
| comment | Comment for metadata item. |
| psMetadataItem* psMetadataItemAllocBool | ( | const char * | name, | |
| const char * | comment, | |||
| bool | value | |||
| ) |
Create a metadata item with specified psBool data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocF32 | ( | const char * | name, | |
| const char * | comment, | |||
| psF32 | value | |||
| ) |
Create a metadata item with specified psF32 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocF64 | ( | const char * | name, | |
| const char * | comment, | |||
| psF64 | value | |||
| ) |
Create a metadata item with specified psF64 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocPtr | ( | const char * | name, | |
| psDataType | type, | |||
| const char * | comment, | |||
| psPtr | value | |||
| ) |
Create a metadata item with specified psPtr data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| type | Data type of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocS16 | ( | const char * | name, | |
| const char * | comment, | |||
| psS16 | value | |||
| ) |
Create a metadata item with specified psS16 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocS32 | ( | const char * | name, | |
| const char * | comment, | |||
| psS32 | value | |||
| ) |
Create a metadata item with specified psS32 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocS64 | ( | const char * | name, | |
| const char * | comment, | |||
| psS64 | value | |||
| ) |
Create a metadata item with specified psS64 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocS8 | ( | const char * | name, | |
| const char * | comment, | |||
| psS8 | value | |||
| ) |
Create a metadata item with specified psS8 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocStr | ( | const char * | name, | |
| const char * | comment, | |||
| const char * | value | |||
| ) |
Create a metadata item with specified string data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocU16 | ( | const char * | name, | |
| const char * | comment, | |||
| psU16 | value | |||
| ) |
Create a metadata item with specified psU16 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocU32 | ( | const char * | name, | |
| const char * | comment, | |||
| psU32 | value | |||
| ) |
Create a metadata item with specified psU32 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocU64 | ( | const char * | name, | |
| const char * | comment, | |||
| psU64 | value | |||
| ) |
Create a metadata item with specified psU64 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocU8 | ( | const char * | name, | |
| const char * | comment, | |||
| psU8 | value | |||
| ) |
Create a metadata item with specified psU8 data.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct.
| name | Name of metadata item. |
| comment | Comment for metadata item. |
| value | the value of the metadata item. |
| psMetadataItem* psMetadataItemAllocV | ( | const char * | name, | |
| psDataType | type, | |||
| const char * | comment, | |||
| va_list | list | |||
| ) |
Create a metadata item with va_list.
Returns a fill psMetadataItem ready for insertion into the psMetadata struct. The name argument specifies the name to use for this item, and may include sprintf formatting codes. The format entry specifies both the metadata type and optional flags and is created by bit-wise or of the appropriate type and flag. The comment argument is a fixed string used to comment the metadata item. The arguments to the name formatting codes and the metadata itself are passed as arguments following the comment string. The data must be a pointer for any of the elements stored in data.void. The argument list must be interpreted appropriately by the va_list operators in the function specified size and type.
| name | Name of metadata item. |
| type | Type of metadata item. |
| comment | Comment for metadata item. |
| list | Arguments for name formatting and metadata item data. |
| bool psMetadataItemCompare | ( | const psMetadataItem * | compare, | |
| const psMetadataItem * | template | |||
| ) |
Compares two psMetadataItems.
| compare | Item to compare to the template |
| template | The template |
| psMetadataItem* psMetadataItemCopy | ( | const psMetadataItem * | in | ) |
Creates a new copy of a psMetadataItem.
| in | metadata item to be copied |
| psBool psMetadataItemParseBool | ( | const psMetadataItem * | item | ) |
| psF32 psMetadataItemParseF32 | ( | const psMetadataItem * | item | ) |
| psF64 psMetadataItemParseF64 | ( | const psMetadataItem * | item | ) |
| psS16 psMetadataItemParseS16 | ( | const psMetadataItem * | item | ) |
| psS32 psMetadataItemParseS32 | ( | const psMetadataItem * | item | ) |
| psS8 psMetadataItemParseS8 | ( | const psMetadataItem * | item | ) |
| psString psMetadataItemParseString | ( | const psMetadataItem * | item | ) |
| psU16 psMetadataItemParseU16 | ( | const psMetadataItem * | item | ) |
| psU32 psMetadataItemParseU32 | ( | const psMetadataItem * | item | ) |
| psU8 psMetadataItemParseU8 | ( | const psMetadataItem * | item | ) |
| bool psMetadataItemPrint | ( | FILE * | fd, | |
| const char * | format, | |||
| const psMetadataItem * | item | |||
| ) |
Print metadata item to file.
Metadata items may be printed to an open file descriptor based on a provided format. The format is a sprintf format statement with exactly one % formatting command. If the metadata item type is a numeric type, this formatting command must also be numeric, and the type conversion performed to the value to match the format type. If the metadata type is a string, the formatting command must also be for a string. If the metadata type is any other data type, printing is not allowed.
| fd | Pointer to file to write metadata item. |
| format | Format to print metadata item. |
| item | Metadata item to print. |
| bool psMetadataItemTransfer | ( | psMetadata * | out, | |
| const psMetadata * | in, | |||
| const char * | key | |||
| ) |
Copy a metadata item from one psMetadata to another.
Creates a copy of a psMetadataItem from in and appends it to out. If out is NULL, a new container is created.
| out | output Metadata container for copying. |
| in | Metadata collection from which to copy. |
| key | key to identify the metadata item for copying. |
| psMetadataIterator* psMetadataIteratorAlloc | ( | const psMetadata * | md, | |
| long | location, | |||
| const char * | regex | |||
| ) |
Creates a psMetadataIterator to iterate over the specified psMetadata.
Supports the subsetting of the metadata via keyword using regular expression. If no regular expression is specified, iteration over the entire psMetadata is performed.
| md | the psMetadata to iterate with |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| regex | A regular expression for subsetting the psMetadata. If NULL, no subsetting is performed. |
| bool psMetadataIteratorSet | ( | psMetadataIterator * | iterator, | |
| long | location | |||
| ) |
Set the iterator of the psMetadat to a given position.
If location is invalid the iterator position is not changed.
| iterator | psMetadata iterator |
| location | index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| psMetadataItem* psMetadataLookup | ( | const psMetadata * | md, | |
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name.
Items may be found in the metadata by providing a key. If the key is non-unique, the first item is returned. If the item is not found, null is returned.
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| bool psMetadataLookupBool | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return its boolean 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psF32 psMetadataLookupF32 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return its single precision 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psF64 psMetadataLookupF64 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return its double precision 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psMetadata* psMetadataLookupMetadata | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return its metadata 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psPtr psMetadataLookupPtr | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psS16 psMetadataLookupS16 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psS32 psMetadataLookupS32 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psS64 psMetadataLookupS64 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psS8 psMetadataLookupS8 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psString psMetadataLookupStr | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return its string 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psTime* psMetadataLookupTime | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | key | |||
| ) |
Find an item in the metadata collection based on key name and return it as a psTime pointer.
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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psU16 psMetadataLookupU16 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psU32 psMetadataLookupU32 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psU64 psMetadataLookupU64 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| psU8 psMetadataLookupU8 | ( | bool * | status, | |
| const psMetadata * | md, | |||
| const char * | 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.
| status | Status of lookup. |
| md | Metadata collection to lookup metadata item. |
| key | Name of metadata key. |
| bool psMetadataPrint | ( | FILE * | fd, | |
| const psMetadata * | md, | |||
| int | level | |||
| ) |
Prints metadata collection.
Metadata contents are printed to a valid file descriptor if one exists. Otherwise, fd should be NULL and the contents are printed to the screen (stdout).
| fd | File Descriptor or NULL |
| md | Metadata collection to print. |
| level | the level of metadata items. |
| bool psMetadataRemoveIndex | ( | psMetadata * | md, | |
| long | location | |||
| ) |
Removes an item from metadata by index number.
| md | Metadata collection to remove metadata item. |
| location | Index number, PS_LIST_HEAD, or PS_LIST_TAIL |
| bool psMetadataRemoveKey | ( | psMetadata * | md, | |
| const char * | key | |||
| ) |
Removes an item from metadata by key name.
| md | Metadata collection to remove metadata item. |
| key | Name of metadata key. |
| psPixels* psPixelsAlloc | ( | long | nalloc | ) |
Concatenates two psPixels.
psPixelsConcatenate shall concatenate pixels onto out. In the event that out is NULL, a new psPixels shall be allocated, and the contents of pixels simply copied in. If pixels is NULL, the function shall generate an error and return NULL. The function shall take care to ensure that there are no duplicate pixels in out.
| psPixels* psPixelsFromMask | ( | psPixels * | out, | |
| const psImage * | mask, | |||
| psMaskType | maskVal | |||
| ) |
Generate a psPixels from a mask psImage.
psMaskToPixels shall return a psPixels consisting of the coordinates in the mask that match the maskVal. The out pixel list shall be modified if supplied, or allocated and returned if NULL. In hte event that mask is NULL, the function shall generate an error and return NULL.
| psPixelCoord psPixelsGet | ( | const psPixels * | pixels, | |
| long | position | |||
| ) |
Returns the value of the pixels array at the specified position.
A negative position means index from the end.
| pixels | input pixels from which to get |
| position | position to get |
| long psPixelsLength | ( | const psPixels * | pixels | ) |
| bool psPixelsSet | ( | psPixels * | pixels, | |
| long | position, | |||
| psPixelCoord | value | |||
| ) |
Sets the value of the the pixels array at the specified position to value.
A negative position means index from the end.
| pixels | pixels to set |
| position | position to set |
| value | pixels value to be set |
| psImage* psPixelsToMask | ( | psImage * | out, | |
| const psPixels * | pixels, | |||
| psRegion | region, | |||
| psMaskType | maskVal | |||
| ) |
Generate a psImage from a psPixels.
psPixelsToMask shall return an image of type U8 with the pixels lying within the specified region set to the maskVal. The out image shall be modified if supplied, or allocated and returned if NULL. The size of the output image shall be region->x1 - region->x0 by region->y1 - region->y0, with out->x0 = region->x0 and out->y0 = region->y0. In the event that either of pixels or region are NULL, the function shall generate an error and return NULL.
| out | psImage to recycle, or NULL |
| pixels | list of pixels to use |
| region | region to define the output mask image |
| maskVal | the mask bit-values to act upon |
| psPolynomial1D* psPolynomial1DfromMetadata | ( | const psMetadata * | folder | ) |
Allocates a new psPolynomial1D structure with information from a psMetadata.
Parses a psMetadata container with psPolynomial1D information. The first two elements of the metadata folder specify the order of the x & y variables. (ie, NORDER_X, NORDER_Y). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00, ERR_X00_Y00, etc.). If the orders or any coefficients are missing or have incorrect syntax, NULL is returned.
| folder | folder containing the polynomial info. |
| bool psPolynomial1DtoMetadata | ( | psMetadata * | md, | |
| const psPolynomial1D * | poly, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Stores the information from a psPolynomial1D structure in a psMetadata container.
Creates a psMetadata folder with psPolynomial1D information. The first two elements of the metadata folder specify the order of the x & y variables. (ie, NORDER_X, NORDER_Y). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00, ERR_X00_Y00, etc.). The input polynomial must be of ordinary type and have a valid name format. False is also returned if any inputs are NULL. *If a particular mask element is non-zero, that polynomial coefficient (and error) are skipped.
| md | Metadata container for polynomial storage. |
| poly | Polynomial information to be stored. |
| format | Name of polynomial folder. |
| psPolynomial2D* psPolynomial2DfromMetadata | ( | const psMetadata * | folder | ) |
Allocates a new psPolynomial2D structure with information from a psMetadata.
Parses a psMetadata container with psPolynomial2D information. The first two elements of the metadata folder specify the order of the x & y variables. (ie, NORDER_X, NORDER_Y). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00, ERR_X00_Y00, etc.). If the orders or any coefficients are missing or have incorrect syntax, NULL is returned.
| folder | folder containing the polynomial info. |
| bool psPolynomial2DtoMetadata | ( | psMetadata * | md, | |
| const psPolynomial2D * | poly, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Stores the information from a psPolynomial2D structure in a psMetadata container.
Creates a psMetadata folder with psPolynomial2D information. The first two elements of the metadata folder specify the order of the x & y variables. (ie, NORDER_X, NORDER_Y). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00, ERR_X00_Y00, etc.). The input polynomial must be of ordinary type and have a valid name format. False is also returned if any inputs are NULL. *If a particular mask element is non-zero, that polynomial coefficient (and error) are skipped.
| md | Metadata container for polynomial storage. |
| poly | Polynomial information to be stored. |
| format | Name of polynomial folder. |
| psPolynomial3D* psPolynomial3DfromMetadata | ( | const psMetadata * | folder | ) |
Allocates a new psPolynomial3D structure with information from a psMetadata.
Parses a psMetadata container with psPolynomial3D information. The first three elements of the metadata folder specify the order of the x, y, & z variables. (ie, NORDER_X, NORDER_Y, NORDER_Z). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00_Z00, ERR_X00_Y00_Z00, etc.). If the orders or any coefficients are missing or have incorrect syntax, NULL is returned.
| folder | folder containing the polynomial info. |
| bool psPolynomial3DtoMetadata | ( | psMetadata * | md, | |
| const psPolynomial3D * | poly, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Stores the information from a psPolynomial3D structure in a psMetadata container.
Creates a psMetadata folder with psPolynomial3D information. The first three elements of the metadata folder specify the order of the x, y, & z variables. (ie, NORDER_X, NORDER_Y, NORDER_Z). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00_Z00, ERR_X00_Y00_Z00, etc.). The input polynomial must be of ordinary type and have a valid name format. False is also returned if any inputs are NULL. *If a particular mask element is non-zero, that polynomial coefficient (and error) are skipped.
| md | Metadata container for polynomial storage. |
| poly | Polynomial information to be stored. |
| format | Name of polynomial folder. |
| psPolynomial4D* psPolynomial4DfromMetadata | ( | const psMetadata * | folder | ) |
Allocates a new psPolynomial4D structure with information from a psMetadata.
Parses a psMetadata container with psPolynomial4D information. The first four elements of the metadata folder specify the order of the x, y, z, & t variables. (ie, NORDER_X, NORDER_Y, NORDER_Z, NORDER_T). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00_Z00_T00, ERR_X00_Y00_Z00_T00, etc.). If the orders or any coefficients are missing or have incorrect syntax, NULL is returned.
| folder | folder containing the polynomial info. |
| bool psPolynomial4DtoMetadata | ( | psMetadata * | md, | |
| const psPolynomial4D * | poly, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Stores the information from a psPolynomial4D structure in a psMetadata container.
Creates a psMetadata folder with psPolynomial4D information. The first four elements of the metadata folder specify the order of the x, y, z, & t variables. (ie, NORDER_X, NORDER_Y, NORDER_Z, NORDER_T). The following elements are the values of the coefficients and the coefficient errors. (ie, VAL_X00_Y00_Z00_T00, ERR_X00_Y00_Z00_T00, etc.). The input polynomial must be of ordinary type and have a valid name format. False is also returned if any inputs are NULL. *If a particular mask element is non-zero, that polynomial coefficient (and error) are skipped.
| md | Metadata container for polynomial storage. |
| poly | Polynomial information to be stored. |
| format | Name of polynomial folder. |
| psArray* psVectorsReadFromFile | ( | const char * | filename, | |
| const char * | format | |||
| ) |
Read vectors from file.
Read numeric vectors from ASCII text file
| filename | File to be read |
| format | scanf-like format string |
1.5.1