From 92446cc445611619e1c796d269b559f89377dfe5 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 5 May 2002 05:31:16 +0000 Subject: [PATCH] r1938: *** empty log message *** --- ChangeLog | 1 + Makefile.in | 11 ++++++++--- debian/README.Debian | 7 +++++-- debian/copyright | 15 ++++++--------- helical/Makefile.in | 46 +++++++++++--------------------------------- src/views.cpp | 42 +++++++++++++++++++++++++--------------- 6 files changed, 57 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4dae56e..c8b61c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ Bug Fixes: + * views.cpp: reduced calls to progress bar update, significant speedup * views.cpp,ctsim.cpp: Fixed bug with window frames sometimes not being displayed on Unix platforms. * views.cpp: Added out-of-memory checks to display for huge diff --git a/Makefile.in b/Makefile.in index b729f8a..8ed402f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -96,7 +96,7 @@ wxlibs = @wxlibs@ @HAVE_WXWINDOWS_TRUE@EXTRA_DIRS3 = src @HAVE_WXWINDOWS_FALSE@EXTRA_DIRS3 = -SUBDIRS = man doc libctsupport libctsim html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_DIRS2) $(EXTRA_DIRS3) tools helical +SUBDIRS = man libctsupport libctsim html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_DIRS2) $(EXTRA_DIRS3) tools helical EXTRA_DIST = acsite.m4 make.bat msvc/ctsim.dsw msvc/ctsimtext/ctsimtext.dsp msvc/libctsim/libctsim.dsp msvc/ctsim/ctsim.dsp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -113,8 +113,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best -DIST_SUBDIRS = man doc libctsupport libctsim html cgi-bin include \ -getopt libctgraphics src tools helical +DIST_SUBDIRS = man libctsupport libctsim html cgi-bin include getopt \ +libctgraphics src tools helical all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) @@ -329,6 +329,8 @@ install-exec-am: install-exec: install-exec-recursive install-data-am: + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-data: install-data-recursive install-am: all-am @@ -388,6 +390,9 @@ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean +install-data-hook: + install -g root -o root -m 0644 docs/ctsim.htb $(datadir) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/debian/README.Debian b/debian/README.Debian index c16ec56..8b9f17c 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -1,6 +1,9 @@ This is the CTSim system packaged for Debian. -Anonymous CVS for this code is available at: -:pserver:anoncvs@cvs.ctsim.org:/pubcvs ctsim +The home site for CTSim is http://www.ctsim.org. The package +may be downloaded from that site. + +CTSim has been packaged by Kevin M. Rosenberg who is also the +upstream author. Kevin Rosenberg , Thu, 25 Apr 2002 19:13:41 -0600 diff --git a/debian/copyright b/debian/copyright index d58965c..5fb0efa 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,11 +1,8 @@ -The home site for CTSim is http://www.ctsim.org. The package -may be downloaded from that site. - -CTSim has been packaged by Kevin M. Rosenberg who is also the -upstream author. - -Copyright: - CTSim is Copyright (C) 1993-2002 by Kevin M. Rosenberg, M.D. -CTSim is governed by the GNU GPL License. +CTSim is governed by the GNU GPL License which is located at on +the file system in /usr/share/common-licenses/GPL. + +CTSim is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/helical/Makefile.in b/helical/Makefile.in index 23cbbcb..990f2d8 100644 --- a/helical/Makefile.in +++ b/helical/Makefile.in @@ -90,12 +90,10 @@ wxcflags = @wxcflags@ wxconfig = @wxconfig@ wxlibs = @wxlibs@ -bin_SCRIPTS = sample-helical.sh +CLEANFILES = \*.pgm \*.if \*~ \*.pj \.*~ \#\*\# \#\*~ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = sample-helical.sh -SCRIPTS = $(bin_SCRIPTS) - DIST_COMMON = Makefile.am Makefile.in sample-helical.sh.in @@ -114,25 +112,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) sample-helical.sh: $(top_builddir)/config.status sample-helical.sh.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - else if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - else :; fi; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - list='$(bin_SCRIPTS)'; for p in $$list; do \ - rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ - done tags: TAGS TAGS: @@ -165,7 +144,7 @@ check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am -install-exec-am: install-binSCRIPTS +install-exec-am: install-exec: install-exec-am install-data-am: @@ -174,19 +153,19 @@ install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am -uninstall-am: uninstall-binSCRIPTS +uninstall-am: uninstall: uninstall-am -all-am: Makefile $(SCRIPTS) +all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: - $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) @@ -211,16 +190,13 @@ maintainer-clean-am: maintainer-clean-generic distclean-am maintainer-clean: maintainer-clean-am -.PHONY: uninstall-binSCRIPTS install-binSCRIPTS tags distdir info-am \ -info dvi-am dvi check check-am installcheck-am installcheck \ -install-exec-am install-exec install-data-am install-data install-am \ -install uninstall-am uninstall all-redirect all-am all installdirs \ -mostlyclean-generic distclean-generic clean-generic \ -maintainer-clean-generic clean mostlyclean distclean maintainer-clean - +.PHONY: tags distdir info-am info dvi-am dvi check check-am \ +installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean -realclean: - rm -f *.pgm *.if *~ *.pj # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/views.cpp b/src/views.cpp index 3a91f6e..3f7db0b 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: views.cpp,v 1.153 2002/05/03 09:57:41 kevin Exp $ +** $Id: views.cpp,v 1.154 2002/05/05 05:31:16 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -58,6 +58,8 @@ #include #endif +// Used to reduce calls to progress bar update function +const short int ITER_PER_UPDATE = 10; // ImageFileCanvas @@ -2155,10 +2157,11 @@ PhantomFileView::OnProjections (wxCommandEvent& event) for (int i = 0; i < pProj->nView(); i++) { //theScanner.collectProjections (*pProj, rPhantom, i, 1, true, m_iDefaultTrace); theScanner.collectProjections (*pProj, rPhantom, i, 1, theScanner.offsetView(), true, m_iDefaultTrace); - if (! dlgProgress.Update (i+1)) { - delete pProj; - return; - } + if ((i + 1) % ITER_PER_UPDATE == 0) + if (! dlgProgress.Update (i+1)) { + delete pProj; + return; + } } } } @@ -2222,15 +2225,21 @@ PhantomFileView::OnRasterize (wxCommandEvent& event) { ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY); - wxProgressDialog dlgProgress (wxString("Rasterize"), wxString("Rasterization Progress"), - pImageFile->nx() + 1, getFrameForChild(), wxPD_CAN_ABORT ); + wxProgressDialog dlgProgress (wxString("Rasterize"), + wxString("Rasterization Progress"), + pImageFile->nx() + 1, + getFrameForChild(), + wxPD_CAN_ABORT ); Timer timer; for (unsigned int i = 0; i < pImageFile->nx(); i++) { - rPhantom.convertToImagefile (*pImageFile, m_dDefaultRasterViewRatio, m_iDefaultRasterNSamples, Trace::TRACE_NONE, i, 1, true); - if (! dlgProgress.Update (i+1)) { - delete pImageFile; - return; - } + rPhantom.convertToImagefile (*pImageFile, m_dDefaultRasterViewRatio, + m_iDefaultRasterNSamples, Trace::TRACE_NONE, + i, 1, true); + if ((i + 1) % ITER_PER_UPDATE == 0) + if (! dlgProgress.Update (i+1)) { + delete pImageFile; + return; + } } ImageFileDocument* pRasterDoc = theApp->newImageDoc(); @@ -2924,10 +2933,11 @@ ProjectionFileView::doReconstructFBP (const Projections& rProj, bool bRebinToPar for (int iView = 0; iView < rProj.nView(); iView++) { pReconstructor->reconstructView (iView, 1); - if (! dlgProgress.Update (iView + 1)) { - delete pReconstructor; - return; // don't make new window, thread will do this - } + if ((iView + 1) % ITER_PER_UPDATE == 0) + if (! dlgProgress.Update (iView + 1)) { + delete pReconstructor; + return; // don't make new window, thread will do this + } } pReconstructor->postProcessing(); delete pReconstructor; -- 2.34.1