From 6404682526633f7f2b9a2f94071d802b7b50dd07 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sat, 3 Jun 2000 06:29:57 +0000 Subject: [PATCH] r64: *** empty log message *** --- ChangeLog | 5 ++++ INSTALL | 18 ++++++++++-- README | 47 +----------------------------- TODO | 73 ++++++++++++++++++++++++++++++++++++++++++++++- config.h.in | 22 ++++++++++++++ configure.in | 40 +++++++++++++++----------- include/ir.h | 7 +++-- include/kstddef.h | 18 ++++++++++-- man/ctsim.texi | 24 ++++++++++------ src/sdf2img.c | 11 +++++-- 10 files changed, 182 insertions(+), 83 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b6028d..7b9e5f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +0.5.4-b3 - 6/1/2000 + Added support for 64-bit (IA64) CPU + Removed broken B-spline interpolation + Added support for cygwin platform under Windows 2000 + 0.5.4-b2 - 5/16/2000 Added compile-time configuration of endian order diff --git a/INSTALL b/INSTALL index e87625f..793157f 100644 --- a/INSTALL +++ b/INSTALL @@ -37,16 +37,28 @@ CTSim Specific Configuration Help --with-html-dir=PATH Set directory of html files --with-x use the X Window System for interactive graphics -Platforms Supported -------------------- + +PLATFORM SPECIFIC NOTES +======================= + +Platforms Tested +---------------- Recent development is with GNU/Linux. I have tested compilation on -FreeBSD v4.0, BSD/OS v3.0, and Solaris v8, and Microsoft Visual C++ v6. +FreeBSD v4.0, BSD/OS v3.0, and Solaris v8 (gcc 32-bit), and IA64 (gcc) +, and Microsoft Windows 2000 (Visual C++ 6.0 and cygwin). Microsoft Windows Installation ------------------------------ Run make.bat from the root directory +CYGWIN v1.1.0 +------------- +The file /usr/i686-pc-wygwin/include/cygwin/in.h has a bug. The line + struct in_addr6 sin6_addr; +should be deleted. +getopt_long appears broken, configure.in checks for cygwin to use +bundled version of getopt_long. Basic Installation ================== diff --git a/README b/README index a149b87..5e16d8e 100644 --- a/README +++ b/README @@ -90,52 +90,6 @@ 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 ======= @@ -146,3 +100,4 @@ Kevin M. Rosenberg, M.D. kevin@rosenberg.net + diff --git a/TODO b/TODO index dc92206..6aad0ba 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,78 @@ +MISCELLANEOUS +============= + Integrate low-level X11 graphics, replace all low-level driver code in libgraph. All the high-level graphics routines are in place. -Make data file formats cross-platform compatible +Make SDF file format cross-platform compatible Integrate audio drivers into libcio -- used for the interactive CT display. +PROPOSED MENU STRUCTURE +======================= +File + New + Phantom + Open + SDF + +Process + Simulate CT process (active only when phantom outline shown) + Rasterize Phantom (active only when phantom outline shown) + Reconstruct CT data (active only when raysum data is shown) + +Filter + (Various single and dual image transformations) + +Compare + Compare 2 images + 2D grayscale subtraction + 1D column plots + Single Image statistics + +PROPOSED 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" diff --git a/config.h.in b/config.h.in index 174a6dc..1d09dc5 100644 --- a/config.h.in +++ b/config.h.in @@ -9,6 +9,9 @@ /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + /* Define to `long' if doesn't define. */ #undef off_t @@ -21,6 +24,10 @@ /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING @@ -45,6 +52,21 @@ /* Define for X11 library */ #undef HAVE_X11 +/* The number of bytes in a double. */ +#undef SIZEOF_DOUBLE + +/* The number of bytes in a float. */ +#undef SIZEOF_FLOAT + +/* The number of bytes in a int. */ +#undef SIZEOF_INT + +/* The number of bytes in a long. */ +#undef SIZEOF_LONG + +/* The number of bytes in a short. */ +#undef SIZEOF_SHORT + /* Define if you have the htonl function. */ #undef HAVE_HTONL diff --git a/configure.in b/configure.in index 5f804d5..4efaad3 100644 --- a/configure.in +++ b/configure.in @@ -1,10 +1,10 @@ -dnl Process this file with autoconf to produce a configure script. +IZEOFdnl Process this file with autoconf to produce a configure script. 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-b2) +AM_INIT_AUTOMAKE(ctsim,0.5.4-b3) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -15,14 +15,19 @@ AC_PROG_RANLIB AC_PROG_CC AC_PROG_CXX + +dnl AC_MSG_CHECKING([that the compiler works]) +dnl AC_TRY_RUN([ main(int ac, char **av) { return 0; } ], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.), AC_MSG_ERROR(Could not compile and run even a trivial ANSI C program - check CC.)) + 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_C_BIGENDIAN +AC_C_INLINE +AC_CHECK_SIZEOF(short, 2) +AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF(long, 4) +AC_CHECK_SIZEOF(float, 4) +AC_CHECK_SIZEOF(double, 8) AC_MSG_CHECKING(endian) @@ -32,14 +37,13 @@ i386* | i486* | i586* | i686* | vax*) CFLAGS="$CFLAGS -DENDIAN_LOW=1 -DENDIAN_HIGH=0" AC_MSG_RESULT(low) ;; -sparc* | mot*) +sparc* | mot* | ia64*) 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]) + AC_MSG_WARN([Unknown host cpu $host_cpu. Can't set endian]) ;; esac @@ -72,18 +76,18 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS(strtod strtol snprintf htonl) AC_CHECK_FUNC(basename) AC_CHECK_FUNC(setjmp) -AC_CHECK_FUNC(getopt_long, -[ - getopt_long=true -], -[ +if ${OSTYPE} == "cygwin" ; then getopt_long=false +else + AC_CHECK_FUNC(getopt_long, [ getopt_long=true ], [ getopt_long=false ]) +fi +if test getopt_long == "false" ; then my_includes="$myincludes -I../getopt" AC_DEFINE(HAVE_GETOPT_LONG) ctlibs_base="$ctlibs_base -lgetopt" LDFLAGS="$LDFLAGS -L../getopt" AM_CONDITIONAL(INCLUDED_GETOPT_LONG, test 1==1) -]) +fi AC_ADD_GCC_CFLAGS([-Wall]) @@ -201,6 +205,8 @@ if test "$withval" != "no" ; then fi done AC_MSG_RESULT($lamdir) +else + AC_MSG_RESULT([no]) fi AC_MSG_CHECKING([for web access]) diff --git a/include/ir.h b/include/ir.h index cf8b6a0..652e5cb 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.16 2000/05/24 22:48:17 kevin Exp $ +** $Id: ir.h,v 1.17 2000/06/03 06:29:08 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.17 2000/06/03 06:29:08 kevin +** *** empty log message *** +** ** Revision 1.16 2000/05/24 22:48:17 kevin ** First functional version of SDF library for X-window ** @@ -364,7 +367,7 @@ const static int RAYSUM_TRACE_ROW_ATTEN=18; void usage (const char *program); /* From reconstr.c */ -IMAGE *image_reconst (IMAGE *im, RAYSUM *rs, int filt_type, double filt_param, const InterpolationType interp_type, int interp_param, const BackprojType backproj_type, int const ir_trace); +IMAGE *image_reconst (IMAGE *im, RAYSUM *rs, const FilterType filt_type, double filt_param, InterpolationType interp_type, int interp_param, const BackprojType backproj_type, int const ir_trace); /* From bproj.c */ void backproj_init (const RAYSUM *rs, IMAGE *im, const BackprojType bproj_method); diff --git a/include/kstddef.h b/include/kstddef.h index b6ad48f..2f13492 100644 --- a/include/kstddef.h +++ b/include/kstddef.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kstddef.h,v 1.10 2000/05/16 04:33:17 kevin Exp $ +** $Id: kstddef.h,v 1.11 2000/06/03 06:29:08 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.11 2000/06/03 06:29:08 kevin +** *** empty log message *** +** ** Revision 1.10 2000/05/16 04:33:17 kevin ** Updated documentation ** @@ -45,6 +48,7 @@ ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ + /****************************************************************************** * * FILE IDENTIFICATION @@ -250,8 +254,16 @@ char *td_day_name(int n); /* netorder.c */ void *strreverse (void *dest, const void *src, size_t n); -int read_nlong (unsigned long int *n, int fd); -int write_nlong (unsigned long int const *n, int fd); +#if SIZEOF_SHORT == 4 +int read_n32bint (unsigned short *n, int fd); +int write_n32bint (unsigned short const *n, int fd); +#elif SIZEOF_LONG == 4 +int read_n32bint (unsigned long *n, int fd); +int write_n32bint (unsigned long const *n, int fd); +#else +int read_n32bint (unsigned int *n, int fd); +int write_n32bint (unsigned int const *n, int fd); +#endif int read_nfloat (float *f, int fd); int write_nfloat (float const *f, int fd); int read_ndouble (double *d, int fd); diff --git a/man/ctsim.texi b/man/ctsim.texi index 0d49610..f024f08 100644 --- a/man/ctsim.texi +++ b/man/ctsim.texi @@ -1,4 +1,4 @@ -\input texinfo @c -*-texinfo-*- +input texinfo @c -*-texinfo-*- @c %**start of header @setfilename ctsim.info @settitle CTSim Manual @@ -27,17 +27,20 @@ Copyright @copyright{} 2000 Kevin Rosenberg @comment node-name, next, previous, up @menu -* Computed Tomgraphy Overview:: The first chapter is the - only chapter in this sample. +* Computed Tomography Overview:: The first chapter +* Algorithms:: Algorithms used by this program * Concept Index:: This index has two entries. @end menu -@node Computed Tomgraphy Overview, Concept Index, Top, Top +@node Computed Tomography Overview, Algorithms, Top, Top @comment node-name, next, previous, up -@chapter Computed Tomgraphy Overview -@cindex Sample index entry +@chapter Computed Tomography Overview +@cindex Overview + +@section Overview +Computed Tomography is a process to reconstruction internal images of +an object by taking projection data through that object. -This is the contents of the first chapter. @cindex Another sample index entry Here is a numbered list. @@ -55,7 +58,12 @@ commands transform a Texinfo file such as this into an Info file; and @TeX{} typesets it for a printed manual. -@node Concept Index, , Computed Tomgraphy Overview, Top +@node Algorithms , Concept Index , Computed Tomography Overview , Top + +@section Theory +This is great. + +@node Concept Index, , Algorithms , Top @comment node-name, next, previous, up @unnumbered Concept Index diff --git a/src/sdf2img.c b/src/sdf2img.c index e51d788..f79b2cd 100644 --- a/src/sdf2img.c +++ b/src/sdf2img.c @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sdf2img.c,v 1.4 2000/05/24 22:50:04 kevin Exp $ +** $Id: sdf2img.c,v 1.5 2000/06/03 06:29:57 kevin Exp $ ** $Log: sdf2img.c,v $ +** Revision 1.5 2000/06/03 06:29:57 kevin +** *** empty log message *** +** ** Revision 1.4 2000/05/24 22:50:04 kevin ** Added support for new SGP library ** @@ -448,9 +451,11 @@ sdf2img_main (int argc, char *const argv[]) sdf2d_to_gif (im, out_file, opt_scale, opt_scale, densmin, densmax); #endif else if (opt_format == O_FORMAT_DISP) { - int gid = image_display_scale (im, opt_scale, densmin, densmax); +#if HAVE_SGP + image_display_scale (im, opt_scale, densmin, densmax); cio_kb_getc(); - g2_close(gid); + sgp2_close(sgp2_get_active_win()); +#endif } else { -- 2.34.1