MISR Toolkit
1.5.1
win64
HDF_4.2.14
include
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
}
33
tag_descript_t
;
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
*/
42
PRIVATE
const
tag_descript_t
tag_descriptions
[] =
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
}
130
nt_descript_t
;
131
132
PRIVATE
const
nt_descript_t
nt_descriptions
[] =
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 */
DFTAG_CFM
#define DFTAG_CFM
Definition:
htags.h:70
PRIVATE
#define PRIVATE
Definition:
hdf.h:117
DFTAG_RI8
#define DFTAG_RI8
Definition:
htags.h:54
hfile.h
DFTAG_FID
#define DFTAG_FID
Definition:
htags.h:41
DFNT_INT128
#define DFNT_INT128
Definition:
hntdefs.h:51
DFNT_LITEND
#define DFNT_LITEND
Definition:
hntdefs.h:27
DFTAG_SD
#define DFTAG_SD
Definition:
htags.h:91
DFTAG_DIA
#define DFTAG_DIA
Definition:
htags.h:46
DFTAG_VH
#define DFTAG_VH
Definition:
htags.h:110
DFNT_UINT16
#define DFNT_UINT16
Definition:
hntdefs.h:46
tag_descript_t::tag
uint16 tag
Definition:
hkit.h:29
DFNT_UINT8
#define DFNT_UINT8
Definition:
hntdefs.h:43
DFNT_UINT64
#define DFNT_UINT64
Definition:
hntdefs.h:50
DFNT_UCHAR8
#define DFNT_UCHAR8
Definition:
hntdefs.h:54
string
#define string(x)
Definition:
hkit.h:36
DFTAG_CI
#define DFTAG_CI
Definition:
htags.h:62
DFNT_NATIVE
#define DFNT_NATIVE
Definition:
hntdefs.h:25
DFTAG_TID
#define DFTAG_TID
Definition:
htags.h:43
tag_descript_t
struct tag_descript_t tag_descript_t
DFTAG_LUT
#define DFTAG_LUT
Definition:
htags.h:60
DFTAG_NDG
#define DFTAG_NDG
Definition:
htags.h:100
DFTAG_CHUNK
#define DFTAG_CHUNK
Definition:
htags.h:38
DFTAG_MA
#define DFTAG_MA
Definition:
htags.h:68
DFTAG_T105
#define DFTAG_T105
Definition:
htags.h:81
DFTAG_SDG
#define DFTAG_SDG
Definition:
htags.h:89
tag_descript_t
Definition:
hkit.h:27
DFTAG_AR
#define DFTAG_AR
Definition:
htags.h:71
DFTAG_MTO
#define DFTAG_MTO
Definition:
htags.h:77
DFTAG_ID
#define DFTAG_ID
Definition:
htags.h:59
DFTAG_SDF
#define DFTAG_SDF
Definition:
htags.h:95
DFTAG_SDM
#define DFTAG_SDM
Definition:
htags.h:96
DFTAG_SDU
#define DFTAG_SDU
Definition:
htags.h:94
DFTAG_MD
#define DFTAG_MD
Definition:
htags.h:67
DFTAG_SDD
#define DFTAG_SDD
Definition:
htags.h:90
DFTAG_VS
#define DFTAG_VS
Definition:
htags.h:111
nt
HDFFCLIBAPI _fcd intf intf * nt
Definition:
hproto_fortran.h:1076
DFNT_UCHAR16
#define DFNT_UCHAR16
Definition:
hntdefs.h:59
DFTAG_SDLNK
#define DFTAG_SDLNK
Definition:
htags.h:99
nt_descript_t
Definition:
hkit.h:124
DFTAG_CI8
#define DFTAG_CI8
Definition:
htags.h:55
DFTAG_COMPRESSED
#define DFTAG_COMPRESSED
Definition:
htags.h:33
DFTAG_SDL
#define DFTAG_SDL
Definition:
htags.h:93
DFTAG_II8
#define DFTAG_II8
Definition:
htags.h:56
DFTAG_DRAW
#define DFTAG_DRAW
Definition:
htags.h:73
DFTAG_RUN
#define DFTAG_RUN
Definition:
htags.h:74
nt_descript_t
struct nt_descript_t nt_descript_t
DFTAG_NULL
#define DFTAG_NULL
Definition:
htags.h:30
DFTAG_RI
#define DFTAG_RI
Definition:
htags.h:61
DFNT_FLOAT128
#define DFNT_FLOAT128
Definition:
hntdefs.h:40
DFNT_INT64
#define DFNT_INT64
Definition:
hntdefs.h:49
DFTAG_FD
#define DFTAG_FD
Definition:
htags.h:42
tag_descript_t::name
const char * name
Definition:
hkit.h:31
DFTAG_RLE
#define DFTAG_RLE
Definition:
htags.h:114
DFTAG_GREYJPEG5
#define DFTAG_GREYJPEG5
Definition:
htags.h:120
DFTAG_JPEG
#define DFTAG_JPEG
Definition:
htags.h:117
DFTAG_SDT
#define DFTAG_SDT
Definition:
htags.h:98
tag_descriptions
PRIVATE const tag_descript_t tag_descriptions[]
Definition:
hkit.h:42
DFNT_INT32
#define DFNT_INT32
Definition:
hntdefs.h:47
DFNT_FLOAT32
#define DFNT_FLOAT32
Definition:
hntdefs.h:36
DFTAG_VERSION
#define DFTAG_VERSION
Definition:
htags.h:32
DFTAG_RIG
#define DFTAG_RIG
Definition:
htags.h:65
nt_descriptions
PRIVATE const nt_descript_t nt_descriptions[]
Definition:
hkit.h:132
DFTAG_FV
#define DFTAG_FV
Definition:
htags.h:103
DFTAG_TD
#define DFTAG_TD
Definition:
htags.h:44
DFTAG_SDS
#define DFTAG_SDS
Definition:
htags.h:92
DFTAG_FREE
#define DFTAG_FREE
Definition:
htags.h:49
DFNT_CHAR8
#define DFNT_CHAR8
Definition:
hntdefs.h:56
DFTAG_ID8
#define DFTAG_ID8
Definition:
htags.h:52
hdf.h
tag_descript_t::desc
const char * desc
Definition:
hkit.h:30
DFNT_UINT32
#define DFNT_UINT32
Definition:
hntdefs.h:48
DFNT_CUSTOM
#define DFNT_CUSTOM
Definition:
hntdefs.h:26
DFTAG_JPEG5
#define DFTAG_JPEG5
Definition:
htags.h:119
DFTAG_SDC
#define DFTAG_SDC
Definition:
htags.h:97
DFTAG_LINKED
#define DFTAG_LINKED
Definition:
htags.h:31
DFNT_FLOAT64
#define DFNT_FLOAT64
Definition:
hntdefs.h:38
DFTAG_LD
#define DFTAG_LD
Definition:
htags.h:66
DFTAG_VG
#define DFTAG_VG
Definition:
htags.h:109
DFTAG_IP8
#define DFTAG_IP8
Definition:
htags.h:53
DFNT_INT16
#define DFNT_INT16
Definition:
hntdefs.h:45
DFTAG_IMCOMP
#define DFTAG_IMCOMP
Definition:
htags.h:116
DFTAG_CAL
#define DFTAG_CAL
Definition:
htags.h:102
DFNT_INT8
#define DFNT_INT8
Definition:
hntdefs.h:42
DFTAG_GREYJPEG
#define DFTAG_GREYJPEG
Definition:
htags.h:118
DFTAG_MT
#define DFTAG_MT
Definition:
htags.h:48
DFTAG_T14
#define DFTAG_T14
Definition:
htags.h:80
DFTAG_DIL
#define DFTAG_DIL
Definition:
htags.h:45
DFTAG_NT
#define DFTAG_NT
Definition:
htags.h:47
DFNT_UINT128
#define DFNT_UINT128
Definition:
hntdefs.h:52
DFNT_CHAR16
#define DFNT_CHAR16
Definition:
hntdefs.h:58
DFNT_NONE
#define DFNT_NONE
Definition:
hntdefs.h:32
DFTAG_CCN
#define DFTAG_CCN
Definition:
htags.h:69
DFTAG_XYP
#define DFTAG_XYP
Definition:
htags.h:76
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52