r57: Added G2 library support
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 24 May 2000 22:47:47 +0000 (22:47 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 24 May 2000 22:47:47 +0000 (22:47 +0000)
ChangeLog
Makefile.am
README
acconfig.h
config.h.in
configure.in

index e1f98df8ad26dd5f1e0d2ddd9674a17c7d17ca02..1b6028d2803b73d179585ede9df856812c7e2f96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+0.5.4-b2 - 5/16/2000
+   Added compile-time configuration of endian order
+
 0.5.4-b1 - 5/14/2000
    Modified the raysum file format to be platform independent
        
index cbe2168a7761492d48127171b22e963d9cce1afd..f6df4d16c9d6bde8d2634e65792eab794d97f32c 100644 (file)
@@ -4,7 +4,7 @@ else
 EXTRA_DIRS1=
 endif
 
-if HAVE_INTERACTIVE_GRAPHICS
+if HAVE_SGP
 EXTRA_DIRS2=libezplot libgraph
 else
 EXTRA_DIRS2=
diff --git a/README b/README
index 30cca644c069f0aa47ca0bf86407f83ec2c33730..a149b8722692f33420215b50703537137f0167d3 100644 (file)
--- a/README
+++ b/README
@@ -90,9 +90,55 @@ INSTALL file.
 
 There is a sample shell script installed called 'sample-ctrec'.
 
+HDF FILE FORMAT
+===============
+
+If the HDF library is compiled into CTSim, it will be used for the
+raysum and image files.
+
+Reconstruction Groups
+---------------------
+Group Name="Recon"
+  SubDataset="ReconParam"
+  SubGroup="Proj"
+    SubDataset="Raysum"
+    SubDataset="Geometry"
+  SubGroup="Phantom"
+    SubDataset "FImage"
+  SubGroup="Reconstr"
+    SubDataset "FImage"
+
+Image Dataset
+-------------
+Name="FImage"
+DataType: FLOAT
+Attributes: 
+  "XSize" DOUBLE : X size of pixel in world coordinates
+  "YSize" DOUBLE : Y size of pixel in world coordinates
+
+
+Raysum Group
+-------------
+Group Name="Proj"
+Proj Dataset
+  Name="Raysum"
+  DataType: FLOAT
+  Dim: 2 (nviews x ndet)
+  Attributes:
+Geometry Dataset
+  Name="Geometry"
+  DataType: FLOAT
+  Dim: 1  (nviews x 1)
+  Data: For each view, store view_angle
+  Attributes: 
+    "GEOMCODE" INT : Geometry Code
+    "DETSTART"
+    "DETINC"
+    "ROTSTART"
+    "ROTINC"
 
 CLOSING
--------
+=======
 
 Please enjoy CTSim. I'd like to hear any feedback
 
index ce38590c91c9152c8bf316976780a5f2000d7c8a..d93656c14462748043f21d524a22c81538c469f8 100644 (file)
 #undef HAVE_PNG
 
 /* Define is have interactive graphics */
-#undef HAVE_INTERACTIVE_GRAPHICS
+#undef HAVE_SGP
+
+/* Define for G2 library */
+#undef HAVE_G2_H
+
+/* Define for X11 library */
+#undef HAVE_X11
index 04441f5bb56c862ceb85c9e271b035d972f76b9b..174a6dcfdcbf80b4c8e0de562f525bec3c9a58fa 100644 (file)
 #undef HAVE_PNG
 
 /* Define is have interactive graphics */
-#undef HAVE_INTERACTIVE_GRAPHICS
+#undef HAVE_SGP
+
+/* Define for X11 library */
+#undef HAVE_X11
 
 /* Define if you have the htonl function.  */
 #undef HAVE_HTONL
@@ -66,6 +69,9 @@
 /* Define if you have the <fcntl.h> header file.  */
 #undef HAVE_FCNTL_H
 
+/* Define if you have the <g2.h> header file.  */
+#undef HAVE_G2_H
+
 /* Define if you have the <getopt.h> header file.  */
 #undef HAVE_GETOPT_H
 
index 6598a8d485b1eefec912e4dbe8d47304ff526028..5f804d593ceb292e56166921caec0052b4990444 100644 (file)
@@ -4,7 +4,7 @@ dnl Must reset CDPATH so that bash's cd does not print to stdout
 dnl CDPATH=
 
 AC_INIT(src/ctrec.c)
-AM_INIT_AUTOMAKE(ctsim,0.5.4-b1)
+AM_INIT_AUTOMAKE(ctsim,0.5.4-b2)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
@@ -15,6 +15,34 @@ AC_PROG_RANLIB
 AC_PROG_CC
 AC_PROG_CXX
 
+dnl Check for C operation
+AC_CANONICAL_HOST 
+dnl AC_C_BIGENDIAN
+dnl AC_C_INLINE
+dnl AC_CHECK_SIZEOF(int)
+dnl AC_CHECK_SIZEOF(long int)
+dnl AC_CHECK_SIZEOF(float)
+dnl AC_CHECK_SIZEOF(double)
+
+AC_MSG_CHECKING(endian)
+
+case "$host_cpu" in
+i386* | i486* | i586* | i686* | vax*) 
+   endian=low 
+   CFLAGS="$CFLAGS -DENDIAN_LOW=1 -DENDIAN_HIGH=0"
+   AC_MSG_RESULT(low) 
+   ;;
+sparc*  | mot*) 
+  endian=high 
+   CFLAGS="$CFLAGS -DENDIAN_LOW=0 -DENDIAN_HIGH=1"
+  AC_MSG_RESULT(high) 
+  ;;
+*) 
+  AC_MSG_ERROR([Unknown host cpu $host_cpu
+Can't set endian])
+  ;;
+esac
+
 dnl Checks for libraries.
 AC_CHECK_LIB(z, main, 
 [
@@ -27,10 +55,11 @@ AC_CHECK_LIB(z, main,
 AC_CHECK_LIB(m, main)
 AC_CHECK_LIB(curses, main, [curses=true], [curses=false])
 AC_CHECK_LIB(ncurses, main, [ncurses=true], [ncurses=false])
+AC_CHECK_LIB(g2, main, [g2=true], [g2=false])
  
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h)
+AC_CHECK_HEADERS(fcntl.h unistd.h getopt.h sys/fcntl.h setjmp.h stdarg.h stddef.h sys/types.h sys/stat.h string.h ctype.h math.h stdio.h netinet/in.h inttypes.h sys/param.h stdint.h stdlib.h g2.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -273,11 +302,16 @@ AM_CONDITIONAL(NO_X, test "x$no_x" = "xyes")
 my_includes="$my_includes -I../include -I.."
 AC_SUBST(my_includes)
 
+AC_MSG_CHECKING([interactive graphics])
 if test "x$no_x" != "xyes" ; then
-  AC_DEFINE(HAVE_INTERACTIVE_GRAPHICS)
-  AM_CONDITIONAL(HAVE_INTERACTIVE_GRAPHICS, test 1==1)
-  LDFLAGS="$LDFLAGS -L../libezplot -L../libgraph"
-  ctlibs_base="$ctlibs_base -lezplot -lgraph"
+  AC_DEFINE(HAVE_SGP)
+  AC_DEFINE(HAVE_X11)
+  AM_CONDITIONAL(HAVE_SGP, test 1==1)
+  LDFLAGS="$LDFLAGS -L../libezplot -L../libgraph -L/usr/X11R6/lib"
+  ctlibs_base="$ctlibs_base -lezplot -lgraph $X_BASIC_LIBS $X_TOOLKIT_LIBS"
+  AC_MSG_RESULT(yes)
+else
+  AC_MSG_RESULT(no)
 fi
 
 dnl Setting projet libraries and includes
@@ -289,6 +323,10 @@ fi
 if test "$zlib" = "true" ; then
   ctlibs_base="$ctlibs_base -lz"
 fi
+if test "$g2" = "true" ; then
+  ctlibs_base="$ctlibs_base -lg2"
+fi
+
 ctlibs="-lir $ctlibs_base"
 
 AC_SUBST(ctlibs)