From 21a3eb69ff13b601703cfdcca278a3f60e949737 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Fri, 3 May 2002 09:57:41 +0000 Subject: [PATCH] r1883: *** empty log message *** --- ChangeLog | 61 ++++++++++++++++++++++-------------------- Makefile.am | 2 +- Makefile.in | 6 ++--- NEWS | 2 +- TODO | 2 +- debian/ctsim.doc-base | 4 +-- debian/dirs | 2 +- debian/rules | 2 +- doc/Makefile.am | 2 +- doc/Makefile.in | 10 +++---- doc/ctsim-gui.tex | 48 +++++++++++++++++++++++++++------ doc/ctsim.htb | Bin 136046 -> 136046 bytes src/ctsim.cpp | 30 +++------------------ src/dialogs.cpp | 6 ++--- src/views.cpp | 29 +++++--------------- 15 files changed, 102 insertions(+), 104 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5db37d..4dae56e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,48 +2,51 @@ New Features: - -- ctsim: Added tips to be displayed at startup and via the help menu. - -- ctsim: Added center-detector concept. Allow for detector array + * ctsim: Added tips to be displayed at startup and via the help menu. + * ctsim: Added center-detector concept. Allow for detector array to be any arbitrary distance from center of scanner. As a result, projection files are not incompatible with previous version of CTSim. - -- ctsim: Added background and SMP processing for reconstructions, - scanning, and rasterization. - -- ctsim: Added generic threaded tasks and background manager for + * ctsim: Added threaded tasks and background manager for background processing as well as taking advantage of multiple-CPU's - on SMP systems. - -- ctsim: Added plot t-theta sampling to projection file menu. - -- ctsim: Added Reconstruction with Rebinning for faster + on SMP systems. (Microsoft Windows only) + * ctsim: Added plot t-theta sampling to projection file menu. + * ctsim: Added Reconstruction with Rebinning for faster divergent beam reconstructions. - -- ctsim: Added import and export of DICOM image files. - -- ctsim: Added PPM, PGM, and PNG file import to imagefile. - -- ctsim: Added FFT/IFFT of columns of image files. - -- ctsim: Added clipboard cut/copy/paste for image files. - -- ctsim: Added region of interest to reconstructions. - -- ctsim: Added Convert Rectangular Image to Projection files - -- ctsim: Added "Verbose Logging", "Startup Tips", and + * ctsim: Added import and export of DICOM image files. + * ctsim: Added PPM, PGM, and PNG file import to imagefile. + * ctsim: Added FFT/IFFT of columns of image files. + * ctsim: Added clipboard cut/copy/paste for image files. + * ctsim: Added region of interest to reconstructions. + * ctsim: Added Convert Rectangular Image to Projection files + * ctsim: Added "Verbose Logging", "Startup Tips", and "Background processes" options to Preferences dialog. - -- ctsim: Added plotting of projection file histograms. - -- plotfile: Added scattergram plot functions - -- ctsim: Added accelerator key for File-Properties - -- ctsim: Improved wireframe 3-d display to remove hidden + * ctsim: Added plotting of projection file histograms. + * plotfile: Added scattergram plot functions + * ctsim: Added accelerator key for File-Properties + * ctsim: Improved wireframe 3-d display to remove hidden surfaces. - -- backprojectors.cpp: Added setting of axis extent and increment + * backprojectors.cpp: Added setting of axis extent and increment to reconstructions. + * projections.cpp: Can read and reconstruct SIEMENS AR.STAR DICOM + projection data files. Bug Fixes: - -- views.cpp: Added out-of-memory checks to display for huge + + * 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 image and projection files. - -- filter.cpp: Fixed Hanning parameter to be 0.5 rather than 0.54 - -- imagefile.cpp: Fixed scaling factor in fftRows - -- imagefile.cpp: Fixed bug when performing magnitude() on real-valued + * filter.cpp: Fixed Hanning parameter to be 0.5 rather than 0.54 + * imagefile.cpp: Fixed scaling factor in fftRows + * imagefile.cpp: Fixed bug when performing magnitude() on real-valued image. - -- sgp.cpp: Fixed bug in drawCircle. - -- distribution: fixed problem with documentation files not + * sgp.cpp: Fixed bug in drawCircle. + * distribution: fixed problem with documentation files not being included with the distribution (Reported by Ian Kay). - -- sgp.cpp/ezplot.cpp: Improved plotting with markers. - -- fixed ctsimtext shell when giving no parameters to function-name - -- phm2if, phm2pj: Updated help messages for renamed phantoms + * sgp.cpp/ezplot.cpp: Improved plotting with markers. + * fixed ctsimtext shell when giving no parameters to function-name + * phm2if, phm2pj: Updated help messages for renamed phantoms 3.0.3 - Released 2/20/01 diff --git a/Makefile.am b/Makefile.am index 2c18e42..562bf2e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,7 +16,7 @@ else EXTRA_DIRS3= endif -SUBDIRS=man doc libctsupport libctsim html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_DIRS2 $(EXTRA_DIRS3) tools helical +SUBDIRS=man doc 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 diff --git a/Makefile.in b/Makefile.in index f14e22e..b729f8a 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 = $(EXTRA_DIRS1) $(EXTRA_DIRS2) man doc libctsupport libctsim html cgi-bin include $(EXTRA_DIRS3) tools helical +SUBDIRS = man doc 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 = getopt libctgraphics man doc libctsupport libctsim html \ -cgi-bin include src tools helical +DIST_SUBDIRS = man doc 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) diff --git a/NEWS b/NEWS index a456501..97deeb1 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Version 3.5 New Features +Version 3.5 Released May 2002 * New reconstruction technique: Interpolate divergent beams to parallel beams for faster reconstructions. diff --git a/TODO b/TODO index 8f6bbc6..8b13789 100644 --- a/TODO +++ b/TODO @@ -1 +1 @@ -Take new features in 3.5 and add to documentation file + diff --git a/debian/ctsim.doc-base b/debian/ctsim.doc-base index d75537e..2b319f5 100644 --- a/debian/ctsim.doc-base +++ b/debian/ctsim.doc-base @@ -1,8 +1,8 @@ Document: ctsim Title: CTSim Author: Kevin M. Rosenberg -Abstract: Describes the - use the CTSim Computed Tomography Simulator +Abstract: This manual describes the theory + and use of CTSim - A Computed Tomography Simulator. Section: math Format: HTML diff --git a/debian/dirs b/debian/dirs index 1e14816..7029e88 100644 --- a/debian/dirs +++ b/debian/dirs @@ -6,4 +6,4 @@ usr/share/doc usr/share/doc/ctsim usr/share/doc/ctsim/html usr/share/man -usr/share/man1 +usr/share/man/man1 diff --git a/debian/rules b/debian/rules index fb7972c..e6f5956 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,7 @@ build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. - $(MAKE) + $(MAKE) all touch build-stamp clean: diff --git a/doc/Makefile.am b/doc/Makefile.am index 9f66c4a..dfa0d19 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -14,7 +14,7 @@ install-data-hook: $(pkg).htb install -g root -o root -m 0644 $(pkg).htb $(datadir) .PHONY: pdf -pdf: ctsim.dvi +pdf: ctsim.pdf $(pkg).pdf: $(pkg).dvi dvipdfm $(pkg) diff --git a/doc/Makefile.in b/doc/Makefile.in index fccf403..e1ba6a9 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -205,15 +205,15 @@ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean -all-local: htmlhelp html dvi +all-local: htmlhelp html pdf install-data-hook: $(pkg).htb install -g root -o root -m 0644 $(pkg).htb $(datadir) -.PHONY: ps -ps: ctsim.ps -$(pkg).ps: $(pkg).dvi - dvips $(pkg) +.PHONY: pdf +pdf: ctsim.pdf +$(pkg).pdf: $(pkg).dvi + dvipdfm $(pkg) .PHONY: dvi dvi: $(pkg).dvi diff --git a/doc/ctsim-gui.tex b/doc/ctsim-gui.tex index 6637303..a7fe7dc 100644 --- a/doc/ctsim-gui.tex +++ b/doc/ctsim-gui.tex @@ -5,17 +5,16 @@ \ctsim\ is the graphical shell for the CTSim project. This shell uses the \urlref{wxWindows}{http://www.wxwindows.org} library for -cross-platform compatibility. The graphical shell is compatible -with Microsoft Windows, \urlref{GTK}{http://www.gtk.org}, and +cross-platform compatibility. The graphical shell is compatible with +Microsoft Windows, \urlref{GTK}{http://www.gtk.org}, and \urlref{Motif}{http://www.openmotif.org} graphical environments. \section{Starting CTSim} \usage \texttt{ctsim [files to open...]} -You can invoke \ctsim\ by itself on the command line, or include -any number of files that you want \ctsim\ to -automatically open. \ctsim\ can open projection files, image -files, phantom files, and plot files. +You can invoke \ctsim\ by itself on the command line, or include any +number of files that you want \ctsim\ to automatically open. \ctsim\ +can open projection files, image files, phantom files, and plot files. On Microsoft Windows platforms, the simplest way to invoke \ctsim\ is via the \emph{Start} menu under the \emph{Programs} sub-menu. @@ -185,7 +184,10 @@ helpful tips when \ctsim\ is started.} new installations. With this option set, \ctsim\ execute lengthy calculations in the background. A background window will appear when processes are running in the background and will disappear when no background processes are executing. This background window shows -the status and progress of all background processes.} +the status and progress of all background processes. +\textbf{NOTE:} Due to limitations of \texttt{wxWindows}, this function is +only supported on Microsoft Windows. +} \end{twocollist} @@ -482,6 +484,10 @@ The displayed properties include: \item The parameters used when generating the projections from the phantom. \end{itemize} +\subsection{Process - Convert Rectangular} +The commands takes the projection data and creates an image file using +the projection data. + \subsection{Process - Convert Polar}\label{IDH_DLG_POLAR}\index{Polar conversion} This command creates an image file with the polar conversion of the projection data. The parameters to set are: @@ -494,12 +500,27 @@ Currently, the \texttt{bilinear} option provides the highest quality interpolation.} \end{twocollist} -\subsection{Process - Convert FFT Polar} +\subsection{Convert - Convert FFT Polar} The parameters for this option are the same as the \helprefn{Convert Polar Dialog}{convertpolardialog}. For this command, though, the projections are Fourier transformed prior to conversion to polar image. +\subsection{Convert - Interpolate to Parallel} +This command filters divergent projection data (equiangular or +equilinear) and interpolates (or rebins) to estimate the projection +data if the projections had been collected with parallel geometry. + +\subsection{Analyze - Plot Histogram} +Plots a histogram of projection data attenuations. + +\subsection{Analyze - Plot T-Theta Sampling} +Plots a 2-dimensional scattergram showing the \texttt{T} and +\texttt{Theta} values for each data point in the projection data. +This is especially instructive when scanning with divergent +geometries and the scan ratio is close to \texttt{1}. + + \subsection{Reconstruct - Filtered Backprojection}\label{IDH_DLG_RECONSTRUCTION}\index{Dialog!Reconstruction} This command displays a dialog to set the parameters for reconstructing an image from projections using the filtered backprojection technique. The parameters available are: @@ -588,8 +609,19 @@ frequency-based filtering. A setting of \texttt{1} is optimal whereas a setting of \texttt{0} disables zero padding. Settings greater than \texttt{1} perform larger amounts of zero padding but without any significant benefit.} +\twocolitem{\textbf{ROI}}{These four settings control the +\textit{region of interest} for the reconstruction. The default values +match the dimensions of the entire phantom. By constraining the ROI to +be a smaller square, the reconstruction will be magnified.} + \end{twocollist} +\subsection{Reconstruct - Filtered Backprojection (Rebin to Parallel)}\label{IDH_DLG_RECONSTRUCTION_REBIN}\index{Dialog!Reconstruction_Rebin} +The command reconstructs the projection data via filtered backprojection +as described above. As opposed to the above command, this command also +rebins divergent projection data to parallel prior to reconstruction. +This greatly speeds reconstruction of divergent geometry projections. + \section{Plot Menus} \subsection{File - Properties} The displayed properties include: diff --git a/doc/ctsim.htb b/doc/ctsim.htb index ca9aab36d3302c613798f673362fc3987ab9d9b6..b51e229ffd4507fd54a379aeed0e8151a7d7cc1e 100644 GIT binary patch delta 6073 zcmaLbdsNJ67zglqr<$hQRFbk%Npz4%v(&nDIvke}HrLvSI<+{m(rKL%R?4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a23fzUu~}5jT79{PJ6fw72Mn=pMr>5G7W00NQm2(V06ZV5x!kaYNhh`@$m1t1wDi zMb8(lb@c(FrU#cHDz6q%RqaKHN_vQ>=wT>C+1BY$vX94LRZv|3M4qkJVO33i2%yOg zh(a6aHA%aE{uEKn)9rvdpCKCFSS%Hzo;4vdZFYhe&ixf`D)?0%%uLpXQEqKRT5;EuDz0yFP)fE4mSdblbur;(8Ee^$ZuI zQp$)9sawh4Vl8ErfUNMnKo*GyPr1;D==M~&*@#3#WUEvkX=6-oi4~QN{q)exgq(%Q zKjeD&LQZ}Xm!sS?Ko5@(AkQFjkA)uoYC%o{46)S11WV!yjV=tWuP?Qm4D{&=L>xje0YrQb6j?~LUIODkDj&ocS$GN{@_lx7WYaA!n zvTFu#+#!~uGkdCK&umOPyI(ZN6>*%06-?D2)a9lpeX*q66 zC;M;uyH566ZgAXyE_U8xj?3V+lY}zT>{75=D0ypcFkapJH~M@Ic|b6qaU5; zx5n(5U1H_Yy&K9HHL07+aR)fAmg5}yvHL}G+!>B*=QuADMn5{UcoX)_ZnE;|T+HQ+ zn$#`fxFa0b$Z=!)v-@q}xFU`trtF%tS&q(ZzbSiW)vP=^7h5xSzc7wF#c^#M=P`iY zZyU#5=QvYycFlzxcgS4u5a_qQYIETld=*R|D7f}{iP1sTaoh+?!F8Da@-vdsf6YsF P(Vw?Y63Ge;p}+kHLoV(* diff --git a/src/ctsim.cpp b/src/ctsim.cpp index ab1271c..7f5193b 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.106 2002/05/03 01:01:15 kevin Exp $ +** $Id: ctsim.cpp,v 1.107 2002/05/03 09:57:41 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 @@ -70,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.106 2002/05/03 01:01:15 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.107 2002/05/03 09:57:41 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -201,8 +201,8 @@ CTSimApp::OnInit() if (! m_pFrame->getWinHelpController().Initialize(helpDir + "/ctsim")) *m_pLog << "Cannot initialize the Windows Help system" << "\n"; #else - if (! m_pFrame->getHtmlHelpController().Initialize(helpDir + "/ctsim") && - ! m_pFrame->getHtmlHelpController().Initialize("/usr/share/ctsim")) + if (! m_pFrame->getHtmlHelpController().Initialize("/usr/share/ctsim/ctsim") && + ! m_pFrame->getHtmlHelpController().Initialize("/usr/local/share/ctsim/ctsim")) *m_pLog << "Cannot initialize the HTML Help system" << "\n"; else { if (::wxDirExists ("/tmp")) @@ -624,12 +624,6 @@ MainFrame::OnNewImageFile (wxCommandEvent& event) return; } pImageDoc->setImageFile (pImageFile); - // pImageDoc->UpdateAllViews (NULL); - // if (ImageFileView* imageView = pImageDoc->getView()) { - // imageView->OnUpdate (imageView, NULL); - // imageView->getFrame()->SetFocus(); - // imageView->getFrame()->Show(true); - // } if (theApp->getAskDeleteNewDocs()) pImageDoc->Modify (true); } @@ -644,13 +638,6 @@ MainFrame::OnNewProjectionFile (wxCommandEvent& event) return; } pProjDoc->setProjections (pProjections); - pProjDoc->UpdateAllViews (NULL); - if (ProjectionFileView* projView = pProjDoc->getView()) { - projView->OnUpdate (projView, NULL); - projView->getFrame()->SetFocus(); - projView->getFrame()->Show(true); - } - if (theApp->getAskDeleteNewDocs()) pProjDoc->Modify (true); } @@ -1072,15 +1059,6 @@ CTSimApp::newProjectionDoc() ProjectionFileDocument* newDoc = dynamic_cast(m_pDocTemplProjection->CreateDocument ("")); if (newDoc) { ProjectionFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) { - // wxSize size; - // m_pFrame->GetClientSize (&size.x, &size.y); - // pFrame->SetClientSize (size.x / 2, size.y / 2); - pFrame->Show (false); - } - } newDoc->SetDocumentName (m_pDocTemplProjection->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplProjection); newDoc->OnNewDocument(); diff --git a/src/dialogs.cpp b/src/dialogs.cpp index e67357f..03e1f72 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dialogs.cpp,v 1.56 2001/09/24 11:46:17 kevin Exp $ +** $Id: dialogs.cpp,v 1.57 2002/05/03 09:57:41 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 @@ -301,7 +301,7 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi m_pCBStartupTips->SetValue (bStartupTips); pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL); -#ifdef HAVE_WXTHREADS +#if HAVE_WXTHREADS && MSVC m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0); m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks); pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL); @@ -357,7 +357,7 @@ DialogPreferences::getStartupTips () bool DialogPreferences::getUseBackgroundTasks () { -#ifdef HAVE_WXTHREADS +#if HAVE_WXTHREADS && MSVC return static_cast(m_pCBUseBackgroundTasks->GetValue()); #else return false; diff --git a/src/views.cpp b/src/views.cpp index 03d366d..3a91f6e 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.152 2002/05/03 01:01:15 kevin Exp $ +** $Id: views.cpp,v 1.153 2002/05/03 09:57:41 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 @@ -2173,18 +2173,6 @@ PhantomFileView::OnProjections (wxCommandEvent& event) return; } pProjectionDoc->setProjections (pProj); - ProjectionFileView* projView = pProjectionDoc->getView(); - if (projView) { - projView->OnUpdate (projView, NULL); - if (projView->getCanvas()) - projView->getCanvas()->SetClientSize (m_iDefaultNDet, m_iDefaultNView); - if (wxFrame* pFrame = projView->getFrame()) { - pFrame->Show(true); - pFrame->SetFocus(); - pFrame->Raise(); - } - GetDocumentManager()->ActivateView (projView, true, false); - } if (theApp->getAskDeleteNewDocs()) pProjectionDoc-> Modify(true); pProjectionDoc->UpdateAllViews (this); @@ -3107,7 +3095,7 @@ void ProjectionFileView::setInitialClientSize () { wxSize bestSize = m_pCanvas->GetBestSize(); - + if (bestSize.x > 800) bestSize.x = 800; if (bestSize.y > 800) @@ -3159,16 +3147,13 @@ ProjectionFileView::OnUpdate (wxView *WXUNUSED(sender), wxObject *WXUNUSED(hint) wxImage image (nDet, nView, imageData, true); m_bitmap = image.ConvertToBitmap(); delete imageData; - //int xSize = nDet; - //int ySize = nView; - //xSize = clamp (xSize, 0, 800); - //ySize = clamp (ySize, 0, 800); - //m_pFrame->SetClientSize (xSize, ySize); - m_pCanvas->SetScrollbars (20, 20, nDet/20, nView/20); } - if (m_pCanvas) - m_pCanvas->Refresh(); + m_pCanvas->SetScrollbars(20, 20, nDet/20, nView/20); + m_pCanvas->SetBackgroundColour(*wxWHITE); + + if (m_pCanvas) + m_pCanvas->Refresh(); } bool -- 2.34.1