1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311
|
This file was created for the HDF4.2r0. release to store the documents
that were in the release_notes directory of the main HDF4 source tree
since the 4.0.alpha release. See also HISTORY.txt file for more information.
File contains the following *.txt files:
Fortran_APIs.txt
JPEG.txt
Pablo.txt
comp_SDS.txt
compile.txt
compression.txt
dimval.txt
external_path.txt
hdp.txt
install_winNT.txt
macintosh.txt
mf_anno.txt
mf_ris.txt
new_functions.txt
page_buf.txt
sd_chunk_examples.txt
vattr.txt
windows.txt
To search for a particular document use "filename.txt=" string, for example
to search for the beginning of the new_functions.txt file,
use "new_functions.txt=" string
================================Fortran_APIs.txt============================
Problem:
========
In HDF4.0r1 and previous versions of HDF several Fortran
routines declared a formal parameter as character*(*) or
integer while the actual parameter was a character or
a numeric type. This caused problems on some systems,
such as VMS and T3D.
With HDF 4.0r2 and later releases, these routines have either
been replaced by 2 routines, one for character type parameters
and another for numeric type parameters; or, a new routine has
been added for char type parameters and the old routine is used
for numeric type parameters only. Those routines that were replaced
by two routines should be phased out in the future. However, in
order to not break currently working applications they are
still supported. New applications should use the new routines.
Routines and parameters affected:
================================
1. Write vdata
Old:
vsfwrit(vsid, databuf, n_rec, interlace)
character*(*) databuf
HDF4.0r2:
Write to a vdata from a character buffer:
vsfwrtc(vsid, cbuf, n_rec, interlace)
character*(*) cbuf
Write to a vdata from an integer buffer (for numeric values):
vsfwrt(vsid, buf, n_rec, interlace)
integer buf
2. Read vdata
Old:
vsfread(vsid, buf, n_recs, interlace)
character*(*) buf
HDF4.0r2:
Read records into a character buffer:
vsfrdc(vsid, cbuf, n_recs, interlace)
character*(*) cbuf
Read records into an integer buffer (for numeric values):
vsfrd(vsid, buf, n_recs, interlace)
integer buf
3. High level function for creating a single field single
component vdata
Old:
vhfsd(f, field, buf, n, dtype, vsname, vsclass)
integer buf
HDF4.0r2:
Store a simple character dataset in a vdata:
vhfscd(f,field,cbuf,n,dtype,vsname,vsclass)
character*(*) cbuf
Store a simple numeric dataset in a vdata
vhfsd(f, field, buf, n, dtype, vsname, vsclass)
integer buf
4. High level function for creating a single field multi-
component vdata
Old:
vhfsdm (f,field,buf,n,dtype,vsname,vsclass,order)
integer buf
HDF4.0r2:
Store an aggregate char dataset in a vadata:
vhfscdm (f,field,cbuf,n,dtype,vsname,vsclass,order)
character*(*) cbuf
Store a simple numeric dataset in a vdata
vhfsdm(f,field,buf,n,dtype,vsname,vsclass,order)
integer buf
5. Write GR image
Old:
mgwrimg(riid, start,stride,count,data)
<valid numeric type> data
HDF4.0r2:
Write character type image data
mgwcimg(riid, start, stride, count, cdata)
character*(*) cdata
Write numeric type image data
mgwrimg(riid, start,stride,count,data)
<valid numeric type> data
6. Read GR image
Old:
mgrdimg(riid,start,stride,count,data)
integer data
HDF4.0r2:
Read character type image data
mgrcimg(riid,start,stride,count,cdata)
character*(*) cdata
Read numeric type image data
mgrdimg(riid,start,stride,count,data)
<valid numeric type> data
7. Write LUT
Old:
mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
<valid numeric type> data
HDF4.0r2:
Write character type palette:
mgwclut(lutid,ncomp,data_type,interlace,nentries,cdata)
character*(*) cdata
Write numeric type palette:
mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
<valid numeric type> data
8. Read LUT
Old:
mgrdlut(lutid, data)
<valid numeric type> data
HDF4.0r2:
Read char type palette:
mgrclut(lutid,cdata)
character*(*) cdata
Read numeric type palette:
mgrdlut(lutid, data)
<valid numeric type> data
9. Set GR attribute
Old:
mgsattr(riid, name, nt, count, data)
character*(*) data
HDF4.0r2:
Add char type attribute to a raster image
mgscatt(riid, name, nt, count, cdata)
character*(*) cdata
Add a numeric attribute to a raster image
mgsnatt(riid, name, nt, count, data)
integer data
10. Get GR attribute
Old:
mggattr(riid, index, data)
<valid numeric type> data
HDF4.0r2:
Get a char type attribute:
mggcatt(riid, index, cdata)
character*(*) cdata
Get a numeric type attribute:
mggnatt(riid, index, data)
integer data
11. Write SDS data
Old:
sfwdata(sdsid,start,stride,end,values)
<valid numeric type> values
HDF4.0r2
Write char type SDS data
sfwcdata(sdsid,start,stride,end,cvalues)
character*(*) cvalues
Write numeric type SDS data
sfwdata(sdsid,start,stride,end,values)
<valid numeric type> values
12. Read SDS data
Old:
sfrdata(sdsid,start,stride,end,values)
<valid numeric type> values
HDF4.0r2
Read char type SDS data
sfrcdata(sdsid,start,stride,end,cvalues)
character*(*) cvalues
Read numeric type SDS data
sfrdata(sdsid,start,stride,end,values)
<valid numeric type> values
13. Add an attribute to an object in SD interface
Old:
sfsattr(id, name, nt, count, data)
character*(*) data
HDF4.0r2
Add a char type attribute to an object
sfscatt(id, name, nt, count, cdata)
character*(*) cdata
Add a numeric type attribute to an object
sfsnatt(id, name,nt, count,data)
integer data
14. Get contents of an attribute
Old:
sfrattr(id, index, buf)
<valid numeric type> buf
HDF4.0r2:
Get a char type attribute
sfrcatt(id, index, cbuf)
character*(*) cbuf
Get a numeric type attribute
sfrnatt(id, index, buf)
<valid numeric type> buf
15. Set fill value
Old:
sfsfill(id, val)
<valid numeric type> val
HDF4.0r2
Set a char type fill value
sfscfill(id, cval)
character cval
Set a numeric type fill value
sfsfill(id, val)
<valid numeric type> val
16. Get fill value
Old:
sfgfill(id, val)
<valid numeric type> val
HDF4.0r2
Get char type fill value
sfgcfill(id, cval)
character cval
Get numeric type fill value
sfgfill(id, val)
<valid numeric type> val
============================================================================
================================JPEG.txt====================================
Independent JPEG Group library
Version 4.1b of the HDF-netCDF library uses v6a of the Independent
JPEG Group (IJG) JPEG file access library. For most users of the HDF library,
this will be completely transparent. For users who are integrating the HDF
library into an existing application which uses the IJG's JPEG library, linking
with the HDF library is now much simpler and should be completely painless.
The JPEG library will need to be linked with user's applications when raster
images are being used (whether they are compressed with JPEG or not).
cc -o <myprog> myprog.c -I<include path> <path for libmfhdf.a> \
<path for libdf.a> <path for libjpeg.a>
Note: order of the libraries is important, the mfhdf library must be first
and be followed by the hdf library.
============================================================================
================================Pablo.txt===================================
Pablo Instrumentation of HDF
===========================
This version of the distribution has support to create an instrumented
version of the HDF library(libdf-inst.a). This library along with
the Pablo performance data capture libraries can be used to gather data
about I/O behavior and procedure execution times.
More detailed documentation on how to use the instrumented version of
the HDF library with Pablo can be found in the Pablo directory
'$(toplevel)/hdf/pablo'.
See the provided '$(toplevel)/hdf/pablo/README.Pablo'
and the Postscript file '$(toplevel)/hdf/pablo/Pablo.ps'.
At this time only an instrumented version of the core HDF library libdf.a
can be created. Future versions will have support for the SDxx interface
found in libmfhdf.a. Current interfaces supported are ANxx, GRxx, DFSDxx,
DFANxx, DFPxx, DFR8xx, DF24xx, Hxx, Vxx, and VSxx.
To enable the creation of an instrumented library the following section
in the makefile fragment($(toplevel)/config/mh-<os>) must be uncommented
and set.
# ------------ Macros for Pablo Instrumentation --------------------
# Uncomment the following lines to create a Pablo Instrumentation
# version of the HDF core library called 'libdf-inst.a'
# See the documentation in the directory 'hdf/pablo' for further
# information about Pablo and what platforms it is supported on
# before enabling.
# You need to set 'PABLO_INCLUDE' to the Pablo distribution
# include directory to get the files 'IOTrace.h' and 'IOTrace_SD.h'.
#PABLO_FLAGS = -DHAVE_PABLO
#PABLO_INCLUDE = -I/hdf2/Pablo/Instrument.HP/include
After setting these values you must re-run the top-level 'configure' script.
Make sure that your start from a clean re-build(i.e. 'make clean') after
re-running the toplevel 'configure' script and then run 'make'.
Details on running configure can be found in the section
'General Configuration/Installation - Unix' found in the top-level
installation file '$(toplevel)/INSTALL'.
============================================================================
================================comp_SDS.txt================================
Limitations of compressed SDS datasets
Due to certain limitations in the way compressed datasets are stored, data
which has been compressed is not completely writable in ways that uncompressed
datasets are. The "rules" for writing to a compressed dataset are as follows:
(1) Write an entire dataset that is to be compressed. I.e. build the
dataset entirely in memory, then write it out with a single call.
(2) Append to a compressed dataset. I.e. write to a compressed dataset
that has already been written out by adding to the unlimited
dimension for that dataset.
(3) For users of HDF 4.1, write to any subset of a compressed dataset
that is also chunked.
Generally speaking, these mean that it is impossible to overwrite existing
compressed data which is not stored in "chunked" form. This is due to
compression algorithms not being suitable for "local" modifications in a
compressed datastream. Please send questions about compression to the
general HDF support e-mail address: help@hdfgroup.org
Compression for HDF SDS
The SDsetcompress and SDsetnbitdataset functions are used as
higher-level routines to access the HCcreate function (HCcreate is described
in the reference manual). SDsetnbitdataset allows for the storage of 1-32 bit
integer values (instead of being restricted to 8, 16 or 32-bit sizes) in a
scientific dataset. SDsetcompress can be used to compress a scientific dataset
through the SD interface instead of dropping down to the lower-level H
interface.
N-bit SDS using SDsetnbitdataset:
The interface to SDsetnbitdataset is described below:
intn SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one);
int32 sds_id - The id of a scientific dataset returned from SDcreate or
SDselect.
intn start_bit - This value determines the bit position of the highest end
of the n-bit data to write out. Bits in all number-types are counted
from the right starting with 0. For example, in the following bit data,
"01111011", bits 2 and 7 are set to 0 and all the other bits are set to
one.
intn bit_len - The number of bits in the n-bit data to write, including the
starting bit, counting towards the right (i.e. lower bit numbers). For
example, starting at bit 5 and writing 4 bits from the following bit
data, "01111011", would write out the bit data, "1110", to the dataset
on disk.
intn sign_ext - Whether to use the top bit of the n-bit data to sign-extend
to the highest bit in the memory representation of the data. For
example, if 9-bit signed integer data is being extracted from bits
17-25 (nt=DFNT_INT32, start_bit=25, bit_len=9, see below for full
information about start_bit & bit_len parameters) and the bit in
position 25 is a 1, then when the data is read back in from the disk,
bits 26-31 will be set to a 1, otherwise bit 25 will be a zero and bits
26-31 will be set to 0. This bit-filling takes higher precedence (i.e.
is performed after) the fill_one (see below) bit-filling.
intn fill_one - Whether to fill the "background" bits with 1's or 0's.
The "background" bits of a n-bit dataset are those bits in the
in-memory representation which fall outside of the actual n-bit field
stored on disk. For example, if 5 bits of an unsigned 16-bit integer
(in-memory) dataset located in bits 5-9 are written to disk with the
fill_one parameter set to TRUE (or 1), then when the data is read back
into memory at a future time, bits 0-4 and 10-15 would be set to 1. If
the same 5-bit data was written with a fill_one value of FALSE (or 0),
then bits 0-4 and 10-15 would be set to 0. This setting has a lower
precedence (i.e. is performed first) than the sign_ext setting. For
example, using the sign_ext example above, bits 0-16 and 26-31 will
first be set to either 1 or 0 based on the fill_one parameter, and then
bits 26-31 will be set to 1 or 0 based on bit-25's value.
RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
The corresponding FORTRAN function name is sfsnbit which takes the
same parameters in the same order.
For example, to store an unsigned 12-bit integer (which is represented
unpacked in memory as an unsigned 16-bit integer), with no sign extension
or bit filling and which starts at bit 14 (counting from the right with bit
zero being the lowest) the following setup & call would be appropriate:
intn sign_ext = FALSE;
intn fill_one = FALSE;
intn start_bit= 14;
intn bit_len = 12;
SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one);
Further reads and writes to this dataset would transparently convert the
16-bit unsigned integers from memory into 12-bit unsigned integers stored
on disk.
More details about this function can be found in the HDF library reference
manual.
Compressed SDS data using SDsetcompress:
The SDsetcompress function call contains a subset of the parameters to
the HCcreate function call described in compression.txt and performs the same
types of compression.
The interface to SDsetcompress is described below:
intn SDsetcompress(sds_id,comp_type,c_info);
int32 sds_id - The id of a scientific dataset returned from SDcreate or
SDselect.
int32 comp_type - The type of compression to encode the dataset with.
The values are the same as for HCcreate:
COMP_CODE_NONE - for no compression
COMP_CODE_RLE - for RLE encoding
COMP_CODE_SKPHUFF - for adaptive Huffman
COMP_CODE_DEFLATE - for gzip 'deflation'
comp_info *c_info - Information needed for the encoding type chosen.
For COMP_CODE_NONE and COMP_CODE_RLE, this is unused and can be set to
NULL. For COMP_CODE_SKPHUFF, the structure skphuff in this union needs
information about the size of the data elements in bytes (see example
below). For COMP_CODE_DEFLATE, the structure deflate in this union
need information about "effort" to try to compress with (see example
below). For more information about the types of compression
see the compression.txt document in this directory.
RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
Similarly to the HCcreate function, SDsetcompress can be used to create
compressed dataset or to compress existing ones.
For example, to compress unsigned 16-bit integer data using the adaptive
Huffman algorithm, the following setup and call would be used:
comp_info c_info;
c_info.skphuff.skp_size=sizeof(uint16);
SDsetcompress(sds_id,COMP_CODE_SKPHUFF,&c_info);
Further reads and writes to this dataset would transparently convert the
16-bit unsigned integers from memory into a compressed representation on
disk.
For example, to compress a dataset using the gzip deflation algorithm, with
the maximum effort to compress the data, the following setup and call would
be used:
comp_info c_info;
c_info.deflate.level=9;
SDsetcompress(sds_id,COMP_CODE_DEFLATE,&c_info);
Currently, SDsetcompress is limited to creating new datasets or appending
new slices/slabs onto existing datasets. Overwriting existing data in a
dataset will be supported at some point in the future.
More details about this function can be found in the HDF library reference
manual.
============================================================================
================================compile.txt=================================
COMPILING A PROGRAM
Following are instructions for compiling an application program on the
platforms supported by HDF, using the binaries that we provide. For
Unix, the information on options to specify comes from the configuration
files (mh-*) in the HDF source code (under ../HDF4.1r5/config).
In general, you compile your program as shown below. If your platform is
not specified in the section, "INSTRUCTIONS FOR SPECIFIC PLATFORMS", then
use these instructions. If you are unable to compile your program on Unix,
please check the configuration file for your platform for the correct
options.
C:
cc -o <your program> <your program>.c -I<path for hdf include directory>\
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
or
cc -o <your program> <your program>.c -I<path for hdf include directory> \
<path for libmfhdf.a> <path for libdf.a> \
<path for libjpeg.a> <path for libz.a>
FORTRAN:
f77 -o <your program> <your program>.f \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
or
f77 -o <your program> <your program>.f \
<path for libmfhdf.a> <path for libdf.a> \
<path for libjpeg.a> <path for libz.a>
NOTE: The order of the libraries is important: libmfhdf.a first,
followed by libdf.a, then libjpeg.a and libz.a. The libjpeg.a
library is optional.
INSTRUCTIONS FOR SPECIFIC PLATFORMS
===================================
FreeBSD:
-------
C:
cc -ansi -Wall -pedantic -o <your program> <your program>.c \
-I<path for hdf include directory> \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
FORTRAN:
f77 -O -o <your program> <your program>.f \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
Linux:
-----
C:
gcc -ansi -D_BSD_SOURCE -o <your program> <your program>.c \
-I<path for hdf include directory> \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
FORTRAN:
g77 -o <your program> <your program>.f \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
Solaris:
-------
The -lnsl is necessary in order to include the xdr library.
C:
cc -Xc -xO2 -o <your program> <your program>.c \
-I<path for hdf include directory>\
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-L/usr/lib -lnsl
FORTRAN:
f77 -O -o <your program> <your program>.f \
-L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-L/usr/lib -lnsl
Windows NT/98/2000:
------------------
Using Microsoft Visual C++ version 6.x:
Under Tools->Options, select the folder, Directories:
Under "Show directories for", select "Include files".
Add the following directories:
C:<path to HDF includes>\INCLUDE
Under "Show directories for", select "Library files":
Add the following directories:
C:<path to HDF libs>\LIB
Under Project->Settings, select folder, Link:
Add the following libraries to the beginning of the list of
Object/Library Modules:
hd415.lib hm415.lib (single-threaded release version)
hd415d.lib hm415d.lib (single-threaded debug version)
hd415m.lib hm415m.lib (multi-threaded release version)
hd415md.lib hm415md.lib (multi-threaded debug version)
============================================================================
================================compression.txt=============================
Compression Algorithms and interface
The low-level compression interface allows any data object to be
compressed using a variety of algorithms. This is completely transparent
to users once the data has been compressed initially - further data written
to an object or read from it are compressed or decompressed internally to
the library, without user intervention. (For information on compressing
SDS datasets, see the ../release_notes/comp_SDS.txt file.)
Currently only three compression algorithms are supported: Run-Length Encoding
(RLE), adaptive Huffman, and an LZ-77 dictionary coder (the gzip 'deflation'
algorithm). Plans for future algorithms include an Lempel/Ziv-78 dictionary
coding, an arithmetic coder and a faster Huffman algorithm.
The public interface for this routine is contained in the user-level
function call, HCcreate. The interface to HCcreate is described below:
int32 HCcreate(id,tag,ref,model_type,m_info,coder_type,c_info);
int32 id; IN: the file id to create the data in (from Hopen)
uint16 tag,ref; IN: the tag/ref pair of the data object which
is to be compressed
comp_model_t model_type; IN: the type of modeling to use, currently
only COMP_MODEL_STDIO is supported, which
indicates data is transferred in the
same way as C I/O functions operate.
model_info *m_info; IN: Information needed for the modeling type chosen
Nothing needed for COMP_MODEL_STDIO,
so NULL can be used.
comp_coder_t coder_type; IN: the type of encoding to use from the following:
COMP_CODE_NONE - for no compression
COMP_CODE_RLE - for RLE encoding
COMP_CODE_SKPHUFF - for adaptive Huffman
COMP_CODE_DEFLATE - for gzip 'deflation'
comp_info *c_info; IN: Information needed for the encoding type chosen
For COMP_CODE_NONE and COMP_CODE_RLE,
this is unused and can be set to NULL.
For COMP_CODE_SKPHUFF, the structure skphuff
in this union needs information about the
size of the data elements in bytes (see
examples below).
For COMP_CODE_DEFLATE, the structure deflate
in this union needs information about the
"effort" to encode data with. Higher
values of 'level' member indicate more
compression effort. Values may range from
0 (minimal compression, fastest time) to
9 (maximum compression, slowest time).
RETURNS
Return an AID to the newly created compressed element, FAIL on error.
HCcreate will compress an existing data object with the specified
compression method, or it can create a new data object which will contain
compressed data when it is written to. In either case, Hendaccess must be
called to release the AID allocated by HCcreate. In the first two examples
below the datasets already exist, in the final example the dataset is created
by the HCcreate call. There is currently no FORTRAN equivalent for this
function. More details about this function can be found in the HDF reference
manual.
The following example shows how to compress a scientific dataset data object
(which is composed of multi-dimensional 32-bit integer data) using the
adaptive Huffman encoding:
{
int32 aid;
comp_info c_info;
c_info.skphuff.skp_size=sizeof(int32);
aid=HCcreate(file_id, DFTAG_SD, ref, COMP_MODEL_STDIO, NULL,
COMP_CODE_SKPHUFF,&c_info);
.
.
<access data object>
.
.
Hendaccess(aid);
}
The following example shows show to compress a raster image data object
using the RLE algorithm:
{
int32 aid;
aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL,
COMP_CODE_RLE,NULL);
.
.
<access data object>
.
.
Hendaccess(aid);
}
The following example shows how to create a new data object whose data
will compressed as it is written:
{
int32 aid;
aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL,
COMP_CODE_RLE,NULL);
.
.
Hwrite(aid,len,data);
.
.
Hendaccess(aid);
}
============================================================================
================================dimval.txt==================================
New Version of Dimension Values
===============================
HDF4.0b1 and previous releases use a vgroup to represent a dimension.
The vgroup has a single field vdata with class "DimVal0.0".
The vdata has <dimension size> number of records, each record has a
fake value from 0, 1, 2 ... , (<dimension size> - 1 ). The fake values
are not really required and take a lot of space. For applications that
create large one dimensional array datasets the disk space taken by
these fake values almost double the size of the HDF file. In order to
omit the fake values, a new version of dimension vdata has been proposed.
The new version uses the same structure as the old version. The only
differences are that the vdata has only 1 record with value
<dimension size> and that the vdata's class is "DimVal0.1" to
distinguish it from the old version.
However, existing tools and utilities which were compiled with the old
version can't recognize the new dimensions of hdf files created using
HDF4.0b2 or later version. This could cause problems for HDF users.
To solve this problem, we are planning to implement a transitional
policy:
1. Starting from HDF4.0b2 both versions of the dimension will be
created by default. The old tools recognize the "DimVal0.0"
dimension.
2. A new function SDsetdimval_comp (sfsdmvc) is added which can
be called for a specific dimension to suppress the creation
of the "DimVal0.0" vdata for that dimension. Users who store
big 1D arrays should use this function to create "DimVal0.1"
only. See the man page for sdsetdimval_comp.3.
3. A new function SDisdimval_bwcomp (sfisdmvc) is added which
can be called to get the current compatibility mode of a
dimension. See the man page for sdisdimval_bwcomp.3.
4. HDF4.0b2 and later version of HDF libraries can recognize both
old and new versions of dimensions. This means old HDF files can
always be read by new HDF libraries.
5. HDF4.1 will create only "DimVal0.1" by default and function
SDsetdimval_comp should be called if "DimVal0.0" is also desired.
The transition time period is ended.
6. Existing tools and utilities should be re-compiled with HDF4.0b2
or later releases during that transition time period.
7. A new utility will be written to remove redundant "DimVal0.0" from
the files created during the transition time period.
8. A new utility will be written to convert "DimVal0.1" to "DimVal0.0"
for special cases.
Please send bug reports, comments and suggestions to help@hdfgroup.org.
============================================================================
================================external_path.txt===========================
User Settable File Location for External Elements
Users sometimes encounter situations (e.g., disk space shortage,
different filesystem names) that the external file containing the data
of the external element has to reside in a directory different from the
one it was created. The user may set up symbolic pointers to forward
the file locations but this does not work if the external filename is
an absolute path type containing directory components that do not exist
in the local system.
A new feature is added such that an application can provide a list of
directories for the HDF library to search for the external file. This
is set by the function call HXsetdir or via the environment variable
$HDFEXTDIR. See the man page HXsetdir(3) for details.
A similar feature is also added to direct the HDF library to create the
external file of a _new_ external element in the given directory. An
example for the need of this feature is that an application wants to
create multiple external element files with certain naming conventions
(e.g., Data950101, Data950102) while all these files share a common
parent directory (project123/DataVault). Different users will have a
different choice of the common parent directory. This can be set by
the function call HXsetcreatedir or the environment variable
$HDFEXTCREATEDIR. See the man page for HXsetcreatedir (1) for detail.
============================================================================
================================hdp.txt=====================================
hdp -- HDF dumper
NAME
hdp - HDF dumper
SYNOPSIS
hdp [hdp options] hdp command [command options] <filename list>
DESCRIPTION
hdp is a command line utility designed for quick display of
contents and data of HDF3.3 objects. It can list the contents
of hdf files at various levels with different details. It can
also dump the data of one or more specific objects in the file.
HDP OPTIONS
Currently, there is only one option.
-H Display usage information about the specified command.
If no command is specified, -H lists all available commands.
HDP COMMANDS
hdp currently has two types of commands: list and dump. Other
types of commands such as those for editing may be added in the
future.
hdp list <filename list>
lists contents of files in <filename list>
hdp dumpsds <filename list>
displays data of NDGs and SDGs in the listed files.
hdp dumpvd <filename list>
displays data of vdatas in the listed files.
hdp dumpvg <filename list>
displays data of objects in vgroups in the listed files.
hdp dumprig <filename list>
displays data of RIGs in the listed files.
hdp dumpgr <filename list>
displays data of general RIGs in the listed files.
HDP COMMAND OPTIONS
(Note: options preceded by an * have not yet been implemented.)
hdp list [format options] [content ops] [filter ops] [order ops]
<filename list>
--------------------------------------------------------------------------
Format options
decide how the info of objects will be presented on the screen.
-s (short format) under each tag #, all ref's of that tag are listed
in one or more lines, same as the output of hdfls. (default)
-l (long format) one object per line. Each line contains tag-name,
tag/ref and the index of this tag in the file.(e.g., the ith NDG
in the file).
-d debug format, one object per line. Each line contains tag_name,
tag/ref, index, offset, and length, same as the output of hdfls -d.
no tagname tag ref index/tag offset length
-- ------- --- --- --------- ------ ------
1 DFTAG_NT 106 2 1
2 DFTAG_SD 701 3 1
...
Content options
allow contents be displayed.
-n display the name or label of the object, if there is any.
-n puts you in -l format automatically.
-c display the class of the object, if there is any. -l format.
-a display description of the object, if there is any. -l format.
Filter options
select certain type of objects to display, default is all.
-g display groups only. Objects which do not belong to
any group will not be displayed. Nested groups will be
displayed in tree format.
-t <number> display objects with specified tag number . e.g.
720 for NDG.
-t <name> display objects with specified tag name.
Order options
sort the output list in different orders.
-ot by tag # (default)
-of by the order in file DDlist.
-og by group
-on by name(label)
hdp dumpsds [filter ops] [contents ops] [output ops] <filename list>
--------------------------------------------------------------------
Filter options
specify which SDS to dump.
-i <index> dump SDS's with indices specified in <index>;
indices correspond to the order of the SDS in the file
-r <ref> dump SDS's with reference numbers specified in <ref>
-n <name> dump SDS's with names specified in <name>
-a dump all SDS's in the file. (default)
Options -i, -r, and -n can be used inclusively to specify
different SDS's.
Content options
-v display everything including all annotations (default)
-h header only, no annotation for elements or data
-d data only, no tag/ref
These options are exclusive.
Output options
-o <filename> specify <filename> as output file name
-b binary output
-x ascii text output (default)
Options -b and -x are exclusive, but each can be used with
option -o.
Format options
-c print space characters as they are, not \digit
-g do not print data of file (global) attributes
-l do not print data of local attributes
-s do not add carriage return to a long line - dump as a stream
Options in this category can be used inclusively.
Note: Any combination of an option from each of the categories can
be used as long as the criteria of that category are met.
hdp dumpvd [filter ops] [contents ops] [output ops] <filename list>
--------------------------------------------------------------------
Filter options
specify which vdata to dump.
-i <index> dump vdatas with indices in <index>; indices
correspond to the order of the vdatas in the
files
-r <ref> dump vdatas with reference numbers specified in
<ref>
-n <name> dump vdatas with names specified in <name>
-c <class> dump vdatas with classes specified in <class>
-a dump all vdatas in the file. (default)
Content options
-v display everything including all annotations (default)
-h header only, no annotation for elements or data
-d data only, no tag/ref
-f <fields> dump data of specified fields
Output options
-o <fn> specify fn as output file name
* -b binary file
-t text ascii file (default)
hdp dumpvg [filter ops] [contents ops] [output ops] <filename list>
--------------------------------------------------------------------
Filter options
specify which vgroups to dump.
-i <index> dump vgroups with indices specified in <index>;
indices correspond to the order of the vgroups
specified in the files
-r <ref> dump vgroups with reference numbers specified in <ref>
-n <name> dump vgroups with names specified in <name>
-c <class> dump vgroups with classes specified in <class>
-a dump all vgroups in the file. (default)
Content options
-v display everything including all annotations (default)
-h header only, no annotation for elements or data
-d data only
Output options
-o <fn> specify fn as output file name
* -b binary file
-t text ascii file (default)
Note: Unless the "-d" option is specified, a graphical representation of
the file will be given after the data has been displayed.
hdp dumprig [filter ops] [contents ops] [output ops] <filename list>
--------------------------------------------------------------------
Filter options
specify which RIG to dump.
-i <index> dump RIGs with indices specified in <index>;
indices correspond to the order of the RIGs
specified in the files
-r <ref> dump RIGs with reference numbers specified in <ref>
-a dump all RIGs in the file. (default)
-m 8|24 dump the RIGs of 8-bit or 24-bit. By default all
RIGs in the file will be dumped
Content options
-v display everything including all annotations (default)
-h header only, no annotation for elements or data
-d data only
Output options
-o <fn> specify fn as output file name
-b binary file
-t text ascii file (default)
hdp dumpgr [filter ops] [contents ops] [output ops] <filename list>
--------------------------------------------------------------------
Filter options
specify which general RIGs to dump.
-i <index> dump general RIG's with indices specified in
<index>; indices correspond to the order of
the RIG in the file
-r <ref> dump general RIG's with reference numbers
specified in <ref>
-n <name> dump general RIG's with names specified in <name>
-a dump all general RIG's in the file. (default)
Content options
-v display everything including all annotations (default)
-h header only, no annotation for elements or data
-d data only, no tag/ref
Output options
-o <fn> specify fn as output file name
-b binary file
-t ascii text file (default)
Note: any combination of an option from each of the three categories
can be used; but no more than one option from one category is
allowed.
============================================================================
================================install_winNT.txt===========================
Install HDF4.1 Release 2 on Windows NT and Windows 95, and Alpha NT.
Since Windows NT, Windows '95 (Chicago) and Windows 3.1
(with the Win 32s extensions) all are designed to run the same 32-bit code, our
decision is to support only 32-bit libraries and code on the MS-Windows
platform. We are not planning on supporting any 16-bit versions in the
foreseeable future.
The instructions which follow assume that you will be using one of
the 'zip' files that we provide, either the binary code release
(hdf41r2.zip) or the source code release (hdf41r2s.zip).
In building HDF from source code you may select between
two build environment options depending on your
application and environment needs. Each option has it's own zip file:
Option I, (select Win32nof.zip)
Test and Utility configuration : HDF library, tests, and utilities, no fortran,
available for Win32 Intel platform only.
Option II, (select Win32full.zip)
Full configuration : HDF library, tests, and utilities, with fortran
This version has been built and tested using DEC Visual Fortran on both
the Win32 Intel platform and the Win32 Alpha platform.
Building from Binary Code Release (hdf41r2.zip)
===============================================
To install the HDF, JPEG, zlib and mfhdf libraries and utilities,
it is assumed that you have done the following:
1. Create a directory structure to unpack the library. For
example:
c:\ (any drive)
MyHDFstuff\ (any folder name)
2. Copy the binary archive (HDF41r2.zip) to that directory
and unpack it by running WinZip on HDF41r2.zip (the binary archive).
This should create a directory called 'HDF41r2' which
contains the following files and directories.
c:\MyHDFstuff\HDF41r2\lib ( Debug and Release versions of HDF libraries )
c:\MyHDFstuff\HDF41r2\include ( HDF include files )
c:\MyHDFstuff\HDF41r2\bin ( HDF utilities files )
c:\MyHDFstuff\HDF41r2\release_notes ( release notes )
c:\MyHDFstuff\HDF41r2\install_NT_95 ( this file)
3. If you are building an application that uses the HDF library
the following locations will need to be specified for locating
header files and linking in the HDF libraries:
C:\MyHDFstuff\HDF41r2\lib
C:\MyHDFstuff\HDF41r2\include
Building from Source Code Release (hdf41r2s.zip)
===============================================
STEP I: Preconditions
To build the HDF, JPEG, zlib and mfhdf libraries and utilities,
it is assumed that you have done the following:
1. Installed MicroSoft Developer Studio, and Visual C++ 5.0.
Visual Fortran 5.0 is needed if you are going to build the
full HDF Library with Fortran support.
2. Set up a directory structure to unpack the library. For
example:
c:\ (any drive)
MyHDFstuff\ (any folder name)
3. Copy the source distribution archive to that directory
and unpack it using the appropriate archiver options to
create a directory hierarchy.
Run WinZip on HDF41r2s.zip (the entire source tree).
This should create a directory called 'HDF41r2' which
contains several files and directories.
( Note for those using the Win32 Alpha platform:
If you do not have a Winzip utility for your Alpha system
you can download the needed executables from:
http://www.cdrom.com/pub/infozip )
STEP II: Select Installation type and Build.
You may select one of 2 ways to build the HDF library and
utilities, depending on your environment and application needs.
Option I, (select Win32nof.zip)
Test and Utility configuration : HDF library, tests, and utilities, no fortran
Option II, (select Win32full.zip)
Full configuration : HDF library, tests, and utilities, with fortran
STEP III: Follow Instructions for Option I, or II
INSTRUCTIONS FOR OPTION I, TEST AND UTILITY INSTALLATION, NO FORTRAN
(Win32 Intel platform only)
*** Builds hdf library, hdf utilities,
*** test programs and batch files. No fortran code.
1. You will use Win32nof.zip
Unpack dev\win32nof.zip in directory dev\
Run WinZip on
c:\myHDFstuff\HDF41r2\Win32nof.zip
This archive contains a Developer Studio project "dev" and
two batch files.
40 project files (*.dsp files) will be created when
Win32nof.zip is expanded.
2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
"Open Workspace" option.
Then open c:\myHDFstuff\HDF41r2\dev.dsw workspace.
3. Select "Build", then Select "Set Active Configuration".
Select "dev -- Win32Debug" as active configuration.
Select "Build" and "Build dev.exe" to
build the Debug version of the HDF41r2 tree.
4. Select "Build", then Select "Set Active Configuration".
Select "dev -- Win32Release" as active configuration.
Select "Build" and "Build dev.exe" to
build the Release version of the HDF41r2 tree.
5. In command prompt window run the test batch file
win32noftst.bat in directory HDF41r2\.
6. If all tests passed, run the installation batch file
win32ins.bat in directory HDF41r2\. Commands in this file will create
subdirectories bin\, include\ and lib\ in HDF41r2\. The bin directory
will contain the HDF utilities, the include directory will contain
header files, and the lib directory will contain:
jpeg.lib - JPEG Library
jpegd.lib - JPEG Library with DEBUG option
libsrc.lib - multi-file SDS Interface routines
libsrcd.lib - multi-file SDS Interface routines with DEBUG option
src.lib - multi-file Vdata Interface
Vgroup Interface
AN Interface
GR Interface routines
srcd.lib - multi-file Vdata Interface
Vgroup Interface
AN Interface
GR Interface routines with DEBUG option
xdr.lib - XDR Library
xdrd.lib - XDR Library with DEBUG option
zlib.lib - GNU Zip Library
zlibd.lib - GNU Zip Library with DEBUG option
INSTRUCTIONS FOR OPTION II, FULL INSTALLATION WITH FORTRAN
*** Builds the hdf library, hdf utility programs, test programs,
*** and batch files. Includes fortran source code to be
*** compiled with Digital Visual Fortran on either a Win32 Intel
*** machine or a Win32 Alpha machine.
1. Unpack HDF41r2\Win32full.zip in directory HDF41r2\.
2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
"Open Workspace" option.
Then open c:\myHDFstuff\HDF41r2\dev.dsw workspace.
3. Select "Build", then Select "Set Active Configuration".
Select as the active configuration "dev -- Win32Debug"
if you have a Win32 Intel processor OR
select "dev-Win32AlphaDbg" if you have a Win32 Alpha processor.
Select "Build" and "Build dev.exe" to
build the Debug version of the HDF41r2 tree.
You will see that Digital Visual Fortran compiler is invoked
by Visual C++ Development environment in compiling the fortran code.
4. Select "Build", then Select "Set Active Configuration".
Select as the active configuration"dev -- Win32Release"
if you have a Win32 Intel processor OR
select "dev-Win32AlphaRel" if you have a Win32 Alpha processor.
Select "Build" and "Build dev.exe" to
build the Release version of the HDF41r2 tree.
5. In command prompt window run the test batch file which
resides in the HDF41r2 directory.
Run win32tst.bat if you have a Win32 Intel platform OR
run win32ALPHAtst.bat if you have the Win32 Alpha platform.
6. If all tests passed, run the installation batch file which
resides in the HDF41r2 directory
Run win32ins.bat if you have a Win32 Intel platform OR
run win32ALPHAins.bat if you have a Win32 Alpha platform.
Commands in these files will create
subdirectories bin\, include\ and lib\ in HDF41r2\. The bin directory
will contain the HDF utilities, include directory will contain
header files, and the lib directory will contain:
jpeg.lib - JPEG Library
jpegd.lib - JPEG Library with DEBUG option
libsrc.lib - multi-file SDS Interface routines
libsrcd.lib - multi-file SDS Interface routines with DEBUG option src.lib - multi-file Vdata Interface
Vgroup Interface
AN Interface
GR Interface routines
srcd.lib - multi-file Vdata Interface
Vgroup Interface
AN Interface
xdrd.lib - XDR Library with DEBUG option
zlib.lib - GNU Zip Library
zlibd.lib - GNU Zip Library with DEBUG option
STEP IV:
BUILDING AN APPLICATION USING THE HDF LIBRARY - SOME HELPFUL POINTERS
=====================================================================
If you are building an application that uses the HDF library
the following locations will need to be specified for locating
header files and linking in the HDF libraries:
<top-level HDF directory>\lib
<top-level HDF directory>\include
where <top-level HDF directory> may be C:\myHDFstuff\dev or C:\MyHDFstuff\HDF41r2\
Please refer to the <top-level HDF directory>\release_notes\compile.txt file
for more information on compiling an application with the HDF libraries.
MORE HELPFUL POINTERS
=====================
(as described in terms of installing the nofortran configuration)
Here are some notes that may be of help if you are not familiar
with using the Visual C++ Development Environment.
Project name and location issues:
The files in Win32nof.zip must end up in the HDF41r2\ directory
installed by HDF41r2s.zip
If you must install dev.dsw and dev.dsp in
another directory, relative to HDF41r2\ , you will be asked to
locate the above 5 sub-project files, when you open the
project dev.dsw.
If you want to rename dev (the entire project),
you will need to modify two files
dev.dsw and dev.dsp as text
(contrary to the explicit warnings in the files).
You can also modify dev.dsw and dev.dsp
as text, to allow these 2 files to be installed
in another directory.
Settings... details:
If you create your own project, the necessary settings can be
read from the dev.dsp file(as text), or from the
Project Settings in the Developer Studio project settings
dialog.
Project
Settings
C/C++
Category
PreProcessor
Code Generation
Use run-time Library
These are all set to use Single-Threaded.
or Single-Threaded debug.
============================================================================
================================macintosh.txt===============================
Fortner Software LLC ("Fortner") created the reference implementation for
Macintosh of the HDF 4.1r3 library, providing C-language bindings to all
4.1r3 features.
The Macintosh reference implementation of the HDF 4.1r3 library was implemented
and tested on a PowerMac Model 7600/120 running MacOS 8.5.1 using Metrowerks
CodeWarrior Pro1. The library has also been run on a PowerMac G3.
Fortner cannot be certain that the libraries will run on other versions of
Macintoshes (or clones) or MacOS versions, or when built using other
development tools. (In particular, this Macintosh implementation has not
addressed use with non-PowerPC versions of Macintosh [i.e., 680x0-based
Macintoshes]). Migrating the Macintosh reference implementation to other
development and/or run-time environments is the responsibility of the
library user.
First-time HDF users are encouraged to read the FAQ in this release for
more information about HDF. Users can also look at the home page for HDF
at:
https://www.hdfgroup.org/
Please send questions, comments, and recommendations regarding the
Macintosh version of the HDF library to:
help@hdfgroup.org
============================================================================
================================mf_anno.txt=================================
Annotation access through the Multi-file Annotation Interface(ANxxx)
====================================================================
These routines are for accessing file labels, file descriptions, data
labels and data descriptions (i.e. all are annotations). General access
requires the routines Hopen() and ANstart() to be called first and the
last call to be ANend() and Hclose() which ends annotation handling on the file
and closes the file. Basic annotation manipulation involves dealing
with handles(ann_id's) for each annotation and annotation interface
handle(an_id).
NOTES:
Note that the annotation types are enumerated.
TYPE here refers to file/data label/description types
They are AN_FILE_LABEL, AN_FILE_DESC, AN_DATA_LABEL, AN_DATA_DESC
The tag/ref refers to data tag/ref.
AN_DATA_LABEL = 0, /* Data label */
AN_DATA_DESC = 1, /* Data description */
AN_FILE_LABEL = 2, /* File label */
AN_FILE_DESC = 3 /* File description */
In C-code you need to declare the annotation type using the
enumerated type definition.
e.g. C-code fragment to write a File label
#include "hdf.h"
...
..
char fname[10] = {"ann.hdf"};
char *file_lab[1] = {"File label #1: This is a file label"};
int32 file_id; /* file id */
int32 an_id; /* annotation interface id */
int32 ann_id; /* annotation id */
ann_type myanntype; /* annotation type */
/* Start Annotation interface and create file */
file_id = Hopen(fname, DFACC_CREATE,0);
an_id = ANstart(file_id);
/* Set annotation type to file label */
myanntype = AN_FILE_LABEL;
/* Create id for file label */
ann_id = ANcreatef(an_id, myanntype);
/* Write file label */
ANwriteann(ann_id, file_lab[0], HDstrlen(file_lab[0]));
/* end access to file label */
ANendaccess(ann_id);
/* end access to file and close it*/
ANend(an_id);
Hclose(file_id);
....
...
NOTE: You could also call ANcreatef() like this
ANcreatef(an_handle, AN_FILE_LABEL);
without using the intermediate variable.
ROUTINES NEEDED:
================
Hopen - Opening the file, returns a file handle
Hclose - Close the file.
NEW ROUTINES:
===============
ANstart - open file for annotation handling, returns annotation
interface id
ANfileinfo - get number of file/data annotations in file. Indices returned
are used in ANselect() calls.
ANend - end access to annotation handling on file
ANcreate - create a new data annotation and return an id(ann_id)
ANcreatef - create a new file annotation and return an id(ann_id)
ANselect - returns an annotation id(ann_id) from index for
a particular annotation TYPE. This id is then used for
calls like ANwriteann(), ANreadann(), ANannlen(),..etc
ANnumann - return number of annotations that match TYPE/tag/ref
ANannlist - return list of id's(ann_id's) that match TYPE/tag/ref
ANannlen - get length of annotation given id(ann_id)
ANreadann - read annotation given id(ann_id)
ANwriteann - write annotation given id(ann_id)
ANendaccess - end access to annotation using id(ann_id)
Routines:
----------
C:
/* ------------------------------- ANstart --------------------------------
NAME
ANstart -- open file for annotation handling
USAGE
int32 ANstart(file_id)
int32 file_id; IN: file id
RETURNS
An annotation interface ID or FAIL
DESCRIPTION
Start annotation handling on the file and return an interface id.
Fortran: afstart(file_id)
/*------------------------------- ANfileinfo ----------------------------
NAME
ANfileinfo
PURPOSE
Report high-level information about the ANxxx interface for a given file.
USAGE
intn ANfileinfo(an_id, n_file_label, n_file_desc, n_data_label, n_data_desc)
int32 an_id; IN: annotation interface ID
int32 *n_file_label; OUT: the # of file labels
int32 *n_file_desc; OUT: the # of file descriptions
int32 *n_data_label; OUT: the # of data labels
int32 *n_data_desc; OUT: the # of data descriptions
RETURNS
SUCCEED/FAIL
DESCRIPTION
Reports general information about the number of file and data
annotations in the file. This routine is generally used to find
the range of acceptable indices for ANselect calls.
Fortran: affileinfo(an_id, num_flabel, num_fdesc, num_dlabel, num_ddesc)
/* -------------------------------- ANend ---------------------------------
NAME
ANend -- close annotation handling on a file
USAGE
int32 ANend(an_id)
int32 an_id; IN: annotation interface ID for the file
RETURNS
SUCCEED / FAIL
DESCRIPTION
Closes annotation handling on the gvien annotation interface id.
Fortran: afend(an_id)
/* ------------------------------ ANcreate ----------------------------
NAME
ANcreate - create a new data annotation for the specified item
USAGE
int32 ANcreate(an_id, tag, ref, type )
int32 an_id; IN: annotation interface ID
uint16 tag; IN: tag of the item
uint16 ref; IN: reference number of the item
ann_type type: IN: AN_DATA_LABEL for data labels,
AN_DATA_DESC for data descriptions,
RETURNS
An ID to an annotation which can either be a label or description
DESCRIPTION
Creates a data annotation, returns an 'ann_id' to work with the new
annotation which can either be a label or description.
Fortran: afcreate(an_id, tag, ref, type)
/* ------------------------------ ANcreatef ----------------------------
NAME
ANcreatef - create a new file annotation and return an id
USAGE
int32 ANcreatef(an_id, type )
int32 an_id; IN: annotation interface ID
ann_type type: IN: AN_FILE_LABEL for file labels,
AN_FILE_DESC for file descriptions.
RETURNS
An ID to an annotation which can either be a file label or description
DESCRIPTION
Creates a file annotation, returns an 'ann_id' to work with the new
file annotation which can either be a label or description.
Fortran: afcreatef(an_id, type)
/* ------------------------------- ANselect -------------------------------
NAME
ANselect -- get an annotation ID from index of 'type'
USAGE
int32 ANselect(an_id, index, type)
int32 an_id; IN: annotation interface ID
int32 index; IN: index of annottion to get ID for
ann_type type: IN: AN_DATA_LABEL for data labels,
AN_DATA_DESC for data descriptions,
AN_FILE_LABEL for file labels,
AN_FILE_DESC for file descriptions.
RETURNS
An ID to an annotation type which can either be a label or description
DESCRIPTION
The position index is ZERO based
Fortran: afselect(an_id, index, type)
/*------------------------------- ANnumann ---------------------------------
NAME
ANnumann -- find number of annotation of 'type' that
match the given element tag/ref
USAGE
intn ANnumann(an_id, type, elem_tag, elem_ref)
int32 an_id; IN: annotation interface ID
int type: IN: AN_DATA_LABEL for data labels,
AN_DATA_DESC for data descriptions,
AN_FILE_LABEL for file labels,
AN_FILE_DESC for file descriptions.
uint16 elem_tag,: IN: tag of item of which this is annotation
uint16 elem_ref; IN: ref of item of which this is annotation
RETURNS
number of annotation found if successful and FAIL (-1) otherwise
DESCRIPTION
Find number of annotation of 'type' for the given element
tag/ref pair. Here an element is either a file label/desc or
data label/desc.
Fortran: afnumann(an_id, type, tag, ref)
/*--------------------------------------------------------------------------
NAME
ANannlist -- generate list of annotation ids of 'type' that
match the given element tag/ref
USAGE
intn ANannlist(an_id, type, elm_tag, elem_ref, ann_list[])
int32 an_id; IN: annotation interface ID
ann_type type: IN: AN_DATA_LABEL for data labels,
AN_DATA_DESC for data descriptions,
AN_FILE_LABEL for file labels,
AN_FILE_DESC for file descriptions.
uint16 elem_tag,: IN: tag of element of which this is annotation
uint16 elem_ref; IN: ref of element of which this is annotation
int32 ann_list[]; OUT: array of ann_id's that match criteria.
RETURNS
number of annotations ids found if successful and FAIL (-1) otherwise
DESCRIPTION
Find and generate list of annotation ids of 'type' for the given
element tag/ref pair
Fortran: afannlist(an_id,type, tag, ref, alist[])
/*--------------------------------------------------------------------------
NAME
ANannlen -- get length of annotation given annotation id
USAGE
int32 ANannlen(ann_id)
int32 ann_id; IN: annotation id
RETURNS
length of annotation if successful and FAIL (-1) otherwise
DESCRIPTION
Get the length of the annotation specified.
Fortran: afannlen(ann_id)
/*--------------------------------------------------------------------------
NAME
ANwriteann -- write annotation given ann_id
USAGE
intn ANwriteann(ann_id, ann, ann_len)
char *ann_id; IN: annotation id
char *ann; IN: annotation to write
int32 ann_len; IN: length of annotation
RETURNS
SUCCEED (0) if successful and FAIL (-1) otherwise
DESCRIPTION
Checks for pre-existence of given annotation, replacing old one if it
exists. Writes out annotation.
Fortran: afwriteann(ann_id, ann, annlen)
/*--------------------------------------------------------------------------
NAME
ANreadann -- read annotation given ann_id
USAGE
intn ANreadann(ann_id, ann, maxlen)
int32 ann_id; IN: annotation id (handle)
char *ann; OUT: space to return annotation in
int32 maxlen; IN: size of space to return annotation in
RETURNS
SUCCEED (0) if successful and FAIL (-1) otherwise
DESCRIPTION
Gets tag and ref of annotation. Finds DD for that annotation.
Reads the annotation, taking care of NULL terminator, if necessary.
Fortran: afreadann(ann_id, ann, maxlen)
/* -----------------------------------------------------------------------
NAME
ANendaccess -- end access to an annotation given it's id
USAGE
intn ANendaccess(ann_id)
int32 an_id; IN: annotation id
RETURNS
SUCCEED or FAIL
DESCRIPTION
Terminates access to an annotation.
Fortran: afendaccess(ann_id)
============================================================================
================================mf_ris.txt==================================
The multi-file RIS interface
=============================
Contents:
Introduction
How to access files and images in the new interface
"Name = value" attributes in the new interface
Dealing with annotations in the new interface
Work not yet completed, bugs, limitations
A listing or routines
Descriptions of GR routines
File level interface
Dataset Manipulation
ID/Ref/Index Functions
Interlace Request Functions
LUT/Palette I/O Functions
Special Element Functions
Attribute Functions
Introduction
============
The new Generic Raster (GR) interface provides a set of functions for
manipulating raster images of all kinds. This new interface is meant to
replace the older RIS8 and RIS24 interfaces, although these older
interfaces will continue to be supported.
Generic raster images are composed of "pixels" which can have multiple
components, including but not limited to 8-bit unsigned integers. Each image
can have multiple palettes associated with it and other 'attributes' in the
same "name=value" style as the SD*() routines have.
The new GR interface was motivated by a number of needs:
o The need for multi-file, multi-object access to raster images, allowing
users to keep open more than one file at a time, and to "attach" more than
one raster image at a time.
o A need to further integrate the netCDF data-model with the HDF data-models.
o A need for a more general framework for attributes within the RIS
data-model (allowing 'name = value' style metadata).
o A need to be able to access subsamples and subsets of images.
IMPORTANT: The added functionality represented by this new interface has
necessitated a change in how raster images are physically represented on
disk. As a result programs using the old single-file RIS interfaces will
only be able to read the data out of files produced by the new interface.
The metadata / attributes will not be accessible.
The following chart represents what can be done with the various interfaces
available in HDF 4.0b1:
old RIS-API new GR-API
old RIS CRW CRW
HDF files
new RIS r CRW
HDF files
'R' means read, 'W' means write and 'C' means create. Entries with dashes
'-' represent functionality which has not yet been implemented. 'r' stands
for the ability to only read the data, not the metadata.
Work not yet completed, bugs, limitations
===========================================
Misc. stuff left to do:
Deal with special elements for images.
GRrename for images.
GRsetflags to suppress writing fill data and to suppress fillvalue attr.
Features not supported:
Full support for multiple palettes with each RI.
Support for named palettes with each RI.
Support for palettes with non-standard formats.
Deletion of attributes or images (would require changing the way index
numbers are handled)
Other limitations:
Currently the following design limitations are still in place:
1 - Cannot have pixels or palette entries which contain mixed variable
types, i.e. all the pixel/palette components must be of the same
number type.
2 - Currently all the components must be of valid HDF number types,
fractional bytes (i.e. 6-bit components) or 'plain' multiple byte values
are not handled, although they can be packed into the next larger
sized number type in order to hold them.
How to access files and images in the new interface
======================================================
Here are the steps involved in accessing images in the new interface:
1. Open or create the file using Hopen. This provides you with a file ID to
be used in step 2.
2. Activate the GR interface for the file with the file ID obtained from
step 1, using GRstart. This provides you with a GR interface ID (GR ID).
3. Optionally obtain information about the raster images in the file and
global GR attributes using GRfileinfo. Use the GR ID from step 2 to refer
to the image file.
4. Optionally find the index of a raster image, by name using
GRnametoindex, or by reference number using GRreftoindex.
5. Select for access an image with a given index, using GRselect for each
image. Each call to GRselect returns a raster image ID (RI ID) for
subsequent accesses involving the corresponding image.
5. Access the image by its RI ID, using routines such as GRgetiminfo (to
get information about the image) and GRreadimage (to read all or part of an
image).
6. Terminate access to a given image using GRendaccess.
7. Terminate access to the GR interface for the file, using GRend.
8. Close the file using Hclose.
Notice that in the GR interface, images are identified in several ways.
Before an image is accessible ("attached"), it is identified by index,
name, and reference number. The index describes the relative position of
the image in the file. The name is a character string associated with the
image, and the reference number is a unique integer. An image's name is
assigned by the program when it is created, and the reference number is
assigned by the HDF library when it is created. After an image is attached
, it is identified by an raster image identifier, or RI ID.
The following code fragment illustrates the steps involved in accessing the
image in a file and printing information about them.
/* Open the file and initialize the GR interface */
hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
grid=GRstart(hdf_file_id);
/* Obtain information about the images in the file */
GRfileinfo(grid,&n_datasets,&n_attrs);
/* Attach to each image and print information about it */
for(i=0; i<n_datasets; i++)
{
riid=GRselect(grid,i);
GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld,
dim[0]=%ld, dim[1]=%ld, n_attrs=%ld\n",
i, riid, ncomp, nt, il, dimsizes[0],
dimsizes[1], n_attrs);
/* Detach from the image */
GRendaccess(riid);
} /* end for */
/* Shut down the GR interface and close the file */
GRend(grid);
Hclose(hdf_file_id);
"Name = value" attributes in the new interface
===============================================
Attributes of the form "name = value" were introduced in HDF 3.3, but at
that time they were available only for SDSs and files. In HDF 4.0 we have
added the ability to attach local and global attributes to raster images
and raster image dimensions.
An attribute's "name" is a string, and "value" is the associated value or
values. If an attribute contains more than one value, all values must be
of the same type. For example the attribute 'valid_range' attribute might
be assigned values the maximum and minimum valid values for a given image.
Raster attributes can be "local" or "global." A local raster image
attribute is one that applies to one raster image only. Global raster image
attributes apply to all of the images in a file.
Attributes for raster images are created by the routine GRsetattr.
Existing attributes are selected by giving an object pointer and an
attribute index. The functions GRattrinfo, GRfindattr, and GRgetattr may
be used in combination to read attributes and their values. GRattrinfo
gets the name , number type, and number of values for an attribute with a
given index. GRfindattr gets the index of an attribute with a given name,
and GRreadattr reads the values associate with an attribute with a given
index.
The following example illustrates how to attach GR image attributes, and
also GR global (file) attributes.
/* Open file and initialize the GR interface */
hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
grid=GRstart(hdf_file_id);
/* Create a global attribute -- applies to all rasters in the file */
HDstrcpy(attr_name,"Test1");
HDstrcpy(u8_attr,"Attribute value 1");
GRsetattr(grid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
GRfileinfo(grid,&n_datasets,&n_attrs);
/* select every image in the file, and
assign a local attribute to each */
for(i=0; i<n_datasets; i++)
{
/* Attach to image with index==i */
riid=GRselect(grid,i);
/* Create an attribute for the image */
HDstrcpy(attr_name,"Image1");
HDstrcpy(u8_attr,"Attribute value 1");
GRsetattr(riid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld, dim[0]=%ld,
dim[1]=%ld, n_attrs=%ld\n",i,riid,ncomp,nt,il,
dimsizes[0], dimsizes[1],n_attrs);
for(j=0; j<n_attrs; j++)
{
GRattrinfo(riid,j,attr_name,&nt,&ncomp);
GRgetattr(riid,j,u8_attr);
printf("Image #%d Attribute #%d: Name=%s, Value=%s\n",
i,j,attr_name,u8_attr);
} /* end for */
/* Detach from the image */
GRendaccess(riid);
} /* end for */
/* Shut down the GR interface */
GRend(grid);
/* Close the file */
Hclose(hdf_file_id);
Dealing with annotations in the new interface
================================================
The new GR interface allows you to reference rasters explicitly, by "GR
id". A GR id is different from its reference number. Since annotation
routines attach annotations to objects by reference number, there needs to
be a mechanism for determining the reference number of a raster image,
given its id. This is made possible by the addition of the routine
GRidtoref.
A similar problem occurs when going the other way. For example, a call to
DFANlabellist returns the reference numbers of objects that are
annotated. If those objects are RISs (i.e. they have the tag DFTAG_RIG),
we need to map the reference numbers to the corresponding images. For
this, a two-step process is required. You can use the function
GRreftoindex to get the index, or position, of the dataset that has a
certain reference number, then you use the routine GRselect to get the id
for the image in that position.
A listing or routines
======================
File/Interface Functions:
int32 GRstart(int32 hdf_file_id)
- Initializes the GR interface for a particular file. Returns a 'grid' to
specify the GR group to operate on.
intn GRfileinfo(int32 grid, int32 *n_datasets, int32 *n_attrs)
- Returns information about the datasets and "global" attributes for the
GR interface.
intn GRend(int32 grid)
- Terminates multi-file GR access for a file.
Image I/O Functions:
int32 GRcreate(int32 grid,char *name,int32 ncomp,int32 nt,int32 il,int32
dimsizes[2])
- Defines a raster image in a file. Returns a 'riid' to work with the new
raster image.
int32 GRselect(int32 grid,int32 index)
- Selects an existing RI to operate on.
int32 GRnametoindex(int32 grid,char *name)
- Maps a RI name to an index which is returned.
intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32
*il,int32 dimsizes[2],int32 *n_attr)
- Gets information about an RI which has been selected/created.
intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],int32
count[2],VOIDP data)
- Writes image data to an RI. Partial dataset writing and subsampling is
allowed, but only with the dimensions of the dataset (ie. no UNLIMITED
dimension support)
intn GRreadimage(int32 riid,int32 start[2],int32 stride[2],int32
count[2],VOIDP data)
- Read image data from an RI. Partial reads and subsampling are allowed.
intn GRendaccess(int32 riid)
- End access to an RI.
Dimension Functions:
int32 GRgetdimid(int32 riid,int32 index)
- Get a dimension id ('dimid') for an RI to assign attributes to. [Later]
intn GRsetdimname(int32 dimid,char *name)
- Set the name of a dimension. [Later]
int32 GRdiminfo(int32 dimid,char *name,int32 *size,int32 *n_attr)
- Get information about the dimensions attributes and size. [Later]
ID/Ref/Index Functions:
uint16 GRidtoref(int32 riid)
- Maps an riid to a reference # for annotating or including in a Vgroup.
int32 GRreftoindex(int32 hdf_file_id,uint16 ref)
- Maps the reference # of an RI into an index which can be used with
GRselect.
Interlace Request Functions:
intn GRreqlutil(int32 riid,intn il)
- Request that the next LUT read from an RI have a particular interlace.
intn GRreqimageil(int32 riid,intn il)
- Request that the image read from an RI have a particular interlace.
LUT/Palette I/O Functions:
int32 GRgetlutid(int32 riid,int32 index)
- Get a palette id ('palid') for an RI.
intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
- Gets information about a palette.
intn GRwritelut(int32 riid,int32 ncomps,int32 nt,int32 il,int32
nentries,VOIDP data)
- Writes out a palette for an RI.
intn GRreadlut(int32 palid,VOIDP data)
- Reads a palette from an RI.
Special Element Functions:
int32 GRsetexternalfile(int32 riid,char *filename,int32 offset)
- Makes the image data of an RI into an external element special element.
intn GRsetaccesstype(int32 riid,uintn accesstype)
- Sets the access for an RI to be either serial or parallel I/O.
intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
- Makes the image data of an RI into a compressed special element.
Attribute Functions:
intn GRsetattr(int32 dimid|riid|grid,char *name,int32 attr_nt,int32
count,VOIDP data)
- Write an attribute for an object.
int32 GRattrinfo(int32 dimid|riid|grid,int32 index,char *name,int32
*attr_nt,int32 *count)
- Get attribute information for an object.
intn GRgetattr(int32 dimid|riid|grid,int32 index,VOIDP data)
- Read an attribute for an object.
int32 GRfindattr(int32 dimid|riid|grid,char *name)
- Get the index of an attribute with a given name for an object.
Routine Descriptions
====================
Most of the routines in the GR interface return a status value of type intn
(native integers). If the status is equal to SUCCEED the routine completed
successfully. If it is equal to FAIL an error occurred, information about
the error may be available by calling HEprint(filestream, 0). SUCCEED and
FAIL are defined in hdf.h for C users and in constant.i for Fortran
programs.
All IDs (hdf_file_id, grid, riid) are int32 quantities.
Prototypes for these functions can be found in the file hproto.h
Routines that can be called from C are all of the form GRxxx
More details about all the routines below can be found in the HDF reference
manual.
File level interface:
=====================
These routines initialize and de-initialize the GR interface, and provide
information about the raster images in a file.
GRstart
-------
Initialize the GR*() interface for a given HDF file.
USAGE
int32 GRstart(hdf_file_id)
int32 hdf_file_id; IN: file ID from Hopen
RETURNS
Return grid (GR ID) on success, or FAIL
DESCRIPTION
Initializes the GR*() interface to operate on the HDF file which was
specified by hdf_file_id. This routine must be called before any further
GR*() routines are called for a file.
GRfileinfo
----------
Report high-level information about the GR*() interface for a given file.
USAGE
intn GRfileinfo(grid, n_datasets, n_attrs)
int32 grid; IN: GR ID to get information about
int32 *n_datasets; OUT: the # of GR datasets in a file
int32 *n_attrs; OUT: the # of "global" GR attributes
RETURNS
SUCCEED/FAIL
DESCRIPTION
Reports general information about the number of datasets and "global"
attributes for the GR interface. This routine is generally used to find
the range of acceptable indices for GRselect calls.
GRend
-----
Terminate the GR*() interface for a given HDF file.
USAGE
intn GRend(grid)
int32 grid; IN: GR ID from GRstart
RETURNS
SUCCEED/FAIL
DESCRIPTION
Terminates access to the GR*() interface for a file.
DataSet Manipulation
=====================
GRcreate
--------
Create a new raster image.
USAGE
int32 GRcreate(grid, name, ncomp, nt, il, dimsizes)
int32 grid; IN: GR ID from GRstart
char *name; IN: Name of raster image to create
int32 ncomp; IN: Number of components in image
int32 nt; IN: Number type of each component
int32 il; IN: Interlace of the components in the image
int32 dimsizes[2]; IN: Dimensions of the new image
RETURNS
A valid riid (Raster-Image ID) on success, or FAIL.
DESCRIPTION
Creates a new raster image in a file.
ASSUMPTIONS
All components must be the same number-type.
GRselect
--------
Select a raster image to operate on.
USAGE
int32 GRselect(grid,index)
int32 grid; IN: GR ID from GRstart
int32 index; IN: Which raster image to select (indexed from 0)
RETURNS
A valid riid (Raster-Image ID) on success, or FAIL.
DESCRIPTION
Selects a raster image from the file to work on. This ID is needed for
all operations on the image dataset, including reading/writing data,
annotations, etc.
GRnametoindex
-------------
Map a raster image name to an index.
USAGE
int32 GRnametoindex(grid,name)
int32 grid; IN: GR ID from GRstart
char *name; IN: Name of raster image to search for
RETURNS
A valid index on success, or FAIL.
DESCRIPTION
Searches for a raster image based on the name provided. This routine
maps from names of raster images to indices inside the GR group.
GRgetiminfo
-----------
Gets information about a raster image.
USAGE
intn GRgetiminfo(riid,name,ncomp,nt,il,dimsizes,n_attr)
int32 riid; IN: RI ID from GRselect/GRcreate
char *name; OUT: name of raster image
int32 *ncomp; OUT: number of components in image
int32 *nt; OUT: number type of components
int32 *il; OUT: interlace of the image
int32 *dimsizes; OUT: size of each dimension
int32 *n_attr; OUT: the number of attributes for the image
RETURNS
SUCCEED/FAIL
DESCRIPTION
Looks up information about an image which has been selected or created
with the GR routines. Each of the parameters can be NULL, in which case
that piece of information will not be retrieved.
GRwriteimage
------------
Writes raster data to an image
USAGE
intn GRwriteimage(riid,start,stride,edge,data)
int32 riid; IN: RI ID from GRselect/GRcreate
int32 start[2]; IN: array containing the offset in the image of the
image data to write out
int32 stride[2]; IN: array containing interval of data being written
along each edge. strides of 0 are illegal
(and generate an error)
ie. stride of 1 in each dimension means
writing contiguous data, stride of 2 means
writing every other element out along an edge.
int32 count[2]; IN: number of elements to write out along each edge.
VOIDP data; IN: pointer to the data to write out.
RETURNS
SUCCEED/FAIL
DESCRIPTION
Writes image data to an RI. Partial dataset writing and subsampling is
allowed, but only within the dimensions of the dataset (ie. no UNLIMITED
dimension support)
ASSUMPTIONS
If the stride parameter is set to NULL, a stride of 1 will be assumed.
GRreadimage
-----------
Read raster data for an image
USAGE
intn GRreadimage(riid,start,stride,edge,data)
int32 riid; IN: RI ID from GRselect/GRcreate
int32 start[2]; IN: array containing the offset in the image of the
image data to read in
int32 stride[2]; IN: array containing interval of data being read
along each edge. strides of 0 are illegal
(and generate an error)
ie. stride of 1 in each dimension means
reading contiguous data, stride of 2 means
reading every other element out along an edge.
int32 count[2]; IN: number of elements to read in along each edge.
VOIDP data; IN: pointer to the data to read in.
RETURNS
SUCCEED/FAIL
DESCRIPTION
Read image data from an RI. Partial dataset reading and subsampling is
allowed.
ASSUMPTIONS
If the stride parameter is set to NULL, a stride of 1 will be assumed.
GRendaccess
-----------
End access to an RI.
USAGE
intn GRendaccess(riid)
int32 riid; IN: RI ID from GRselect/GRcreate
RETURNS
SUCCEED/FAIL
DESCRIPTION
End access to an RI. Further attempts to access the RI ID will result in
an error.
Dimension Functions
===================
(these have not been completed)
ID/Ref/Index Functions
======================
GRidtoref
---------
Maps an RI ID to a reference # for annotating or including in a Vgroup.
USAGE
uint16 GRidtoref(riid)
int32 riid; IN: RI ID from GRselect/GRcreate
RETURNS
A valid reference # on success or FAIL
DESCRIPTION
Maps an riid to a reference # for annotating or including in a Vgroup.
GRreftoindex
------------
Maps the reference # of an RI into an index which can be used with GRselect.
USAGE
int32 GRreftoindex(grid,ref)
int32 grid; IN: GR ID from GRstart
uint16 ref; IN: reference number of raster image to map to index
RETURNS
A valid index # on success or FAIL
DESCRIPTION
Maps the reference # of an RI into an index which can be used with GRselect.
Interlace Request Functions
===========================
GRreqlutil
----------
Request that the next LUT read from an RI have a particular interlace.
USAGE
intn GRreqlutil(riid,il)
int32 riid; IN: RI ID from GRselect/GRcreate
intn il; IN: interlace for next LUT. From the following
values (found in mfgr.h):
MFGR_INTERLACE_PIXEL - pixel interlacing
MFGR_INTERLACE_LINE - line interlacing
MFGR_INTERLACE_COMPONENT - component/plane interlacing
RETURNS
SUCCEED/FAIL
DESCRIPTION
Request that the next LUT read from an RI have a particular interlace.
GRreqimageil
------------
Request that the image read from an RI have a particular interlace.
USAGE
intn GRreqimageil(riid,il)
int32 riid; IN: RI ID from GRselect/GRcreate
intn il; IN: interlace for next RI. From the following
values (found in mfgr.h):
MFGR_INTERLACE_PIXEL - pixel interlacing
MFGR_INTERLACE_LINE - line interlacing
MFGR_INTERLACE_COMPONENT - component/plane interlacing
RETURNS
SUCCEED/FAIL
DESCRIPTION
Request that the image read from an RI have a particular interlace.
LUT/Palette I/O Functions
=========================
GRgetlutid
----------
Get a LUT id ('lutid') for an RI.
USAGE
int32 GRgetlutid(riid,index)
int32 riid; IN: RI ID from GRselect/GRcreate
int32 lut_index; IN: Which LUT image to select (indexed from 0)
RETURNS
Valid LUT ID on success, FAIL on failure
DESCRIPTION
Get a LUT id ('lutid') for accessing LUTs in an RI.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Currently only supports one LUT per image, at index 0 and LUTID==RIID.
intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
- Gets information about a palette.
GRwritelut
----------
Writes out a LUT for an RI.
USAGE
intn GRwritelut(riid,name,ncomps,nt,il,nentries,data)
int32 lutid; IN: LUT ID from GRgetlutid
char *name; IN: name of LUT image
int32 ncomp; IN: number of components in LUT
int32 nt; IN: number type of components
int32 il; IN: interlace of the LUT
int32 nentries; IN: the number of entries for the LUT
VOIDP data; IN: LUT data to write out
RETURNS
SUCCEED/FAIL
DESCRIPTION
Writes out a LUT for an RI.
GRreadlut
---------
Reads a LUT from an RI.
USAGE
intn GRreadlut(lutid,data)
int32 lutid; IN: LUT ID from GRgetlutid
VOIDP data; IN: buffer for LUT data read in
RETURNS
SUCCEED/FAIL
DESCRIPTION
Reads a LUT from an RI.
Special Element Functions
=========================
GRsetexternalfile
-----------------
Makes the image data of an RI into an external element special element.
USAGE
intn GRsetexternalfile(riid,filename,offset)
int32 riid; IN: RI ID from GRselect/GRcreate
char *filename; IN: name of the external file
int32 offset; IN: offset in the external file to store the image
RETURNS
SUCCEED/FAIL
DESCRIPTION
Makes the image data of an RI into an external element special element.
Cause the actual data for a dataset to be stored in an
external file. This can only be done once for any given
dataset and it is the user's responsibility to make sure the
external datafile is transported when the "header" file is
moved. The offset is the number of byte from the beginning of
the file where the data should be stored. This routine can
only be called on HDF 3.3 files (i.e. calling on an XDR-based
netCDF file that was opened with the multi-file interface will
fail).
GRsetaccesstype
---------------
Sets the access for an RI to be either serial or parallel I/O.
USAGE
intn GRsetaccesstype(riid,accesstype)
int32 riid; IN: RI ID from GRselect/GRcreate
uintn accesstype; IN: access type for image data, from the following
values:
DFACC_SERIAL - for serial access
DFACC_PARALLEL - for parallel access
RETURNS
SUCCEED/FAIL
DESCRIPTION
Sets the access for an RI to be either serial or parallel I/O.
GRsetcompress
-------------
Compressed the image data of an RI.
USAGE
intn GRsetcompress(riid,comp_type,cinfo)
int32 riid; IN: RI ID from GRselect/GRcreate
int32 comp_type; IN: type of compression, from list in hcomp.h
comp_info *cinfo; IN: compression specific information
RETURNS
SUCCEED/FAIL
DESCRIPTION
Compressed the image data of an RI.
(Makes the image data of an RI into a compressed special element)
Attribute Functions
===================
GRsetattr
---------
Write an attribute for an object.
USAGE
intn GRsetattr(dimid|riid|grid,name,attr_nt,count,data)
int32 dimid|riid|grid; IN: DIM|RI|GR ID
char *name; IN: name of attribute
int32 attr_nt; IN: number-type of attribute
int32 count; IN: number of entries of the attribute
VOIDP data; IN: attribute data to write
RETURNS
SUCCEED/FAIL
DESCRIPTION
Write an attribute for an object (function will figure out ID type).
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Currently does not allow changing NT of an existing attribute.
GRattrinfo
----------
Get attribute information for an object.
USAGE
intn GRattrinfo(dimid|riid|grid,index,name,attr_nt,count)
int32 dimid|riid|grid; IN: DIM|RI|GR ID
int32 index; IN: index of the attribute for info
char *name; OUT: name of attribute
int32 attr_nt; OUT: number-type of attribute
int32 count; OUT: number of entries of the attribute
RETURNS
SUCCEED/FAIL
DESCRIPTION
Get attribute information for an object.
GRgetattr
---------
Read an attribute for an object.
USAGE
intn GRgetattr(dimid|riid|grid,index,data)
int32 dimid|riid|grid; IN: DIM|RI|GR ID
int32 index; IN: index of the attribute for info
VOIDP data; OUT: data read for attribute
RETURNS
SUCCEED/FAIL
DESCRIPTION
Read an attribute for an object.
GRfindattr
----------
Get the index of an attribute with a given name for an object.
USAGE
int32 GRfindattr(int32 dimid|riid|grid,char *name)
int32 dimid|riid|grid; IN: DIM|RI|GR ID
char *name; IN: name of attribute to search for
RETURNS
Valid index for an attribute on success, FAIL on failure
DESCRIPTION
Get the index of an attribute with a given name for an object.
============================================================================
================================new_functions.txt===========================
This file contains a list of the new functions added with HDF 4.1r2.
The functions in parenthesis were already present in the HDF library,
and are included for clarity.
C FORTRAN Description
--------------------------------------------------------------------------------
(SDsetcompress) sfscompress compresses SDS
(SDwritechunk) sfwchnk writes the specified chunk of
NUMERIC data to the SDS
(SDwritechunk) sfwcchnk writes the specified chunk of
CHARACTER data to the SDS
(SDreadchunk) sfrchnk reads the specified chunk of
NUMERIC data to the SDS
(SDreadchunk) sfrcchnk reads the specified chunk of
CHARACTER data to the SDS
(SDsetchunk) sfschnk makes the SDS a chunked SDS
(SDsetchunkcache) sfscchnk sets the maximum number of chunks
to cache
(SDgetchunkinfo) sfgichnk gets info on SDS
(SDsetblocksize) sfsblsz sets block size
(SDisrecord) sfisrcrd checks if an SDS is unlimited
(GRsetcompress) mgscompress compresses raster image
GRsetchunk mgschnk makes a raster image a chunked
raster image
GRgetchunkinfo mggichnk gets info on a raster image
GRsetchunkcache mgscchnk sets the maximum number of chunks
to cache
(Hgetlibversion) hglibver gets version of the HDF Library
(Hgetfileversion) hgfilver gets version of the HDF file
Vdeletetagref vfdtr deletes tag/ref pair ( HDF object)
from a vgroup
(VSfindclass) vsffcls finds class with a specified
name in a vdata
VSdelete vsfdlte deletes a vdata
Vdelete vdelete deletes a vgroup
============================================================================
================================sd_chunk_examples.txt=======================
/**************************************************************************
File: sd_chunk_examples.c
Examples for writing/reading SDS with Chunking and Chunking w/ Compression.
- Sample C-code using SDS chunking routines.
- No real error checking is done and the value of 'status' should
be checked for proper values.
5 Examples are shown, 1 for 2-D array, 3 for 3-D arrays and
1 for 2-D array with compression..
Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
Write data using SDwritechunk().
Read data using SDreaddata().
Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
Write data using SDwritedata().
Read data using SDreaddata().
Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
Write data using SDwritechunk().
Read data using SDreaddata().
Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
Write data using SDwritedata().
Read data using SDreadchunk().
Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression.
Write data using SDwritechunk().
Read data using SDreaddata().
Author - GeorgeV
Date - 11/25/96
********************************************************************/
#include "mfhdf.h"
/* arrays holding dim info for datasets */
static int32 d_dims[3] = {2, 3, 4}; /* data dimensions */
static int32 edge_dims[3] = {0, 0, 0}; /* edge dims */
static int32 start_dims[3] = {0, 0, 0}; /* starting dims */
/* data arrays laid out in memory */
/* used in Example 1 and 5 */
static uint16 u16_2data[9][4] =
{
{11, 21, 31, 41},
{12, 22, 32, 42},
{13, 23, 33, 43},
{14, 24, 34, 44},
{15, 25, 35, 45},
{16, 26, 36, 46},
{17, 27, 37, 47},
{18, 28, 38, 48},
{19, 29, 39, 49},
};
/* uint16 3x2 chunk arrays used in example 1 and 5*/
static uint16 chunk1_2u16[6] = {11, 21,
12, 22,
13, 23};
static uint16 chunk2_2u16[6] = {31, 41,
32, 42,
33, 43};
static uint16 chunk3_2u16[6] = {14, 24,
15, 25,
16, 26};
static uint16 chunk4_2u16[6] = {34, 44,
35, 45,
36, 46};
static uint16 chunk5_2u16[6] = {17, 27,
18, 28,
19, 29};
static uint16 chunk6_2u16[6] = {37, 47,
38, 48,
39, 49};
/* uint16 1x1x4 chunk arrays used in example 3 */
static uint16 chunk1_3u16[4] = { 0, 1, 2, 3};
static uint16 chunk2_3u16[4] = { 10, 11, 12, 13};
static uint16 chunk3_3u16[4] = { 20, 21, 22, 23};
static uint16 chunk4_3u16[4] = { 100, 101, 102, 103};
static uint16 chunk5_3u16[4] = { 110, 111, 112, 113};
static uint16 chunk6_3u16[4] = { 120, 121, 122, 123};
/* Used in Examples 2 and 4 */
static uint16 u16_3data[2][3][4] =
{
{
{ 0, 1, 2, 3},
{ 10, 11, 12, 13},
{ 20, 21, 22, 23}},
{
{ 100, 101, 102, 103},
{ 110, 111, 112, 113},
{ 120, 121, 122, 123}}};
/*
* Main routine
*/
int main(int argc, char *argv[])
{
int32 f1; /* file handle */
int32 sdsid; /* SDS handle */
uint16 inbuf_3u16[2][3][4]; /* Data array read for Example 2 and 3*/
uint16 inbuf_2u16[5][2]; /* Data array read for Example 1 */
uint16 ru16_3data[4]; /* whole chunk input buffer */
uint16 fill_u16 = 0; /* fill value */
HDF_CHUNK_DEF chunk_def; /* Chunk definition set */
HDF_CHUNK_DEF rchunk_def; /* Chunk definition read */
int32 cflags; /* chunk flags */
comp_info cinfo; /* compression info */
intn status;
ncopts = NC_VERBOSE;
/* create file */
f1 = SDstart("chunk.hdf", DFACC_CREATE);
/*
Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
Write data using SDwritechunk().
Read data using SDreaddata().
*/
/* create a 9x4 SDS of uint16 in file 1 */
d_dims[0] = 9;
d_dims[1] = 4;
sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
/* set fill value */
fill_u16 = 0;
status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
/* Create chunked SDS
chunk is 3x2 which will create 6 chunks */
chunk_def.chunk_lengths[0] = 3;
chunk_def.chunk_lengths[1] = 2;
status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
/* Set Chunk cache to hold 3 chunks */
status = SDsetchunkcache(sdsid, 3, 0);
/* Write data use SDwritechunk */
/* Write chunk 1 */
start_dims[0] = 0;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
/* Write chunk 4 */
start_dims[0] = 1;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
/* Write chunk 2 */
start_dims[0] = 0;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
/* Write chunk 5 */
start_dims[0] = 2;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
/* Write chunk 3 */
start_dims[0] = 1;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
/* Write chunk 6 */
start_dims[0] = 2;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
/* read a portion of data back in using SDreaddata
i.e 5x2 subset of the whole array */
start_dims[0] = 2;
start_dims[1] = 1;
edge_dims[0] = 5;
edge_dims[1] = 2;
status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
/* This 5x2 array should look somethink like this
{{23, 24, 25, 26, 27},
{33, 34, 35, 36, 37}}
*/
/* Get chunk information */
status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
/* Close down this SDS*/
status = SDendaccess(sdsid);
/*
Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
Write data using SDwritedata().
Read data using SDreaddata().
*/
/* create a new 2x3x4 SDS of uint16 in file 1 */
d_dims[0] = 2;
d_dims[1] = 3;
d_dims[2] = 4;
sdsid = SDcreate(f1, "DataSetChunked_2", DFNT_UINT16, 3, d_dims);
/* set fill value */
fill_u16 = 0;
status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
/* Create chunked SDS
chunk is 2x3x2 which will create 2 chunks */
chunk_def.chunk_lengths[0] = 2;
chunk_def.chunk_lengths[1] = 2;
chunk_def.chunk_lengths[2] = 3;
status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
/* Set Chunk cache to hold 2 chunks*/
status = SDsetchunkcache(sdsid, 2, 0);
/* Write data using SDwritedata*/
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
edge_dims[0] = 2;
edge_dims[1] = 3;
edge_dims[2] = 4;
status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
/* read data back in using SDreaddata*/
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
edge_dims[0] = 2;
edge_dims[1] = 3;
edge_dims[2] = 4;
status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
/* Verify the data in inbuf_3u16 against u16_3data[] */
/* Get chunk information */
status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
/* Close down this SDS*/
status = SDendaccess(sdsid);
/*
Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
Write data using SDwritechunk().
Read data using SDreaddata().
*/
/* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
d_dims[0] = 2;
d_dims[1] = 3;
d_dims[2] = 4;
sdsid = SDcreate(f1, "DataSetChunked_3", DFNT_UINT16, 3, d_dims);
/* set fill value */
fill_u16 = 0;
status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
/* Create chunked SDS
chunk is 1x1x4 which will create 6 chunks */
chunk_def.chunk_lengths[0] = 1;
chunk_def.chunk_lengths[1] = 1;
chunk_def.chunk_lengths[2] = 4;
status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
/* Set Chunk cache to hold 4 chunks*/
status = SDsetchunkcache(sdsid, 4, 0);
/* Write data use SDwritechunk */
/* Write chunk 1 */
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_3u16);
/* Write chunk 4 */
start_dims[0] = 1;
start_dims[1] = 0;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_3u16);
/* Write chunk 2 */
start_dims[0] = 0;
start_dims[1] = 1;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_3u16);
/* Write chunk 5 */
start_dims[0] = 1;
start_dims[1] = 1;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_3u16);
/* Write chunk 3 */
start_dims[0] = 0;
start_dims[1] = 2;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_3u16);
/* Write chunk 6 */
start_dims[0] = 1;
start_dims[1] = 2;
start_dims[2] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_3u16);
/* read data back in using SDreaddata*/
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
edge_dims[0] = 2;
edge_dims[1] = 3;
edge_dims[2] = 4;
status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
/* Verify the data in inbuf_3u16 against u16_3data[] */
/* Close down this SDS*/
status = SDendaccess(sdsid);
/*
Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
Write data using SDwritedata().
Read data using SDreadchunk().
*/
/* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
d_dims[0] = 2;
d_dims[1] = 3;
d_dims[2] = 4;
sdsid = SDcreate(f1, "DataSetChunked_4", DFNT_UINT16, 3, d_dims);
/* set fill value */
fill_u16 = 0;
status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
/* Create chunked SDS
chunk is 1x1x4 which will create 6 chunks */
chunk_def.chunk_lengths[0] = 1;
chunk_def.chunk_lengths[1] = 1;
chunk_def.chunk_lengths[2] = 4;
status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
/* Set Chunk cache to hold 4 chunks */
status = SDsetchunkcache(sdsid, 4, 0);
/* Write data using SDwritedata*/
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
edge_dims[0] = 2;
edge_dims[1] = 3;
edge_dims[2] = 4;
status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
/* read data back in using SDreadchunk and verify against
the chunk arrays chunk1_3u16[] ... chunk6_3u16[] */
/* read chunk 1 */
start_dims[0] = 0;
start_dims[1] = 0;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* read chunk 2 */
start_dims[0] = 0;
start_dims[1] = 1;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* read chunk 3 */
start_dims[0] = 0;
start_dims[1] = 2;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* read chunk 4 */
start_dims[0] = 1;
start_dims[1] = 0;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* read chunk 5 */
start_dims[0] = 1;
start_dims[1] = 1;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* read chunk 6 */
start_dims[0] = 1;
start_dims[1] = 2;
start_dims[2] = 0;
status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
/* Close down this SDS*/
status = SDendaccess(sdsid);
/*
Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression
Write data using SDwritechunk().
Read data using SDreaddata().
*/
/* create a 9x4 SDS of uint16 in file 1 */
d_dims[0] = 9;
d_dims[1] = 4;
sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
/* set fill value */
fill_u16 = 0;
status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
/* Create chunked SDS
chunk is 3x2 which will create 6 chunks
Compression set will be GZIP.
Note that 'chunk_def' is a union.
See the man page 'sd_chunk.3' for more info on the union. */
chunk_def.comp.chunk_lengths[0] = 3;
chunk_def.comp.chunk_lengths[1] = 2;
chunk_def.comp.comp_type = COMP_CODE_DEFLATE; /* GZIP */
chunk_def.comp.cinfo.deflate.level = 6; /* Level */
/* set Chunking with Compression */
status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK | HDF_COMP);
/* Set Chunk cache to hold 3 chunks */
status = SDsetchunkcache(sdsid, 3, 0);
/* Write data use SDwritechunk
NOTE: This is the recommended way when using Compression */
/* Write chunk 1 */
start_dims[0] = 0;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
/* Write chunk 4 */
start_dims[0] = 1;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
/* Write chunk 2 */
start_dims[0] = 0;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
/* Write chunk 5 */
start_dims[0] = 2;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
/* Write chunk 3 */
start_dims[0] = 1;
start_dims[1] = 0;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
/* Write chunk 6 */
start_dims[0] = 2;
start_dims[1] = 1;
status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
/* read a portion of data back in using SDreaddata
i.e 5x2 subset of the whole array */
start_dims[0] = 2;
start_dims[1] = 1;
edge_dims[0] = 5;
edge_dims[1] = 2;
status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
/* This 5x2 array should look somethink like this
{{23, 24, 25, 26, 27},
{33, 34, 35, 36, 37}}
*/
/* Get chunk information */
status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
/* Close down this SDS*/
status = SDendaccess(sdsid);
/* Close down SDS interface */
status = SDend(f1);
}
============================================================================
================================vattr.txt===================================
Vgroup and vdata attributes
9/8/96
Vdata/vgroup version
--------------------
Previously (up to HDF4.0r2), the vdata and vgroup version was 3,
VSET_VERSION. With attributes added, the version number has been
changed to 4, VSET_NEW_VERSION. For backward compatibility, a vdata
or a vgroup will still have version number 3 if it has no attribute(s)
assigned.
Attribute
---------
An attribute has a name, data type, a number of values and the
values. All values of an attribute should be of the same data type.
For example, 10 characters, or 2 32-bit integers.
Any number of attributes can be assigned to a vgroup, a vdata
(entire vdata) or any field of a vdata. An attribute name should be
unique in its scope. For example, a field attribute name
should be unique among all attributes of that field.
Attributes in HDF files
-----------------------
Attributes will be stored in vdatas. The vdata's name is
the attribute name specified by the user. Its class is
"Attr0.0", _HDF_ATTRIBUTE.
All attributes of a vgroup or a vdata will be included in
the vgroup represented by DFTAG_VG, or the vdata header,
DFTAG_VH.
Vdata/Vgroup attribute routines (see man pages for more info)
----------------------------------------------------------
intn VSfindex(int32 vsid, char *fieldname, int32 *fldindex)
find out the index of a field given the field name.
intn VSsetattr(int32 vsid, int32 findex, char *attrname,
int32 datatype, int32 count, VOIDP values)
set attr for a field of a vdata or for the vdata.
if the attr already exists the new values will replace
the current ones, provided the datatype and order
have not been changed.
intn VSnattrs(int32 vsid)
total number of attr for a vdata and its fields
int32 VSfnattrs(int32 vsid, int32 findex)
number of attrs for a vdata or a field of it
intn VSfindattr(int32 vsid, int32 findex, char *attrname)
get index of an attribute with a given name
intn VSattrinfo(int32 vsid, int32 findex, intn attrindex,
char *name, int32 *datatype, int32 *count,
int32 *size);
get info about an attribute
intn VSgetattr(int32 vsid, int32 findex, intn attrindex,
VOIDP values)
get values of an attribute
intn VSisattr(int32 vsid)
test if a vdata is an attribute of other object
intn Vsetattr(int32 vgid, char *attrname, int32 datatype,
int32 count, VOIDP values)
set attr for a vgroup
intn Vnattrs(int32 vgid)
number of attrs for a vgroup
intn Vfindattr(int32 vgid, char *attrname)
get index of an attribute with a given name
intn Vattrinfo(int32 vgid, intn attrindex, char *name,
int32 *datatype, int32 *count, int32 *size)
get info about an attribute
intn Vgetattr(int32 vgid, intn attrindex, VOIDP values)
get values of an attribute
int32 Vgetversion(int32 vgid)
get vset version of a vgroup
( int32 VSgetversion(int32 vsid) already exists.)
Changes in the vdata header in HDF files :
------------------------------------------
1. If attributes or other new features are assigned:
o version number will be VSET_NEW_VERSION (4,
defined in vg.h)
o the new DFTAG_VH looks like:
interlace number_records hdf_rec_size n_fields
2 bytes 4 2 2
datatype_field_n offset_field_n order_field_n fldnmlen_n
2*n_fields 2*n_fields 2*n_fields 2*n_fields
fldnm_n namelen name classlen class extag exref version
2 2 2 2 2
more flags < nattrs field_index attr0_tag/ref
2 4 4 4 2/2
field_index attr1_tag/ref ...> version more extra_byte
4 2/2
If no attributes or other new features were assigned,
version number is still VSET_VERSION and the old
vdata header will be written out.
2. In the old implementation the 'version' and 'more' fields
follow the 'exref' field. In order to not break existing
applications the new implementation keeps these two
fields and adds a duplication of 'version' and 'more'
at the end, along with an extra byte which was not
documented in the old documentation.
3. The field "flags" of uint32:
bit 0 -- has attr
bit 1 -- 15 -- unused.
o Fields follow the 'flags' are:
total_number_of_attrs this vdata has (4 bytes)
vs_attr_list (#_attrs * 8 bytes (4+2+2))
(field_index, attr_vdata_tag, attr_vdata_ref)
the flags and attribute fields are added after the
first 'more' fields.
Changes in the vgroup data in HDF files
---------------------------------------
1. If has attribute(s):
o add a flag field, uint16,
bit 0 -- has attr
bit 1-15 -- unused.
o version number will be changed to 4
o fields following the flag are:
number_of_attrs
vg_attr_list
the above fields are added preceding the version field
o vg_attr_list consists of a list of attribute_tag/ref
pairs
If no attribute:
No changes in vgroup data and version number is still 3
============================================================================
================================windows.txt=================================
Fortner Software LLC ("Fortner") created the reference implementation for
Windows of the HDF 4.1r3 library, providing C-language bindings to all
4.1r3 features.
The Windows reference implementation of the 4.1r3 library was implemented
and tested on a Pentium PC running Windows95 4.00.950 using Microsoft
Developers Studio 97 Visual C++ Version 5.00. The library has also been
run on Pentium PC running WindowsNT version 4.0.
Fortner cannot be certain that the libraries will run on other versions of
Windows or when built using other development tools. (In particular, this
Windows implementation has not addressed use with Windows 3.x, or non-PC
versions of WindowsNT). Migrating the Windows reference implementation to
other development and/or run-time environments is the responsibility of the
library user.
First-time HDF users are encouraged to read the FAQ in this release for
more information about HDF. Users can also look at the home page for HDF
at:
https://www.hdfgroup.org/
Please send questions, comments, and recommendations regarding the Windows
version of the HDF library to:
help@hdfgroup.org
============================================================================
|