*** CHANGES TO VERSION 1.3 *** 1. Renames GetSDS/PutSDS/AddSDS to ReadSDS/WriteSDS/AppendSDS anticipating Version 2.0 2. Using newly documented MathLink calls MLGetFloatArray, etc. Therefore the array need not be Flattened for WriteSDS or AppendSDS nor do we need the MakeTensor function, which has been removed. 3. Various memory leaks have been plugged. 4. Reminder: the Mac version (as shipped) is compiled to require 020/FPU. Unfortunately, I'm naughty and not calling Gestalt to check for required hardware. 5. COMING IN 2.0 - the ability to: * read and write 8-bit (RIS8) and 24-bit (RIS24) raster images * read all images of a given type in one call * convert among SDS, RIS8, RIS24 data * directly extract labels from the HDF file for Mathematica plots 6. This code works with HDF 3.1r5 and 3.2r3. It hasn't been checked for other versions, but should work fine. It requires the MathLink libraries accompanying Mathematica 2.1 or higher and was tested with Mathematica 2.2. *** CHANGES TO VERSION 1.3 *** *** CHANGES FROM VERSION 1.0 TO VERSION 1.1 *** 1. Changes made by Doug Stein of Wolfram Research, Inc. My address is doug@wri.com 2. Errors reported via MathLink rather than fprintf to stderr 3. All errors now have a symbol::tag pair and are handled as "normal" messages 4. Upon encountering an error in the C code, GetSDS, AddSDS, PutSDS will properly return $Failed. 5. mathhdf now builds on a Macintosh. Its makefile is called mathhdf.make 6. One or two minor bugs caught by Apple MPW C compiler are fixed. *** CHANGES FROM VERSION 1.0 TO VERSION 1.1 *** This directory contains the source code for Version 1.0 of MathHDF. MathHDF is a (still) simple Mathematica - HDF interface, which uses MathLink. Author: Pekka Janhunen, Finnish Meteorological Institute, Geophysics Department, email: Pekka.Janhunen@fmi.fi. There are also 3 test HDF SDS files so that you can start playing with GetSDS immediately! More files, as well as the original software and other interesting software, can be found on the anonymous ftp server at sumppu.fmi.fi. Installation: ------------- The current Makefile is for a SGI IRIS4D system. You must have the HDF libraries and include files installed, as well as Mathematica running in your machine. The MathLink compilation script mcc must be in your shell's search path. (At least on our system, the mcc script shipped did not work because there were spaces between options and args in the cc command but it was easy to fix). Modify the Makefile according to where your HDF files are installed. If successful, the Make will produce the executable mathhdf, which can be installed from Mathematica with command Install["mathhdf"], or with a complete path name if not in the current directory. After the Install command, try ?GetSDS, which should give a usage message. MathHDF 1.0 defines the functions GetSDS, PutSDS and AddSDS for importing and exporting HDF SDS datasets within Mathematica. You can tell GetSDS to read eg. nth dataset in a file, or dataset with a given label. It is also possible to skip over some data points using an interleave parameter, eg. if interleave is 4 and the HDF file contains a 100x100 SDS matrix, GetSDS actually returns a 25x25 matrix--this is potentially useful in debugging phase because it saves time. GetSDS returns a multi-level list if the data- set is multidimensional. Copyright --------- You are free to copy and distribute the program with no charge. If you modify it, you should document the changes properly. Note ---- Since this program relies on many different software packages, all of which are continuously developing--namely HDF, Mathematica and MathLink-- we can not guarantee anything. If you encounter problems, you should first try to fix them by your own before contacting the author. However you are encouraged to mail your own suggestions for additions (for example, the current release does not support raster images at all) to the author, who may or may not find them worth programming. In any case, we are probably waiting for the next major HDF release (3.2) before the next release.