changeset 2447:a684083a191d

* more build changed for 2.0.15
author rotor <rotor>
date Wed, 20 Feb 2008 05:08:32 +0000
parents 95e7da575e96
children 2dc40db0122d
files ChangeLog Makefile.am NEWS configure.in progs/Get_image_offset/get_image_offset.c
diffstat 5 files changed, 23 insertions(+), 99 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-15  Andrew L Janke <a.janke@gmail.com>
+	* Removed all fortran code (the subdirectory anyhow)
+	* removed get_image_offset.c as it will not work with MINC2
+	* updated configure.in and Makefile.am to suit
+	* changed --enable-minc2 to --disable-minc2
+
 2008-01-24  Andrew L Janke <a.janke@gmail.com>
 	* AUTHORS: added Claude Lepage
 	* progs/xfm/xfmconcat.c: Added a history patch from Mishkin Derakhshan
--- a/Makefile.am
+++ b/Makefile.am
@@ -230,15 +230,12 @@
 
 EXTRA_DIST = GETTING_STARTED \
 	$(m4_files) \
-	fortran \
 	progs/xfm/xfmflip.in \
 	libsrc/strdup.c \
-	progs/Get_image_offset/get_image_offset.c \
 	epm-header.in \
 	libsrc/config.h.msvc-win32 \
 	Makefile.msvc-win32 \
 	conversion/Acr_nema/dicom.txt \
-	WHATSNEW-2.0 \
 	INSTALL.minc \
 	CMakeLists.txt \
 	config.h.cmake \
@@ -250,12 +247,6 @@
 	cmake-modules/FindMINC.cmake \
 	cmake-modules/FindNETCDF.cmake
 
-# The fortran directory is not yet automakified, so it is just
-# listed in EXTRA_DIST.  This will copy everything including CVS
-# files.  We use this hook to get rid of the latter.
-dist-hook:
-	rm -rf $(distdir)/fortran/CVS $(distdir)/fortran/vms/CVS
-
 m4_files = \
 	m4/mni_REQUIRE_LIB.m4 \
 	m4/smr_WITH_BUILD_PATH.m4
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 
 		New in Release 2.0.15
         ---------------------
+* MINC2 is now built by default (or disabled with --diable-minc2).
 * Began to aggregate and update all docs for a clean(er) 2.1 release
 * Added cubic interpoation in mincresample for x-y slices
 * Fixed a seg-fault with null history strings
@@ -12,6 +13,12 @@
 * Added preservation of "patient name" in nii2mnc (where patient name 
    is the descriptor field in a nifti/analyze file)
 * xfmconcat now records history in the output file
+* removed all fortran build bits. This code was both out of date and
+   not ever built
+* removed get_image_offset as with a MINC2 file this would not work
+   as it was it wouldn't work that well with MINC1 let along MINC2
+* changed --enable-minc2 to --disable-minc2 in configure.ac
+   (come what may....)
 
 		New in Release 2.0.14
         ---------------------
--- a/configure.in
+++ b/configure.in
@@ -6,7 +6,7 @@
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS([config.h])
 
-AC_REVISION($Revision: 6.32 $)
+AC_REVISION($Revision: 6.33 $)
 
 AC_PROG_INSTALL
 AC_PROG_LN_S
@@ -33,17 +33,17 @@
 # Check for required C libraries
 mni_REQUIRE_LIB(m,[#include <math.h>],[double x = sqrt(3.);])
 mni_REQUIRE_LIB(netcdf,[#include <netcdf.h>],[int i = ncopen("",0);])
-AC_ARG_ENABLE(minc2,
-    [  --enable-minc2          enable HDF5 (MINC 2) functionality],
-    [ case "${enableval}" in
-      yes) minc2=true ;;
-      no)  minc2=false ;;
-      *) AC_MSG_ERROR(bad value ${enableval} for --enable-minc2) ;;
+AC_ARG_ENABLE(disminc2,
+    [  --disable-minc2          enable HDF5 (MINC 2) functionality],
+    [ case "${disableval}" in
+      yes) disminc2=true ;;
+      no)  disminc2=false ;;
+      *) AC_MSG_ERROR(bad value ${disableval} for --disable-minc2) ;;
       esac],
-    [minc2=false])
-AM_CONDITIONAL(MINC2, test x$minc2 = xtrue)
+    [disminc2=false])
+AM_CONDITIONAL(MINC2, test x$disminc2 = xfalse)
 
-if test x$minc2 = xtrue; then
+if test x$disminc2 = xfalse; then
 mni_REQUIRE_LIB(z, [#include <zlib.h>],[compress2;])
 mni_REQUIRE_LIB(hdf5,[#include <hdf5.h>],[int f = H5Fopen("",0,H5P_DEFAULT);])
 AC_DEFINE_UNQUOTED([MINC2],[1],[Define if MINC 2.0 is enabled.])
deleted file mode 100644
--- a/progs/Get_image_offset/get_image_offset.c
+++ /dev/null
@@ -1,80 +0,0 @@
-#include <minc.h>
-#include <local_nc.h>
-
-#define public
-
-public long get_var_offset(int cdfid, char *variable);
-
-int main(int argc, char *argv[])
-{
-   int cdfid;
-   long offset;
-   char *file;
-   char *variable = MIimage;
-
-   /* Check arguments */
-   if (argc < 2 || argc > 3) {
-      (void) fprintf(stderr, "Usage: %s [<varname>] <filename.mnc>\n", 
-                     argv[0]);
-      return -1;
-   }
-   else if (argc == 2) {
-      file = argv[1];
-   }
-   else {
-      variable = argv[1];
-      file = argv[2];
-   }
-
-   /* Open minc file */
-   cdfid = ncopen(file, NC_NOWRITE);
-
-   /* Get the offset */
-   offset = get_var_offset(cdfid, variable);
-   if (offset == -1) {
-      (void) fprintf(stderr, "Error getting offset to %s in file %s\n",
-                     variable, file);
-      return -1;
-   }
-
-   (void) printf("%ld\n", offset);
-
-   return 0;
-}
-
-/* ----------------------------- MNI Header -----------------------------------
-@NAME       : get_var_offset
-@INPUT      : path - name of minc file
-              variable - name of variable to locate
-@OUTPUT     : (none)
-@RETURNS    : offset to variable data in minc file or MI_ERROR (-1) if an
-              error occurs.
-@DESCRIPTION: Function to return the offset to the image data in a minc file.
-              WARNING: This function may be hazardous to your health since
-              it directly accesses NetCDF internals!!!!! Use at your own
-              risk.
-@METHOD     : 
-@GLOBALS    : 
-@CALLS      : 
-@CREATED    : September 9, 1994 (Peter Neelin)
-@MODIFIED   : August 23, 2001 (P.N.)
-                 - allow use with other variables
----------------------------------------------------------------------------- */
-public long get_var_offset(int cdfid, char *variable)
-{
-   int imgid;
-   NC *handle;
-   NC_var *vp;
-
-   imgid = ncvarid(cdfid, variable);
-   if (imgid == MI_ERROR) return MI_ERROR;
-
-   handle = NC_check_id(cdfid);
-   if (handle == NULL) return MI_ERROR;
-
-   vp = NC_hlookupvar(handle, imgid);
-   if (vp == NULL) return MI_ERROR;
-
-   return (long) vp->begin;
-}
-