r1948: *** empty log message ***
[ctsim.git] / src / ctsim.h
index 9768970a97d9c20b7008cf87ce993dec8e9fd947..9895231f7f7b3c1558e5bceeb548d53d948cc162 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: ctsim.h,v 1.51 2001/02/22 11:05:38 kevin Exp $
+**  $Id: ctsim.h,v 1.64 2002/05/05 10:54:34 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
 #include <dmalloc.h>
 #endif
 
+#ifdef MSVC
+#define HAVE_WXTHREADS 1
+#endif
+
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
 #endif
@@ -46,7 +50,6 @@
 #ifdef MSVC
 #define CTSIM_MDI 1
 #endif
-#define CTSIM_CUSTOM_MRU 1
 
 #if defined(CTSIM_MDI) && !wxUSE_MDI_ARCHITECTURE
 #error You must set wxUSE_MDI_ARCHITECTURE to 1 in setup.h!
@@ -62,6 +65,8 @@ class ProjectionFileDocument;
 class PhantomFileDocument;
 class PlotFileDocument;
 class TextFileDocument;
+class BackgroundManager;
+
 #if wxUSE_GLCANVAS
 class Graph3dFileDocument;
 #endif
@@ -99,6 +104,7 @@ private:
   wxMenuItem* m_apWindowMenuItems[MAX_WINDOW_MENUITEMS];
   wxDocument* m_apWindowMenuData[MAX_WINDOW_MENUITEMS];
   
+  int m_iDefaultImportFormat;
   int m_iDefaultPhantomID;
   int m_iDefaultFilterID;
   int m_iDefaultFilterDomainID;
@@ -115,14 +121,11 @@ private:
   wxCHMHelpController      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);
   virtual ~MainFrame();
 
-#ifdef CTSIM_CUSTOM_MRU
-  void OnMRUFile (wxCommandEvent& event);
-#endif
   void OnSize (wxSizeEvent& event);
 
 #if CTSIM_WINHELP
@@ -140,8 +143,11 @@ public:
   void OnCreatePhantom (wxCommandEvent& event);
   void OnPreferences (wxCommandEvent& event);
   void OnLogEvent (wxCommandEvent& event);  // used by thread children
+  void OnNewImageFile (wxCommandEvent& event);
+  void OnNewProjectionFile (wxCommandEvent& event);
 
   void OnHelpButton (wxCommandEvent& event);
+  void OnImport (wxCommandEvent& event);
 
 #if defined(CTSIM_WINHELP) && (defined(DEBUG) || defined(_DEBUG))
   void OnHelpSecondary (wxCommandEvent& event);
@@ -191,11 +197,13 @@ private:
   bool m_bVerboseLogging;
   bool m_bShowStartupTips;
   long m_iCurrentTip;
+  bool m_bUseBackgroundTasks;
 
   wxDocManager* m_docManager;
   MainFrame* m_pFrame;
   wxConfig* m_pConfig;
   wxTextCtrl* m_pLog;
+  TextFileDocument* m_pLogDoc;
   wxDocTemplate* m_pDocTemplImage;
   wxDocTemplate* m_pDocTemplProjection;
   wxDocTemplate* m_pDocTemplPhantom;
@@ -204,12 +212,11 @@ private:
 #if wxUSE_GLCANVAS
   wxDocTemplate* m_pDocTemplGraph3d;
 #endif
-  
-  TextFileDocument* m_pLogDoc;
 
   void usage (const char* program);
   void openConfig();
   void closeConfig();
+  BackgroundManager*  m_pBackgroundMgr;
 
 public:
   CTSimApp();
@@ -238,6 +245,10 @@ public:
   void setVerboseLogging (bool bVerbose) { m_bVerboseLogging = bVerbose; }
   bool getStartupTips() const { return m_bShowStartupTips; }
   void setStartupTips(bool bTips) { m_bShowStartupTips = bTips; }
+  bool getUseBackgroundTasks() const { return m_bUseBackgroundTasks; }
+  void setUseBackgroundTasks(bool bBkgd) { m_bUseBackgroundTasks = bBkgd; }
+
+  BackgroundManager* getBackgroundManager() {return m_pBackgroundMgr;}
 
   void ShowTips();
 
@@ -268,7 +279,6 @@ public:
 };
 
 DECLARE_APP(CTSimApp)
-
 extern class CTSimApp* theApp;
 
 enum {
@@ -284,16 +294,27 @@ enum {
     MAINMENU_FILE_EXIT,
     MAINMENU_FILE_PREFERENCES,
     MAINMENU_LOG_EVENT,
-        
+    MAINMENU_IMPORT,
+    
     PJMENU_FILE_PROPERTIES,
     PJMENU_RECONSTRUCT_FBP,
+    PJMENU_RECONSTRUCT_FBP_REBIN,
     PJMENU_RECONSTRUCT_FOURIER,
+    PJMENU_CONVERT_RECTANGULAR,
     PJMENU_CONVERT_POLAR,
     PJMENU_CONVERT_FFT_POLAR,
+    PJMENU_CONVERT_PARALLEL,
+    PJMENU_PLOT_TTHETA_SAMPLING,
+    PJMENU_PLOT_HISTOGRAM,
+    PJMENU_ARTIFACT_REDUCTION,
     
     IFMENU_FILE_EXPORT,
     IFMENU_FILE_PROPERTIES,
-    
+
+    IFMENU_EDIT_COPY,
+    IFMENU_EDIT_CUT,
+    IFMENU_EDIT_PASTE,
+
     IFMENU_PLOT_ROW,
     IFMENU_PLOT_COL,
     IFMENU_PLOT_FFT_ROW,
@@ -312,7 +333,7 @@ enum {
     IFMENU_IMAGE_SUBTRACT,
     IFMENU_IMAGE_MULTIPLY,
     IFMENU_IMAGE_DIVIDE,
-#if wxUSE_GLCANVAS
+#ifdef wxUSE_GLCANVAS
     IFMENU_IMAGE_CONVERT3D,
 #endif
 
@@ -331,6 +352,8 @@ enum {
     IFMENU_FILTER_IFFT_COLS,
     IFMENU_FILTER_MAGNITUDE,
     IFMENU_FILTER_PHASE,
+    IFMENU_FILTER_REAL,
+    IFMENU_FILTER_IMAGINARY,
     IFMENU_FILTER_SHUFFLENATURALTOFOURIERORDER,
     IFMENU_FILTER_SHUFFLEFOURIERTONATURALORDER,
     
@@ -343,7 +366,7 @@ enum {
     PLOTMENU_VIEW_SCALE_AUTO,
     PLOTMENU_VIEW_SCALE_FULL,    
 
-    GRAPH3D_VIEW_SURFACE,
+    GRAPH3D_VIEW_WIREFRAME,
     GRAPH3D_VIEW_COLOR,
     GRAPH3D_VIEW_LIGHTING,
     GRAPH3D_VIEW_SMOOTH,
@@ -352,6 +375,8 @@ enum {
     GRAPH3D_VIEW_SCALE_FULL,
 
     RECONSTRUCTION_THREAD_EVENT,
+    NEW_IMAGEFILE_EVENT,
+    NEW_PROJECTIONFILE_EVENT,
 };
 
 #endif