r426: Updated online help, html help now working
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 20 Jan 2001 02:25:45 +0000 (02:25 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 20 Jan 2001 02:25:45 +0000 (02:25 +0000)
doc/tex2rtf/ctsim.tex
msvc/ctsim/ctsim.plg
src/ctsim.cpp
src/ctsim.h

index e44bd309b328944195c4dbbb57f7d541d7398c9a..5a3254816a4235250ce5903f8958d0d16322ca69 100644 (file)
@@ -61,7 +61,7 @@ PERFORMANCE OF THIS SOFTWARE.
 \setfooter{\thepage}{}{}{}{}{\thepage}%
 
 \winhelponly{$$\image{3cm;3cm}{logo-huge}$$}%
-
+\htmlonly{$$\image{3cm;3cm}{logo-huge.gif}$$}%
 Computed Tomography is a technique for estimating the interior of an object 
 from measurement of radiation collected around the object. This radiation 
 can be either projected through or emitted from the object.
@@ -144,9 +144,10 @@ ctsim [OPTIONS] [files to open...]
 \ctsimtext can be executed without any parameters. In that case, \ctsimtext
 offers a command-line to enter the function-names and their parameters. The output of the command is displayed. Further commands may be given to \ctsimtext. The shell is exited by the {\tt quit} command.
 
-\ctsimtext can also be called to execute a single command. This is especially useful for batch files containing multiple \ctsimtext commands. This is invoked by calling {\tt ctsimtext function-name parameters...}.
+\ctsimtext can also be called to execute a single command. This is especially useful for batch files containing multiple \ctsimtext commands. This is invoked by calling \par
+{\tt ctsimtext function-name parameters...}.
 
-The following function names are available:
+The available functions are:
 
 \section{if1}\label{if1}\index{ctsimtext,if1}%
 Perfoms math functions on a single image.
@@ -292,55 +293,51 @@ Displays information about a projection file.
 Reconstructs the interior of an object from a projection file.
 
 \usage
-\begin{itemize}\itemsep=0pt
-  \item Filter \par
-  Selects which filter to apply to each projection. To
-  properly reconstruct an image, this filter should be multiplied 
-  by the absolute value of distance from zero frequency.
+\begin{twocollist}
+\twocolitemruled{{\bf Parameter}}{{\bf Options}}
+\twocolitem{{\bf --filter}}{Selects which filter to apply to each projection. To properly reconstruct an image, this filter should be multiplied 
+by the absolute value of distance from zero frequency.
   \begin{itemize}\itemsep=0pt
     \item abs_bandlimit
     \item abs_cosine
     \item abs_hamming
-  \end{itemize}
-
-  \item Filter Parameter \par
-  Sets the alpha level for Hamming
-  window. At setting of 0.54, this equals the Hanning window.
-
-  \item Filter Method
-    \begin{itemize}\itemsep=0pt
-      \item convolution
+  \end{itemize}}
+  \twocolitem{{\bf --filter-parameter}}{Sets the alpha level for Hamming
+  window. At setting of 0.54, this equals the Hanning window.}
+  \twocolitem{{\bf --filter-method}}{Selects the filtering method. For large numbers of detectors, {\tt rfftw} is optimal. For smaller numbers of detectors, {\tt convolution} might be a bit faster. 
+\begin{itemize}\itemsep=0pt
+\item convolution
       \item fourier
       \item fourier_table
       \item fftw
       \item rfftw
-    \end{itemize}
-
-  \item Filter Generation
-    \begin{itemize}\itemsep=0pt
-      \item direct
-      \item inverse_fourier
-    \end{itemize}
-
-  \item Interpolation
-    \begin{itemize}\itemsep=0pt
-      \item nearest
-      \item linear
-    \end{itemize}
-     
-  \item Backprojection
-    \begin{itemize}\itemsep=0pt
-      \item trig
-      \item table
-      \item diff
-      \item diff2
-      \item idiff2
-      \item idiff3
-    \end{itemize}
-
-  \item Zeropad
-  \item Preinterpolation Factor
+\end{itemize}}
+  \twocolitem{{\bf --filter-generation}}{Selects the filter generation. With convolution, {\tt direct} is the proper method to select. With any of the frequency methods, {\tt inverse-fourier} is the best method.
+\begin{itemize}\itemsep=0pt
+\item direct
+      \item inverse-fourier
+\end{itemize}
+}
+  \twocolitem{{\bf --interpolation}}{Interpolation technique. {\tt linear} is optimal.
+\begin{itemize}\itemsep=0pt
+\item nearest
+\item linear
 \end{itemize}
+}    
+  \twocolitem{{\bf -backprojection}}{Selects the backprojection technique. A setting of {\tt idiff3} is optimal.
+\begin{itemize}\itemsep=0pt
+\item trig
+\item table
+\item diff
+\item diff2
+\item idiff2
+\item idiff3
+\end{itemize}
+}
+\twocolitem{{\bf --zeropad}}{ Zeropad factor. A setting of {\tt 1} is optimal.}
+
+  \twocolitem{{\bf --preinterpolate}}{Selects preinterpolation interpolation technique and sets the preinterpolation factor. Currently, this is experimental and does not work well.}
+\end{twocollist}
 
 \chapter{The Web Browser CGI Interface}\label{webinterface}\index{Web Interface}%
 \setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
index 60516490e428cd2aede8565cdf1579af723eb00f..dddb54266dfc2b777eaae739387924f2facffefc 100644 (file)
@@ -6,13 +6,13 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5E.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPFE.tmp" with contents
 [
 /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
 "C:\ctsim\src\ctsim.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5E.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPFE.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPFF.tmp" with contents
 [
 comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib xpmd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" /libpath:"..\..\..\wx2\lib" 
 .\Debug\ctsim.obj
@@ -28,7 +28,7 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \wx2\lib\wxd.lib
 \wx2\lib\xpmd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP5F.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPFF.tmp"
 <h3>Output Window</h3>
 Compiling...
 ctsim.cpp
index 32873df061766e66a6cfdaa188beca6478315486..a34339ca2e1c7cb7ce04de0893a1eeb7c8d0d7cd 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.37 2001/01/19 22:53:57 kevin Exp $
+**  $Id: ctsim.cpp,v 1.38 2001/01/20 02:25:45 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
@@ -69,7 +69,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.37 2001/01/19 22:53:57 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.38 2001/01/20 02:25:45 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -157,9 +157,12 @@ CTSimApp::OnInit()
   
   setIconForFrame (m_pFrame);
   
-  if (! m_pFrame->getHelpController().Initialize("ctsim"))
+#ifdef CTSIM_WINHELP
+  if (! m_pFrame->getWinHelpController().Initialize("ctsim"))
+    ::wxMessageBox ("Cannot initialize the help system", "Error");
+#endif
+  if (! m_pFrame->getHtmlHelpController().Initialize(::wxGetCwd() + "/ctsim"))
     ::wxMessageBox ("Cannot initialize the help system", "Error");
-  
   
   return true;
 }
@@ -222,6 +225,9 @@ BEGIN_EVENT_TABLE(MainFrame, wxDocParentFrame)
 EVT_MENU(MAINMENU_HELP_ABOUT, MainFrame::OnAbout)
 EVT_MENU(MAINMENU_HELP_CONTENTS, MainFrame::OnHelpContents)
 EVT_MENU(MAINMENU_HELP_TOPICS, MainFrame::OnHelpTopics)
+#if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
+EVT_MENU(MAINMENU_HELP_SECONDARY, MainFrame::OnHelpSecondary)
+#endif
 EVT_MENU(MAINMENU_FILE_CREATE_PHANTOM, MainFrame::OnCreatePhantom)
 EVT_MENU(MAINMENU_FILE_CREATE_FILTER, MainFrame::OnCreateFilter)
 EVT_MENU(MAINMENU_FILE_EXIT, MainFrame::OnExit)
@@ -282,6 +288,9 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const
   wxMenu* help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
   help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics\tCtrl-T");
+#if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
+  help_menu->Append(MAINMENU_HELP_SECONDARY, "&Secondary Help");
+#endif
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar* menu_bar = new wxMenuBar;
@@ -404,19 +413,41 @@ MainFrame::OnHelpContents (wxCommandEvent& event)
   showHelp (event.GetId());
 }
 
+#if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
+void
+MainFrame::OnHelpSecondary (wxCommandEvent& event)
+{
+    m_htmlHelp.DisplayContents();
+}
+#endif
+
 void
 MainFrame::showHelp (int commandID)
 {
-  m_help.LoadFile();
+#ifdef CTSIM_WINHELP
+  m_winHelp.LoadFile();
+#else
+  m_htmlHelp.LoadFile();
+#endif
   
   switch (commandID) {
+
   case MAINMENU_HELP_CONTENTS:
-    m_help.DisplayContents ();
+#ifdef CTSIM_WINHELP
+    m_winHelp.DisplayContents ();
+#else
+    m_htmlHelp.DisplayContents ();
+#endif
     break;
+
   case MAINMENU_HELP_TOPICS:
-    m_help.DisplaySection (introduction);
+#ifdef CTSIM_WINHELP
+    m_winHelp.DisplaySection (introduction);
+#else
+    m_htmlHelp.DisplayIndex();
+#endif
     break;
-    
+
   default:
     *getLog() << "Unknown help command # " << commandID << "\n";
     break;
@@ -600,12 +631,12 @@ private:
   BitmapControl* m_pBitmapCtrl;
   
 public:
-  BitmapDialog (wxBitmap* pBitmap);
+  BitmapDialog (wxBitmap* pBitmap, char const* pszTitle);
   virtual ~BitmapDialog();
 };
 
-BitmapDialog::BitmapDialog (wxBitmap* pBitmap)
-: wxDialog(theApp->getMainFrame(), -1, wxString("About"), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL)
+BitmapDialog::BitmapDialog (wxBitmap* pBitmap, char const* pszTitle)
+: wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE)
 {
   wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
   
@@ -626,17 +657,14 @@ BitmapDialog::BitmapDialog (wxBitmap* pBitmap)
 BitmapDialog::~BitmapDialog()
 {}
 
-#include "./splash.xpm"
 
+#include "./splash.xpm"
 void 
 MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
 {
-  //
-  //  wxImage image;
-  //  if (wxFile::image.LoadFile ("/splash.png")) {
   wxBitmap bmp (splash);
   if (bmp.Ok()) {
-    BitmapDialog dlg (&bmp);
+    BitmapDialog dlg (&bmp, "About CTSim");
     dlg.Show(true);
   } else {
     wxString msg = "CTSim\nThe Open Source Computed Tomography Simulator\n";
index b6690a0040cc30f53f9cd7451ec117b92b94bfb7..90a0b29693bfb1cfe6acc8eef1dfce9caa048273 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.h,v 1.27 2001/01/18 18:09:35 kevin Exp $
+**  $Id: ctsim.h,v 1.28 2001/01/20 02:25:45 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
@@ -59,6 +59,10 @@ class ImageFileDocument;
 #include "dlgezplot.h"
 
 
+#if defined(__WXMSW__)
+#define CTSIM_WINHELP   1
+#endif
+
 // Define a new frame for main window
 #if CTSIM_MDI
 class MainFrame: public wxMDIParentFrame
@@ -85,23 +89,21 @@ private:
   double m_dDefaultFilterInputScale;
   double m_dDefaultFilterOutputScale;
   
-#ifdef __WXMSW__
-  wxWinHelpController      m_help;
-#else
-  wxHtmlHelpController     m_help;
+#if CTSIM_WINHELP
+  wxWinHelpController      m_winHelp;
 #endif
-
+  wxHtmlHelpController     m_htmlHelp;
   
 public:
   MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type);
   
-#ifdef __WXMSW__
-  wxWinHelpController&   getHelpController()
-  {return m_help; }
-#else
-  wxHtmlHelpController&  getHelpController()
-  { return m_help; }
+#if CTSIM_WINHELP
+  wxWinHelpController&   getWinHelpController()
+  {return m_winHelp; }
 #endif
+  wxHtmlHelpController&  getHtmlHelpController()
+  { return m_htmlHelp; }
+
   void showHelp (int commandID);
 
   void OnAbout (wxCommandEvent& event);
@@ -109,6 +111,10 @@ public:
   void OnHelpContents (wxCommandEvent& event);
   void OnCreatePhantom (wxCommandEvent& event);
   
+#if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
+  void OnHelpSecondary (wxCommandEvent& event);
+#endif
+
   void OnCreateFilter (wxCommandEvent& event);
   void OnExit (wxCommandEvent& event);
   
@@ -190,6 +196,7 @@ enum {
     MAINMENU_HELP_ABOUT = 600,
     MAINMENU_HELP_CONTENTS,
     MAINMENU_HELP_TOPICS,
+    MAINMENU_HELP_SECONDARY,
     MAINMENU_FILE_CREATE_PHANTOM,
     
     MAINMENU_FILE_CREATE_FILTER,