[MINC-development] default file type (HDF5 vs NetCDF)

Robert VINCENT bert at bic.mni.mcgill.ca
Wed May 31 11:00:37 EDT 2006


Hi,

I had coded it this way specifically to avoid having programs like
rawtominc default to MINC 2.0 format. My intent was that a user would have
to make the decision to change all of their files to MINC 2.0 format, and
then all subsequent tools would automatically honor this decision. But I
didn't want a user to get a MINC 2.0 file without knowing they'd asked for
it.

If the general feeling is that MINC 2.0 is working for people, then I
don't object to this change. I just didn't want to force the new format
onto the world, especially in environments where MINC 2.0 format support
might be incomplete.

	-bert

If people feel that
On Wed, 31 May 2006, Jonathan HARLAP wrote:

> Heylas,
>
> I know I've raised this before, but now that I understand what's going
> on a little better I'd like to propose a small change:
>
> In libsrc/netcdf_convenience.c the function micreatex reads:
>
>      if ((cmode & MI2_CREATE_V1) != 0) {
>          fd = nccreate(path, cmode);
>      }
>      else if (miget_cfg_bool(MICFG_FORCE_V2) || (cmode & MI2_CREATE_V2)
> != 0) {
> 	fd = hdf_create(path, cmode, opts_ptr);
>      }
>      else {
>          if (mi_nc_files == 0 && mi_h5_files != 0) {
>              /* Create an HDF5 file. */
>              fd = hdf_create(path, cmode, opts_ptr);
>          }
>          else {
>              /* Create a NetCDF file. */
>              fd = nccreate(path, cmode);
>          }
>      }
>
>
> I propose changing the line "if (mi_nc_files == 0 && mi_h5_files != 0)"
> to read " if (mi_nc_files == 0)"
>
> The reason is that currently the code will default to creating HDF5
> files only if a program has already opened an HDF5 file.  The change
> proposed would make it such that the library will only create CDF files
> if a program has already opened a CDF file.  This won't influence any of
> the minc tools normally used on a day-to-day basis, but will change the
> default output of file format converters that don't read any minc files
> before creating an output file.
>
> I didn't put this in CVS yet as I don't know what your process is for
> getting this kind of functionality change into the library.
>
> Cheers,
> J
> _______________________________________________
> MINC-development mailing list
> MINC-development at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development
>



More information about the MINC-development mailing list