• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MacProjects/H03-May-2022-10,25010,224

testfiles/H03-May-2022-7632

CMakeTests.cmakeH A D03-Mar-202013.6 KiB387341

HELINK.OPTH A D03-Mar-202033 31

Makefile.amH A D03-Mar-20204.3 KiB13891

Makefile.inH A D03-Mar-202056.3 KiB1,5601,350

READMEH A D03-Mar-20201.3 KiB4625

README.TSTH A D03-Mar-202013.5 KiB437280

README.fp2hdfH A D03-Mar-2020602 2013

README.fp2hdf.testH A D03-Mar-20202.3 KiB6445

decompress.cH A D03-Mar-20208.5 KiB317173

fp2hdf.cH A D03-Mar-202072.9 KiB2,2901,572

fp2hdf.input1H A D03-Mar-2020556 5049

fp2hdf.input1-32H A D03-Mar-2020420 3837

fp2hdf.out1H A D03-Mar-20205.5 KiB243159

fp2hdf.out1-32H A D03-Mar-20204.2 KiB185121

fp2hdf.out2H A D03-Mar-20207.7 KiB124123

fp2hdf.out2-32H A D03-Mar-20206.4 KiB102101

fp2hdf.testH A D03-Mar-20203.7 KiB12941

fp2hdf.test.resultH A D03-Mar-20201.4 KiB4845

fptest.cH A D03-Mar-20209.2 KiB275184

getopt.cH A D03-Mar-202021.1 KiB758424

getopt1.cH A D03-Mar-20204.4 KiB188122

gif.hH A D03-Mar-20205.1 KiB16480

gif2hdf.cH A D03-Mar-20203.5 KiB12073

gif2mem.cH A D03-Mar-202011.1 KiB359217

gifread.cH A D03-Mar-202013.6 KiB428197

h4cc.inH A D03-Mar-20207.3 KiB258199

h4fc.inH A D03-Mar-20205.9 KiB214164

h4redeploy.inH A D03-Mar-20203.6 KiB167115

hdf24to8.cH A D03-Mar-20209.6 KiB349248

hdf2gif.cH A D03-Mar-20209.7 KiB366259

hdf2jpeg.cH A D03-Mar-202016.5 KiB374336

hdf8to24.cH A D03-Mar-202014.9 KiB351245

hdfcomp.cH A D03-Mar-202011.4 KiB242197

hdfcomp.out1H A D03-Mar-20201.7 KiB7154

hdfcomp.out1.1H A D03-Mar-2020886 3627

hdfcomp.out1.2H A D03-Mar-2020884 3627

hdfed-w.out1H A D03-Mar-20206.2 KiB105104

hdfed.input1H A D03-Mar-2020228 1817

hdfed.out1H A D03-Mar-20206.2 KiB105104

hdfgifwr.cH A D03-Mar-202013.3 KiB534298

hdfls.cH A D03-Mar-202022.2 KiB621517

hdfpack.cH A D03-Mar-202018.9 KiB654416

hdfpack.out1H A D03-Mar-20201.8 KiB4138

hdfpack.out1.1H A D03-Mar-2020977 2321

hdfpack.out1.2H A D03-Mar-2020831 1917

hdftopal.cH A D03-Mar-20202.9 KiB9351

hdftor8.cH A D03-Mar-202012.2 KiB394253

hdftor8.out1H A D03-Mar-20201.2 KiB4936

hdfunpac.cH A D03-Mar-20205.6 KiB221122

he.hH A D03-Mar-20204.7 KiB194141

he_cntrl.cH A D03-Mar-202045.9 KiB1,7371,443

he_disp.cH A D03-Mar-202011.3 KiB407268

he_file.cH A D03-May-202216.9 KiB617498

he_main.cH A D03-Mar-202029.2 KiB1,2741,005

he_proto.hH A D03-Mar-20206.3 KiB310196

jpeg2hdf.cH A D03-Mar-202017.4 KiB567452

jpeg2hdf.out1H A D03-Mar-2020447 2113

paltohdf.cH A D03-Mar-20203 KiB9352

r8tohdf.cH A D03-Mar-20205.8 KiB196149

ristosds.cH A D03-Mar-20206.1 KiB208150

ristosds.input1H A D03-Mar-2020146 1211

ristosds.out1H A D03-Mar-2020530 1110

testutil.sh.inH A D03-Mar-202014.9 KiB433292

vmake.cH A D03-Mar-202014.6 KiB610467

vshow.cH A D03-Mar-202024.1 KiB807669

writehdf.cH A D03-Mar-20207.3 KiB216144

README

1In this directory there are hdf utility programs, makefiles, and a
2subdirectory, testfiles/, which contains all the data files needed to test
3the utilities.
4
5The utilities are:
6
7    . hdf24to8 -- converts 24-bit raster images to hdf 8-bit images
8
9    . hdfcomp -- re-compresses an 8-bit raster hdf file
10
11    . hdfls -- lists basic information about an hdf file
12
13    . hdfpack --  compacts an hdf file
14
15    . hdftopal -- extracts a palette from an hdf file
16
17    . hdftor8 -- extracts 8-bit raster images and palettes from an
18                 hdf file
19
20    . hdfed -- hdf file editor
21
22    . hdfunpac - unpacks an HDF file by exporting the scientific
23                 data elements (DFTAG_SD) to external object
24                 elements.  This is a utility for external file
25                 handling for the parallel I/O interface on the CM5.
26
27    . paltohdf -- converts a raw palette to hdf
28
29    . r8tohdf -- converts 8-bit raster images to hdf
30
31    . ristosds -- converts a series of raster image hdf files into a
32                  single 3D sds hdf file.
33
34    . vmake -- creates vsets
35
36    . vshow -- dumps out vsets in an hdf file
37
38    . jpeg2hdf -- converts jpeg images to hdf raster images
39
40    . hdf2jpeg -- converts hdf raster images to jpeg images
41
42    . fp2hdf -- converts 2D and 3D floating point data sets into HDF SDS.
43
44
45
46

README.TST

1All the input data files needed to test the utilities
2are in the subdirectory testfiles/.
3
4
5Instructions on testing the HDF utility programs:
6
7
8hdf24to8 -- converts 24-bit raster images to hdf 8-bit images
9
10   Copy head.r24.Z from the testfiles/ directory to the util/ directory.
11
12   Type: uncompress head.r24.Z
13
14   Execute the following in the util/ directory:
15
16        cp testfiles/head.r24.Z .
17        uncompress head.r24.Z
18        ./hdf24to8 head.r24 head8.hdf
19
20   View head8.hdf using any visualization tool available (mosaic, collage, etc).
21
22   Delete head.r24 and head8.hdf when you are done.
23
24        rm head.r24 head8.hdf
25
26
27hdfed -- hdf file editor
28
29   Copy the file storm110.hdf from the testfiles/ directory to the
30   util/ directory.
31
32   Execute the following in the util/ directory:
33
34        cp testfiles/storm110.hdf .
35        ./hdfed storm110.hdf
36
37        Running interactively, type the following commands:
38
39                info -all
40                prev tag = 300
41                info -long
42                dump -short
43
44        The latter two commands should result in the following responses:
45
46         (6)    Image Dimensions              : (Tag 300)
47                Ref: 110, Offset: 3459, Length: 20 (bytes)
48       0:          0         57          0         57        106        110
49      12:          1          0          0          0
50
51
52        Type help and experiment.  Most of the information can be verified
53        with hdfls.  Be sure to type 'close' then 'quit' when you are finished
54        and delete storm110.hdf when you are done.
55
56            rm storm110.hdf
57
58        Copy ntcheck.hdf from the testfiles/ directory to the util/ directory.
59
60        Execute the following in the util/ directory:
61
62            cp testfiles/ntcheck.hdf .
63            ./hdfed ntcheck.hdf
64
65        ntcheck.hdf will be used as an input file to test the dump function.
66
67        The command:
68
69          dump -help
70
71        displays the list of formats supported by hdfed.
72
73        Commands:
74
75          prev tag=<tag>  ref=<ref>
76
77        and
78
79          next tag=<rag> ref=<ref>
80
81        move you back and forth among the objects.
82
83          info -all
84
85        gives the tag and reference numbers for each object.
86
87
88        Look at the data in various objects and verify the data type.
89        For example:
90
91          next tag = 702  ref = 2
92
93          You will be past this data object and will receive the message
94          "Reached end of file. Not moved."  Repeat the command using prev
95          instead of next.
96
97          dump -float
98
99          The first 5 lines of output should read as follows:
100
101             0:    0.000000e+00   1.000000e+00   2.000000e+00   3.000000e+00
102            16:    4.000000e+00   5.000000e+00   6.000000e+00   7.000000e+00
103            32:    8.000000e+00   9.000000e+00   4.000000e+01   4.100000e+01
104            48:    4.200000e+01   4.300000e+01   4.400000e+01   4.500000e+01
105            64:    4.600000e+01   4.700000e+01   4.800000e+01   4.900000e+01
106
107
108	      next tag = 702  ref = 6
109
110          dump -short
111
112          The first 5 lines of output should read as follows:
113
114           0:          0          1          2          3          4          5
115          12:          6          7          8          9       6000       6001
116          24:       6002       6003       6004       6005       6006       6007
117          36:       6008       6009      12000      12001      12002      12003
118          48:      12004      12005      12006      12007      12008      12009
119
120
121        The following is a cross reference of ref number and data type if you
122        want to experiment:
123
124
125         ref		number type
126
127
128	  2		DFNT_FLOAT32
129
130  	  3		DFNT_INT8
131
132	  4		DFNT_UINT8
133
134	  5		DFNT_INT16
135
136	  6		DFNT_UINT16
137
138	  7		DFNT_INT32
139
140	  8		DFNT_UINT32
141
142        Type 'close' and 'quit' when you are finished.
143        Delete ntcheck.hdf.
144
145            rm ntcheck.hdf
146
147ristosds -- converts a series raster image hdf files into a
148                  single 3D sds hdf file.
149
150   Copy the three HDF files storm110.hdf, storm120.hdf, and
151   storm130.hdf from the testfiles/ directory.
152
153   Execute the following in the util/ directory:
154
155    cp testfiles/storm110.hdf testfiles/storm120.hdf testfiles/storm130.hdf .
156    ./ristosds storm*.hdf -o storm.hdf
157
158   Compare storm110.hdf with storm.hdf using the following commands:
159
160        hdfed storm.hdf
161        prev tag = 702
162	info -long
163    (*)	dump -length 20 -byte
164	close
165	open storm110.hdf
166	prev tag = 302
167        info -long
168   (**)	dump -length 20 -byte
169   	close
170        quit
171
172   * In storm.hdf tag 702's element should be 9747 bytes.
173
174  ** In storm110.hdf tag 302's element should be 1/3 of
175     9747, which is 3249.  (It is a 57x57 image.)
176
177     Compare the first few numbers in storm110's image
178     with the first few numbers in storm.hdf's SDS.
179     They should be the same.
180
181     Remove storm*.hdf from the util/ directory before continuing.
182
183         rm storm*.hdf
184
185hdfpack --  compacts an hdf file
186
187   Copy the file test.hdf from the testfiles/ directory.
188
189   Execute the following in the util/ directory:
190
191        cp testfiles/test.hdf .
192        ./hdfpack test.hdf test.pck
193        ./hdfpack -b test.hdf test.blk
194
195   Use hdfls to get a listing of test.hdf and test.pck.  The only
196   difference between the 2 listings should be that test.pck
197   shouldn't have any special elements and it also shouldn't
198   have any "Linked Block Indicators."
199
200          ./hdfls test.hdf
201          ./hdfls test.pck
202
203   The file sizes should be as follows:
204
205       test.hdf - 11795
206       test.pck - 6747
207       test.blk - 7599
208
209   Depending on the platform, the file sizes may be one byte off
210   for test.pck and test.blk.
211
212   Remove test.cdf, test.blk, and test.pck.
213
214       rm test.hdf test.blk test.pck
215
216hdftopal/paltohdf  -- converts between a raw palette and an hdf
217
218   Copy the file palette.raw from the testfiles/ directory.
219
220   Execute the following in the util/ directory:
221
222        cp testfiles/palette.raw .
223        ./paltohdf palette.raw palette.hdf
224        ./hdftopal palette.hdf palette.raw.new
225
226   Use hdfls with the '-l' option to examine palette.hdf.
227   It should have an 'Image Palette-8' and an 'Image Palette,'
228   both with length 768 bytes.  They should also have the same
229   reference number.
230
231   Use the Unix utility 'cmp' or something similar to do a byte-for-byte
232   comparison of palette.raw and palette.raw.new.  They should be
233   identical.
234
235      cmp palette.raw palette.raw.new
236
237   Remove palette.*.
238
239      rm palette.*
240
241
242r8tohdf/hdftor8 -- converts between 8-bit raster images and hdf files
243
244   Copy the files storm*.raw and palette.raw from the testfiles/ directory.
245
246   Execute the following in the util/ directory:
247
248        cp testfiles/storm*.raw .
249        ./r8tohdf 57 57 storm.hdf storm*.raw
250        ./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
251        ./hdftor8 storm.hdf
252
253   Use hdfls with the '-l' option to examine storm.hdf.  It should
254   contain five raster image sets, one of which will be compressed
255   under IMCOMP compression.  (If you do not put the '-p' in the
256   second r8tohdf command above, you should get an error message.)
257   The non-compressed raster images should be the same length as
258   the raw raster files.  The compressed will be about 25% of that
259   size.
260
261   Use the Unix utility 'cmp' or something similar to do byte-for-byte
262   comparisons on the raw raster files produced by hdftor8:
263
264         cmp img001-057.057  storm110.raw
265         cmp img002-057.057  storm120.raw
266         cmp img003-057.057  storm130.raw
267         cmp img004-057.057  storm140.raw
268
269   There should be one more img* file than you had at the start.  One of the
270   img files may not compare exactly with any one of the raw rasters, and the
271   rest will compare with one of the other raw rasters.  There is no guarantee
272   about the order of the produced raw rasters, but it is likely they will be
273   produced in the order in which they went into the file, which would be
274   increasing numerical order, with the compressed image last.
275
276   Remove storm* and img* when you are done.
277
278         rm storm* img*
279
280hdfcomp -- re-compress 8-bit raster hdf file
281
282   Copy the files storm*.hdf from the testfiles/ directory.
283
284   Execute:
285
286        cp testfiles/storm*.hdf .
287        ./hdfcomp allstorms.hdf storm*.hdf
288        ./hdfcomp allcomp.hdf -c storm*.hdf
289
290   Use hdfls with the '-l' option to examine the two HDF files.  The first,
291   allstorms.hdf, should simply hold the raster together in one file,
292   with no compression.  You can use hdfls to check the original files.
293   The second file, allcomp.hdf, should hold all the rasters in a
294   compress format.  Run-Length Encoding (RLE) compression will result
295   in modest savings - about 10% to 15% for these files.
296
297   Remove allstorms.hdf and allcomp.hdf.
298
299        rm storm*.hdf all*.hdf
300
301jpeg2hdf/hdf2jpeg
302
303   Copy the file jpeg_img.jpg from the testfiles/ directory.
304
305   Execute:
306
307        cp testfiles/jpeg_img.jpg .
308        ./jpeg2hdf jpeg_img.jpg jpeg.hdf
309        ./hdf2jpeg jpeg.hdf jpeg2.jpg
310
311   Use hdfls with the '-l' option to examine the HDF file.  It should
312   contain one raster image set, which will be compressed with JPEG
313   compression.  The JPEG compressed image will be 2922 bytes in size.
314
315   Use the Unix utility 'cmp' or something similar to do byte-for-byte
316   comparisons on the produced raw raster files by hdf2jpeg.  The
317   initial jpeg_img.jpg file should be an exact match for the new
318   jpeg2.jpg file.
319
320        cmp jpeg_img.jpg jpeg2.jpg
321
322   Remove jpeg.hdf, jpeg_img.jpg, and jpeg2.jpg.
323
324        rm jpeg.hdf jpeg_img.jpg jpeg2.jpg
325
326fp2hdf -- converts floating point 2D/3D datasets into hdf SDS or RIS.
327
328   To test this utility you must first create the ASCII and binary test
329   files with the fptest program.  Then run fp2hdf on the test files that
330   get created, and analyze the output.  Following are the steps to
331   do this:
332
333   1. Run fptest to create 2D/3D ASCII/binary test files:
334
335        ./fptest
336
337                   FILE    TYPE    DIMENSIONS
338                   ----    ----    ----------
339                   ctxtr2  TEXT    3x4
340                   ctxtr3  TEXT    5x3x4
341                   cb32r2  FP32    3x4
342                   cb32r3  FP32    5x3x4
343                   cb64r2  FP64    3x4
344                   cb64r3  FP64    5x3x4
345
346     Following are the values of the dimension scales and arrays that
347     get created:
348
349     row scale values start at 11 and increment by 1 => 11, 12, 13
350     column scale values start at 21 and increment by 2 => 21, 23, 25, 27
351     plane scale values start at 51 and increment by 5 => 51, 56, 61, 66, 71
352
353     data element value = row scale value + column scale value [+ plane
354                          scale value, if rank=3]
355
356     For an array of [3][4], data values are:
357
358      3.200000E+01  3.400000E+01  3.600000E+01  3.800000E+01
359      3.300000E+01  3.500000E+01  3.700000E+01  3.900000E+01
360      3.400000E+01  3.600000E+01  3.800000E+01  4.000000E+01
361
362     For array of [5][3][4], data values are:
363
364      8.300000E+01  8.500000E+01  8.700000E+01  8.900000E+01
365      8.400000E+01  8.600000E+01  8.800000E+01  9.000000E+01
366      8.500000E+01  8.700000E+01  8.900000E+01  9.100000E+01
367
368      8.800000E+01  9.000000E+01  9.200000E+01  9.400000E+01
369      8.900000E+01  9.100000E+01  9.300000E+01  9.500000E+01
370      9.000000E+01  9.200000E+01  9.400000E+01  9.600000E+01
371
372      9.300000E+01  9.500000E+01  9.700000E+01  9.900000E+01
373      9.400000E+01  9.600000E+01  9.800000E+01  1.000000E+02
374      9.500000E+01  9.700000E+01  9.900000E+01  1.010000E+02
375
376      9.800000E+01  1.000000E+02  1.020000E+02  1.040000E+02
377      9.900000E+01  1.010000E+02  1.030000E+02  1.050000E+02
378      1.000000E+02  1.020000E+02  1.040000E+02  1.060000E+02
379
380      1.030000E+02  1.050000E+02  1.070000E+02  1.090000E+02
381      1.040000E+02  1.060000E+02  1.080000E+02  1.100000E+02
382      1.050000E+02  1.070000E+02  1.090000E+02  1.110000E+02
383
384   2. Run fp2hdf on the test files that were created:
385
386      ./fp2hdf ctxtr2 -o ctxtr2.hdf
387      ./fp2hdf ctxtr3 -o ctxtr3.hdf
388      ./fp2hdf cb32r2 -o cb32r2.hdf
389      ./fp2hdf cb32r3 -o cb32r3.hdf
390      ./fp2hdf cb64r2 -o cb64r2.hdf
391      ./fp2hdf cb64r3 -o cb64r3.hdf
392      ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
393      ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
394
395   3. Use hdfls and hdfed to verify the correctness of the output
396      *.hdf files.  The rank, dimension size, number type,
397      dimension scale and data values should agree with those
398      listed in item 1 above.
399
400      You can also use the hdp command.  To use hdp from the
401      util/ directory, type:
402
403       For an SDS:
404
405        ../../mfhdf/dumper/hdp dumpsds <hdf filename>
406
407       For a raster image:
408
409        ../../mfhdf/dumper/hdp dumprig <hdf filename>
410
411      Collage can also be used to display the *.hdf files.
412      Display the spreadsheet and compare the values to those
413      in Item 1.  For the Raster Images, display the image;
414      the values are interpolated, and will not match the
415      values as show in Item 1.
416
417        ctxtr2.hdf -- 2D SDS, display spreadsheet
418        ctxtr3.hdf -- 3D SDS, display spreadsheet along z axis.
419        cb32r2.hdf -- 2D SDS, display spreadsheet
420        cb32r3.hdf -- 3D SDS, display spreadsheet along z axis
421        cb64r2.hdf -- 2D SDS, display spreadsheet
422        cb64r3.hdf -- 3D SDS, display spreadsheet along z axis
423        ctxtr2_ris.hdf -- RIS, display image
424        cb64r2_ris.hdf -- 2D SDS, display spreadsheet
425                          RIS, display image
426
427   4. Remove ctxtr* and cb*.
428
429       rm ctxtr* cb* *.hdf
430
431
432
433
434
435
436
437

README.fp2hdf

1
2This revision of fptohdf, which we are calling fp2hdf,  supports native
3mode floating point (both single and double precision), and 3D floating
4point data sets.
5
6For these additions we owe our thanks to Bob Weaver and colleagues
7at INEL.
8
9You should be able to compile fp2hdf, as well as the two programs
10for generating test data, by executing "make".  Note: you will
11need to change some of the definitions in the makefile to conform
12to your system.
13
14Except for Makefile, fp2hdf.c, and this README file, all of the
15files in this directory are for testing fp2hdf and illustrating
16its use.
17
18Mike Folk
19
20

README.fp2hdf.test

1
2
3
4There are two sets of input files for testing fp2hdf.  These files
5are used by the script fp2hdf.test.
6
7I. The first set consists of 2-D data sets that produce images that are
8cross-hatched with 10 vertical and 10 horizontal lines.  These files
9use the following naming conventions:
10
11   't' prefix means it's a text file
12   'h' prefix means it's an hdf file
13   'h' at the end means horizontal scale is not uniform
14   'v' at the end means vertical scale is not uniform
15   'n' at the end means no scales are stored in the file
16   dimensions are given between  prefix and postfix
17
18The names of the files: (which are stored in the testfiles/fp2hdf directory)
19                    t100x100
20                    h100x100
21                    h100x100h
22                    h100x100hv
23                    h60x75
24                    h60x75v
25                    h60x75n
26
27II. The second set are generated by the programs ftest.c and ftest.F.
28They are small files with 2-D and 3-D data sets that are easily
29examined by eye.  Those that begin with the letter 'c' are
30produced with the program ftest.c, and those that begin with 'f'
31were produced with ftest.F.
32
33                   ctxtr2, type 'TEXT', size 3x4
34                   ctxtr3, type 'TEXT', size 3x4x5
35                   cb32r2, type 'FP32', size 3x4
36                   cb32r3, type 'FP32', size 3x4x5
37                   cb64r2, type 'FP64', size 3x4
38                   cb64r3, type 'FP64', size 3x4x5
39
40                   ftxtr2, type 'TEXT', size 3x4
41                   ftxtr3, type 'TEXT', size 3x4x5
42                   fb32r2, type 'FP32', size 3x4
43                   fb32r3, type 'FP32', size 3x4x5
44                   fb64r2, type 'FP64', size 3x4
45                   fb64r3, type 'FP64', size 3x4x5
46
47Contents of the arrays:
48
49  row    values start at 11 and increment by 1 => 11, 12, 13
50  column values start at 21 and increment by 2 => 21, 23, 25, 27
51  plane  values start at 51 and increment by 5 => 51, 56, 61, 66, 71
52
53  data element value = row value + column value [+ plane value, if rank=3]
54
55
56Output files can be examined with hdfls to see if basic
57contents are there.  Those with raster images can be displayed
58using NCSA Image, DataScope, etc.  Those with floating point
59data can be examined using hdfed or DataScope.
60
61
62
63
64