[MINC-development] MINC 2.0.19/2.1 and HDF 1.6/1.8

Andrew Janke a.janke at gmail.com
Thu Mar 18 08:33:20 EDT 2010


> I haven't been following the HDF 1.6 vs 1.8 thing - but may I dare to ask,
> does supporting HDF 1.8 mean no longer supporting HDF 1.6?

Sort of.  Certainly the changes break things in both directions. There
now seems to be two versions of all functions. (the new ending with 2
and the old ending with 1). So you get diffs like this:

$ cvs diff -r 6.16 -r HEAD libsrc/hdf_convenience.c

...

-            H5Aiterate(var->dset_id, &i, hdf_copy_attr, (void *) new_dset_id);
+            H5Aiterate1(var->dset_id, &i, hdf_copy_attr, (void *) new_dset_id);

             H5Dclose(var->dset_id);
             H5Tclose(var->ftyp_id);
@@ -1186,7 +1186,7 @@

         /* Create the attribute anew.
          */
-        att_id = H5Acreate(loc_id, attnm, ftyp_id, spc_id, H5P_DEFAULT);
+        att_id = H5Acreate2(loc_id, attnm, ftyp_id, spc_id,
H5P_DEFAULT, H5P_DEFAULT);
     } H5E_END_TRY;

     if (att_id < 0)
@@ -1381,7 +1381,7 @@
     }

     H5E_BEGIN_TRY {
-        dst_id = H5Dcreate(fd, varpath, typ_id, spc_id, prp_id);
+        dst_id = H5Dcreate1(fd, varpath, typ_id, spc_id, prp_id);

In some cases the change is straight forward in others you have to go
read a *gasp* manual.

> Could not MINC 2.1 run equally with both versions?

Well the obvious answer is yes with a bit of configure tomfoolery and
a bunch of #ifdefs but I think you lot will know that I really
_really_ despise such code mods as it doesn't really fix anything,
just hides the problem until later.

> I know of several servers in the world I'm still connected to using these
> tools which will not be updated to new (or even current) distro versions any
> time soon - they don't have HDF 1.8.

<begin random musing>
ditto. Mind you with all this HDF5 change it makes me begin to wonder
about why we persist with the thing. I have since learnt that a HDF5
file _changes_ based upon the library version it was written with
(blark!).  Meaning if I write a "MINC" file with my version of HDF
(1.8), someone running a version of HDF5 before 1.4 can't read it.
Apparently backwards compatibility is always preserved though.  Dare I
suggest we shoehorn MINC into a Nifti-1 file with a bunch of custom
Nifti-1 headers?  The spec for these is now defined and you can have
as many of them as you like.
For one it'd certainly make us more "compatible" ;)
<end random musing>


--
Andrew Janke
(a.janke at gmail.com || http://a.janke.googlepages.com/)
Canberra->Australia    +61 (402) 700 883


More information about the MINC-development mailing list