r557: no message
[ctsim.git] / src / views.cpp
index 306ce5b8c2405d4659409e429911a7e3ecb7aeaf..557bc2f2ef79b548bc2ed47f8b7256d8091f4e88 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.105 2001/02/16 02:36:18 kevin Exp $
+**  $Id: views.cpp,v 1.108 2001/02/20 04:48: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
@@ -863,14 +863,14 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   filter_menu->Append (IFMENU_FILTER_EXP, "&Exp");
   filter_menu->AppendSeparator();
 #ifdef HAVE_FFT
-  filter_menu->Append (IFMENU_FILTER_FFT, "2D &FFT");
-  filter_menu->Append (IFMENU_FILTER_IFFT, "2D &IFFT");
+  filter_menu->Append (IFMENU_FILTER_FFT, "2-D &FFT");
+  filter_menu->Append (IFMENU_FILTER_IFFT, "2-D &IFFT");
   filter_menu->Append (IFMENU_FILTER_FFT_ROWS, "FFT Rows");
   filter_menu->Append (IFMENU_FILTER_IFFT_ROWS, "IFFT Rows");
   filter_menu->Append (IFMENU_FILTER_FFT_COLS, "FFT Columns");
   filter_menu->Append (IFMENU_FILTER_IFFT_COLS, "IFFT Columns");
-  filter_menu->Append (IFMENU_FILTER_FOURIER, "F&ourier");
-  filter_menu->Append (IFMENU_FILTER_INVERSE_FOURIER, "Inverse Fo&urier");
+  filter_menu->Append (IFMENU_FILTER_FOURIER, "2-D F&ourier");
+  filter_menu->Append (IFMENU_FILTER_INVERSE_FOURIER, "2-D Inverse Fo&urier");
 #else
   filter_menu->Append (IFMENU_FILTER_FOURIER, "&Fourier");
   filter_menu->Append (IFMENU_FILTER_INVERSE_FOURIER, "&Inverse Fourier");
@@ -911,6 +911,7 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;
@@ -1825,7 +1826,7 @@ PhantomFileView::PhantomFileView()
   m_iDefaultNView = 320;
 #endif
   m_iDefaultNSample = 1;
-  m_dDefaultRotation = 2;
+  m_dDefaultRotation = 1;
   m_dDefaultFocalLength = 2;
   m_dDefaultViewRatio = 1;
   m_dDefaultScanRatio = 1;
@@ -1900,7 +1901,7 @@ PhantomFileView::OnProjections (wxCommandEvent& event)
         return;
       }
       pProj->initFromScanner (theScanner);
-      m_dDefaultRotation /= PI;  // convert back to PI units
+      m_dDefaultRotation /= TWOPI;  // convert back to fraction of a circle
       
       Timer timer;
       if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
@@ -2083,6 +2084,7 @@ PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;
@@ -2369,26 +2371,29 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
     wxString optBackprojectName = dialogReconstruction.getBackprojectName();
     m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.c_str());
     m_iDefaultTrace = dialogReconstruction.getTrace();
+
     if (m_iDefaultNX > 0 && m_iDefaultNY > 0) {
       const Projections& rProj = GetDocument()->getProjections();
-
       ImageFile* pImageFile = new ImageFile;
       pImageFile->setArraySize (m_iDefaultNX, m_iDefaultNY);
       
-      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
+      Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(), 
+        m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), 
+        optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
       
       Timer timerRecon;
       if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
         ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstructor, rProj, *pImageFile, m_iDefaultTrace, getFrameForChild());
         for (int iView = 0; iView < rProj.nView(); iView++) {
           ::wxYield();
-          if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) {
+          if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView, true)) {
             delete pDlgReconstruct;
             delete pReconstructor;
             delete pImageFile;
             return;
           }
           ::wxYield();
+          ::wxYield();
           while (pDlgReconstruct->isPaused()) {
             ::wxYield();
             ::wxUsleep(50);
@@ -2397,9 +2402,9 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
         delete pDlgReconstruct;
       } else {
         wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT);
-        for (int i = 0; i < rProj.nView(); i++) {
-          pReconstructor->reconstructView (i, 1);
-          if (! dlgProgress.Update (i + 1)) {
+        for (int iView = 0; iView < rProj.nView(); iView++) {
+          pReconstructor->reconstructView (iView, 1);
+          if (! dlgProgress.Update (iView + 1)) {
             delete pReconstructor;
             delete pImageFile;
             return;
@@ -2496,6 +2501,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;
@@ -2815,6 +2821,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;
@@ -3060,6 +3067,7 @@ TextFileView::CreateChildFrame (wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+  help_menu->Append (IDH_QUICKSTART, "&Quick Start");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;