r520: no message
[ctsim.git] / src / views.cpp
index c1debac9f66427f8f1718f5113e8791f75876840..ce66ec1eac16c8e9bdba27e70a98209e4171b107 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.99 2001/02/08 06:25:07 kevin Exp $
+**  $Id: views.cpp,v 1.102 2001/02/11 04:56:38 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
@@ -268,7 +268,7 @@ ImageFileView::OnProperties (wxCommandEvent& event)
   if (rIF.nx() == 0 || rIF.ny() == 0)
     *theApp->getLog() << "Properties: empty imagefile\n";
   else {
-    const std::string& rFilename = rIF.getFilename();
+    const std::string rFilename = m_pFrame->GetTitle().c_str();
     std::ostringstream os;
     double min, max, mean, mode, median, stddev;
     rIF.statistics (rIF.getArray(), min, max, mean, mode, median, stddev);
@@ -822,6 +822,7 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Preview");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -1802,7 +1803,7 @@ PhantomFileView::PhantomFileView()
   m_iDefaultNView = 320;
 #endif
   m_iDefaultNSample = 1;
-  m_dDefaultRotation = 1;
+  m_dDefaultRotation = 2;
   m_dDefaultFocalLength = 2;
   m_dDefaultViewRatio = 1;
   m_dDefaultScanRatio = 1;
@@ -2046,6 +2047,7 @@ PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -2220,7 +2222,7 @@ ProjectionFileView::ProjectionFileView()
   m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
 #endif
   m_iDefaultZeropad = 1;
-  m_iDefaultBackprojector = Backprojector::BPROJ_IDIFF3;
+  m_iDefaultBackprojector = Backprojector::BPROJ_IDIFF;
   m_iDefaultInterpolation = Backprojector::INTERP_LINEAR;
   m_iDefaultInterpParam = 1;
   m_iDefaultTrace = Trace::TRACE_NONE;
@@ -2325,7 +2327,10 @@ ProjectionFileView::OnReconstructFourier (wxCommandEvent& event)
 void
 ProjectionFileView::OnReconstructFBP (wxCommandEvent& event)
 {
-  DialogGetReconstructionParameters dialogReconstruction (getFrameForChild(), m_iDefaultNX, m_iDefaultNY, m_iDefaultFilter, m_dDefaultFilterParam, m_iDefaultFilterMethod, m_iDefaultFilterGeneration, m_iDefaultZeropad, m_iDefaultInterpolation, m_iDefaultInterpParam, m_iDefaultBackprojector, m_iDefaultTrace);
+  DialogGetReconstructionParameters dialogReconstruction (getFrameForChild(), m_iDefaultNX, m_iDefaultNY, 
+    m_iDefaultFilter, m_dDefaultFilterParam, m_iDefaultFilterMethod, m_iDefaultFilterGeneration, 
+    m_iDefaultZeropad, m_iDefaultInterpolation, m_iDefaultInterpParam, m_iDefaultBackprojector, 
+    m_iDefaultTrace);
   
   int retVal = dialogReconstruction.ShowModal();
   if (retVal == wxID_OK) {
@@ -2454,6 +2459,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -2784,6 +2790,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);
@@ -3041,6 +3048,7 @@ TextFileView::CreateChildFrame (wxDocument *doc, wxView *view)
   m_pFileMenu->Append(wxID_PREVIEW, "Print Pre&view");
 #ifdef CTSIM_MDI
   m_pFileMenu->AppendSeparator();
+  m_pFileMenu->Append (MAINMENU_FILE_PREFERENCES, "Pr&eferences...");
   m_pFileMenu->Append(MAINMENU_FILE_EXIT, "E&xit");
 #endif
   GetDocumentManager()->FileHistoryAddFilesToMenu(m_pFileMenu);