MISR Toolkit  1.5.1
hkit.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id$ */
15 
16 /*+ hkit.h
17  *** private header file for hkit routines
18  + */
19 
20 #ifndef __HKIT_H
21 #include "hdf.h"
22 #include "hfile.h"
23 
24 /* tag_messages is the list of tag descriptions in the system, kept as
25  tag-description pairs. To look up a description, a linear search is
26  required but efficiency should be okay. */
27 typedef struct tag_descript_t
28  {
29  uint16 tag; /* tag for description ? */
30  const char *desc; /* tag description ? */
31  const char *name; /* tag name ? */
32  }
34 
35 /* stringizing macro */
36 #define string(x) #x
37 
38 /* NOTE:
39  * Please keep tag descriptions <= 30 characters - a
40  * lot of pretty-printing code depends on it.
41  */
43 {
44 /* low-level set */
45  {DFTAG_NULL, string(DFTAG_NULL), "No Data"},
46  {DFTAG_LINKED, string(DFTAG_LINKED), "Linked Blocks Indicator"},
47  {DFTAG_VERSION, string(DFTAG_VERSION), "Version Descriptor"},
48  {DFTAG_COMPRESSED, string(DFTAG_COMPRESSED), "Compressed Data Indicator"},
49  {DFTAG_CHUNK, string(DFTAG_CHUNK), "Data Chunk"},
50 
51 /* utility set */
52  {DFTAG_FID, string(DFTAG_FID), "File Identifier"},
53  {DFTAG_FD, string(DFTAG_FD), "File Description"},
54  {DFTAG_TID, string(DFTAG_TID), "Tag Identifier"},
55  {DFTAG_TD, string(DFTAG_TD), "Tag Description"},
56  {DFTAG_DIL, string(DFTAG_DIL), "Data Id Label"},
57  {DFTAG_DIA, string(DFTAG_DIA), "Data Id Annotation"},
58  {DFTAG_NT, string(DFTAG_NT), "Number type"},
59  {DFTAG_MT, string(DFTAG_MT), "Machine type"},
60  {DFTAG_FREE, string(DFTAG_FREE), "Free space"},
61 
62  /* raster-8 Tags */
63  {DFTAG_ID8, string(DFTAG_ID8), "Image Dimensions-8"},
64  {DFTAG_IP8, string(DFTAG_IP8), "Image Palette-8"},
65  {DFTAG_RI8, string(DFTAG_RI8), "Raster Image-8"},
66  {DFTAG_CI8, string(DFTAG_CI8), "RLE Compressed Image-8"},
67  {DFTAG_II8, string(DFTAG_II8), "Imcomp Image-8"},
68 
69  /* Raster Image Tags */
70  {DFTAG_ID, string(DFTAG_ID), "Image Dimensions"},
71  {DFTAG_LUT, string(DFTAG_LUT), "Image Palette"},
72  {DFTAG_RI, string(DFTAG_RI), "Raster Image Data"},
73  {DFTAG_CI, string(DFTAG_CI), "Compressed Image"},
74  {DFTAG_RIG, string(DFTAG_RIG), "Raster Image Group"},
75  {DFTAG_LD, string(DFTAG_LD), "Palette Dimension"},
76  {DFTAG_MD, string(DFTAG_MD), "Matte Dimension"},
77  {DFTAG_MA, string(DFTAG_MA), "Matte Data"},
78  {DFTAG_CCN, string(DFTAG_CCN), "Color Correction"},
79  {DFTAG_CFM, string(DFTAG_CFM), "Color Format"},
80  {DFTAG_AR, string(DFTAG_AR), "Aspect Ratio"},
81  {DFTAG_DRAW, string(DFTAG_DRAW), "Sequenced images"},
82  {DFTAG_RUN, string(DFTAG_RUN), "Runable program / script"},
83  {DFTAG_XYP, string(DFTAG_XYP), "X-Y position"},
84  {DFTAG_MTO, string(DFTAG_MTO), "M/c-Type override"},
85 
86  /* Tektronix */
87  {DFTAG_T14, string(DFTAG_T14), "TEK 4014 Data"},
88  {DFTAG_T105, string(DFTAG_T105), "TEK 4105 data"},
89 
90  /* Scientific / Numeric Data Sets */
91  {DFTAG_SDG, string(DFTAG_SDG), "Scientific Data Group"},
92  {DFTAG_SDD, string(DFTAG_SDD), "SciData dimension record"},
93  {DFTAG_SD, string(DFTAG_SD), "Scientific Data"},
94  {DFTAG_SDS, string(DFTAG_SDS), "SciData scales"},
95  {DFTAG_SDL, string(DFTAG_SDL), "SciData labels"},
96  {DFTAG_SDU, string(DFTAG_SDU), "SciData units"},
97  {DFTAG_SDF, string(DFTAG_SDF), "SciData formats"},
98  {DFTAG_SDM, string(DFTAG_SDM), "SciData max/min"},
99  {DFTAG_SDC, string(DFTAG_SDC), "SciData coordsys"},
100  {DFTAG_SDT, string(DFTAG_SDT), "Transpose"},
101  {DFTAG_SDLNK, string(DFTAG_SDLNK), "Links related to the dataset"},
102  {DFTAG_NDG, string(DFTAG_NDG), "Numeric Data Group"},
103  {DFTAG_CAL, string(DFTAG_CAL), "Calibration information"},
104  {DFTAG_FV, string(DFTAG_FV), "Fill value information"},
105 
106  /* V Group Tags */
107  {DFTAG_VG, string(DFTAG_VG), "Vgroup"},
108  {DFTAG_VH, string(DFTAG_VH), "Vdata"},
109  {DFTAG_VS, string(DFTAG_VS), "Vdata Storage"},
110 
111  /* Compression Schemes */
112  {DFTAG_RLE, string(DFTAG_RLE), "Run Length Encoding"},
113  {DFTAG_IMCOMP, string(DFTAG_IMCOMP), "IMCOMP Encoding"},
114  {DFTAG_JPEG, string(DFTAG_JPEG), "24-bit JPEG Encoding"},
115  {DFTAG_GREYJPEG, string(DFTAG_GREYJPEG), "8-bit JPEG Encoding"},
116  {DFTAG_JPEG5, string(DFTAG_JPEG5), "24-bit JPEG Encoding"},
117  {DFTAG_GREYJPEG5, string(DFTAG_GREYJPEG5), "8-bit JPEG Encoding"}
118 
119 };
120 
121 /* nt_message is the list of NT descriptions in the system, kept as
122  NT-description pairs. To look up a description, a linear search is
123  required but efficiency should be okay. */
124 typedef struct nt_descript_t
125  {
126  int32 nt; /* nt for description */
127  const char *name; /* nt name */
128  const char *desc; /* nt description */
129  }
131 
133 {
134 
135 /* Masks for types */
136  {DFNT_NATIVE, string(DFNT_NATIVE), "native format"},
137  {DFNT_CUSTOM, string(DFNT_CUSTOM), "custom format"},
138  {DFNT_LITEND, string(DFNT_LITEND), "little-endian format"},
139 
140  {DFNT_NONE, string(DFNT_NONE), "number-type not set"},
141 
142 /* Floating point types */
143  {DFNT_FLOAT32, string(DFNT_FLOAT32), "32-bit floating point"},
144  {DFNT_FLOAT64, string(DFNT_FLOAT64), "64-bit floating point"},
145  {DFNT_FLOAT128, string(DFNT_FLOAT128), "128-bit floating point"},
146 
147 /* Integer types */
148  {DFNT_INT8, string(DFNT_INT8), "8-bit signed integer"},
149  {DFNT_UINT8, string(DFNT_UINT8), "8-bit unsigned integer"},
150  {DFNT_INT16, string(DFNT_INT16), "16-bit signed integer"},
151  {DFNT_UINT16, string(DFNT_UINT16), "16-bit unsigned integer"},
152  {DFNT_INT32, string(DFNT_INT32), "32-bit signed integer"},
153  {DFNT_UINT32, string(DFNT_UINT32), "32-bit unsigned integer"},
154  {DFNT_INT64, string(DFNT_INT64), "64-bit signed integer"},
155  {DFNT_UINT64, string(DFNT_UINT64), "64-bit unsigned integer"},
156  {DFNT_INT128, string(DFNT_INT128), "128-bit signed integer"},
157  {DFNT_UINT128, string(DFNT_UINT128), "128-bit unsigned integer"},
158 
159 /* Character types */
160  {DFNT_CHAR8, string(DFNT_CHAR8), "8-bit signed char"},
161  {DFNT_UCHAR8, string(DFNT_UCHAR8), "8-bit unsigned char"},
162  {DFNT_CHAR16, string(DFNT_CHAR16), "16-bit signed char"},
163  {DFNT_UCHAR16, string(DFNT_UCHAR16), "16-bit unsigned char"}
164 
165 };
166 
167 #endif /* __HKIT_H */
#define DFTAG_CFM
Definition: htags.h:70
#define PRIVATE
Definition: hdf.h:117
#define DFTAG_RI8
Definition: htags.h:54
#define DFTAG_FID
Definition: htags.h:41
#define DFNT_INT128
Definition: hntdefs.h:51
#define DFNT_LITEND
Definition: hntdefs.h:27
#define DFTAG_SD
Definition: htags.h:91
#define DFTAG_DIA
Definition: htags.h:46
#define DFTAG_VH
Definition: htags.h:110
#define DFNT_UINT16
Definition: hntdefs.h:46
uint16 tag
Definition: hkit.h:29
#define DFNT_UINT8
Definition: hntdefs.h:43
#define DFNT_UINT64
Definition: hntdefs.h:50
#define DFNT_UCHAR8
Definition: hntdefs.h:54
#define string(x)
Definition: hkit.h:36
#define DFTAG_CI
Definition: htags.h:62
#define DFNT_NATIVE
Definition: hntdefs.h:25
#define DFTAG_TID
Definition: htags.h:43
struct tag_descript_t tag_descript_t
#define DFTAG_LUT
Definition: htags.h:60
#define DFTAG_NDG
Definition: htags.h:100
#define DFTAG_CHUNK
Definition: htags.h:38
#define DFTAG_MA
Definition: htags.h:68
#define DFTAG_T105
Definition: htags.h:81
#define DFTAG_SDG
Definition: htags.h:89
#define DFTAG_AR
Definition: htags.h:71
#define DFTAG_MTO
Definition: htags.h:77
#define DFTAG_ID
Definition: htags.h:59
#define DFTAG_SDF
Definition: htags.h:95
#define DFTAG_SDM
Definition: htags.h:96
#define DFTAG_SDU
Definition: htags.h:94
#define DFTAG_MD
Definition: htags.h:67
#define DFTAG_SDD
Definition: htags.h:90
#define DFTAG_VS
Definition: htags.h:111
HDFFCLIBAPI _fcd intf intf * nt
#define DFNT_UCHAR16
Definition: hntdefs.h:59
#define DFTAG_SDLNK
Definition: htags.h:99
#define DFTAG_CI8
Definition: htags.h:55
#define DFTAG_COMPRESSED
Definition: htags.h:33
#define DFTAG_SDL
Definition: htags.h:93
#define DFTAG_II8
Definition: htags.h:56
#define DFTAG_DRAW
Definition: htags.h:73
#define DFTAG_RUN
Definition: htags.h:74
struct nt_descript_t nt_descript_t
#define DFTAG_NULL
Definition: htags.h:30
#define DFTAG_RI
Definition: htags.h:61
#define DFNT_FLOAT128
Definition: hntdefs.h:40
#define DFNT_INT64
Definition: hntdefs.h:49
#define DFTAG_FD
Definition: htags.h:42
const char * name
Definition: hkit.h:31
#define DFTAG_RLE
Definition: htags.h:114
#define DFTAG_GREYJPEG5
Definition: htags.h:120
#define DFTAG_JPEG
Definition: htags.h:117
#define DFTAG_SDT
Definition: htags.h:98
PRIVATE const tag_descript_t tag_descriptions[]
Definition: hkit.h:42
#define DFNT_INT32
Definition: hntdefs.h:47
#define DFNT_FLOAT32
Definition: hntdefs.h:36
#define DFTAG_VERSION
Definition: htags.h:32
#define DFTAG_RIG
Definition: htags.h:65
PRIVATE const nt_descript_t nt_descriptions[]
Definition: hkit.h:132
#define DFTAG_FV
Definition: htags.h:103
#define DFTAG_TD
Definition: htags.h:44
#define DFTAG_SDS
Definition: htags.h:92
#define DFTAG_FREE
Definition: htags.h:49
#define DFNT_CHAR8
Definition: hntdefs.h:56
#define DFTAG_ID8
Definition: htags.h:52
const char * desc
Definition: hkit.h:30
#define DFNT_UINT32
Definition: hntdefs.h:48
#define DFNT_CUSTOM
Definition: hntdefs.h:26
#define DFTAG_JPEG5
Definition: htags.h:119
#define DFTAG_SDC
Definition: htags.h:97
#define DFTAG_LINKED
Definition: htags.h:31
#define DFNT_FLOAT64
Definition: hntdefs.h:38
#define DFTAG_LD
Definition: htags.h:66
#define DFTAG_VG
Definition: htags.h:109
#define DFTAG_IP8
Definition: htags.h:53
#define DFNT_INT16
Definition: hntdefs.h:45
#define DFTAG_IMCOMP
Definition: htags.h:116
#define DFTAG_CAL
Definition: htags.h:102
#define DFNT_INT8
Definition: hntdefs.h:42
#define DFTAG_GREYJPEG
Definition: htags.h:118
#define DFTAG_MT
Definition: htags.h:48
#define DFTAG_T14
Definition: htags.h:80
#define DFTAG_DIL
Definition: htags.h:45
#define DFTAG_NT
Definition: htags.h:47
#define DFNT_UINT128
Definition: hntdefs.h:52
#define DFNT_CHAR16
Definition: hntdefs.h:58
#define DFNT_NONE
Definition: hntdefs.h:32
#define DFTAG_CCN
Definition: htags.h:69
#define DFTAG_XYP
Definition: htags.h:76

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52