From 35bc3e7cef4318d9a43344b651f751ee128202d2 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 24 May 2000 22:47:47 +0000 Subject: [PATCH] r57: Added G2 library support --- ChangeLog | 3 +++ Makefile.am | 2 +- README | 48 +++++++++++++++++++++++++++++++++++++++++++++++- acconfig.h | 8 +++++++- config.h.in | 8 +++++++- configure.in | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 6 files changed, 109 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1f98df..1b6028d 100644 --- 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 diff --git a/Makefile.am b/Makefile.am index cbe2168..f6df4d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 30cca64..a149b87 100644 --- 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 diff --git a/acconfig.h b/acconfig.h index ce38590..d93656c 100644 --- a/acconfig.h +++ b/acconfig.h @@ -53,4 +53,10 @@ #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 diff --git a/config.h.in b/config.h.in index 04441f5..174a6dc 100644 --- a/config.h.in +++ b/config.h.in @@ -40,7 +40,10 @@ #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 header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_G2_H + /* Define if you have the header file. */ #undef HAVE_GETOPT_H diff --git a/configure.in b/configure.in index 6598a8d..5f804d5 100644 --- a/configure.in +++ b/configure.in @@ -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) -- 2.34.1