r608: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 5 Mar 2001 19:14:40 +0000 (19:14 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 5 Mar 2001 19:14:40 +0000 (19:14 +0000)
src/backgroundmgr.cpp
src/backgroundsupr.cpp
src/threadraster.cpp
src/threadrecon.h

index ff22e58352a70a0747fc34d462bec7a49c35f98a..3a93370bea1c274d5ffc4696cf3caaf74ae8ec0a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundmgr.cpp,v 1.10 2001/03/05 15:16:25 kevin Exp $
+**  $Id: backgroundmgr.cpp,v 1.11 2001/03/05 19:14:40 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
 **
 **  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
@@ -236,7 +236,7 @@ BEGIN_EVENT_TABLE(BackgroundManagerCanvas, wxPanel)
 END_EVENT_TABLE()
 
 BackgroundManagerCanvas::BackgroundManagerCanvas (BackgroundManager* pMgr)
 END_EVENT_TABLE()
 
 BackgroundManagerCanvas::BackgroundManagerCanvas (BackgroundManager* pMgr)
-: m_pBackgroundManager(pMgr), wxPanel (pMgr)
+: wxPanel (pMgr), m_pBackgroundManager(pMgr)
 {
 }
 
 {
 }
 
index 561009c8b97a368ae41aaf2eb3eeb79abab415f5..7ec34080bed745d297c99197554e8a16497c4ad1 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundsupr.cpp,v 1.13 2001/03/05 17:26:46 kevin Exp $
+**  $Id: backgroundsupr.cpp,v 1.14 2001/03/05 19:14:40 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
 **
 **  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
@@ -40,6 +40,8 @@
 
 #ifdef HAVE_WXTHREADS
 
 
 #ifdef HAVE_WXTHREADS
 
+#define USE_BKGMGR 1
+
 ////////////////////////////////////////////////////////////////////////////
 //
 // Class BackgroundSupervisor -- An event handler run by a SupervisorThread
 ////////////////////////////////////////////////////////////////////////////
 //
 // Class BackgroundSupervisor -- An event handler run by a SupervisorThread
@@ -68,9 +70,11 @@ BackgroundSupervisor::BackgroundSupervisor (SupervisorThread* pMyThread, wxFrame
 
 BackgroundSupervisor::~BackgroundSupervisor()
 {
 
 BackgroundSupervisor::~BackgroundSupervisor()
 {
+#ifdef USE_BKGMGR
   wxCommandEvent doneEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_REMOVE);
   doneEvent.SetClientData (this);
   wxPostEvent (theApp->getBackgroundManager(), doneEvent);
   wxCommandEvent doneEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_REMOVE);
   doneEvent.SetClientData (this);
   wxPostEvent (theApp->getBackgroundManager(), doneEvent);
+#endif
 
   m_pDocument->removeBackgroundSupervisor (this);
 
 
   m_pDocument->removeBackgroundSupervisor (this);
 
@@ -128,11 +132,14 @@ BackgroundSupervisor::start()
   std::string strLabel (m_strProcessTitle);
   strLabel += " ";
   strLabel += m_pParentFrame->GetTitle();
   std::string strLabel (m_strProcessTitle);
   strLabel += " ";
   strLabel += m_pParentFrame->GetTitle();
+
+#ifdef USE_BKGMGR
   wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
   addTaskEvent.SetString (strLabel.c_str());
   addTaskEvent.SetInt (m_iTotalUnits);
   addTaskEvent.SetClientData (this);
   wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
   wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_ADD);
   addTaskEvent.SetString (strLabel.c_str());
   addTaskEvent.SetInt (m_iTotalUnits);
   addTaskEvent.SetClientData (this);
   wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
+#endif
 
   m_pDocument->addBackgroundSupervisor (this);
   
 
   m_pDocument->addBackgroundSupervisor (this);
   
@@ -163,10 +170,12 @@ BackgroundSupervisor::onWorkerUnitTick ()
       *theApp->getLog() << "Units done: " << static_cast<int>(m_iUnitsDone) <<"\n";
 #endif
     
       *theApp->getLog() << "Units done: " << static_cast<int>(m_iUnitsDone) <<"\n";
 #endif
     
+#ifdef USE_BKGMGR
     wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
     addTaskEvent.SetInt (m_iUnitsDone - 1);
     addTaskEvent.SetClientData (this);
     wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
     wxCommandEvent addTaskEvent (wxEVT_COMMAND_MENU_SELECTED, MSG_BACKGROUND_SUPERVISOR_UNIT_TICK);
     addTaskEvent.SetInt (m_iUnitsDone - 1);
     addTaskEvent.SetClientData (this);
     wxPostEvent (theApp->getBackgroundManager(), addTaskEvent);
+#endif
 }
 
 void
 }
 
 void
index f1678ce613d79b0dd92416426e8d9e3f43b5b411..736bf90b71d1606ec044281b08fcef3c6873ce45 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadraster.cpp,v 1.9 2001/03/05 17:26:46 kevin Exp $
+**  $Id: threadraster.cpp,v 1.10 2001/03/05 19:14:40 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
 **
 **  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
@@ -65,28 +65,28 @@ RasterizerSupervisorThread::RasterizerSupervisorThread (PhantomFileView* pProjVi
 wxThread::ExitCode
 RasterizerSupervisorThread::Entry()
 {
 wxThread::ExitCode
 RasterizerSupervisorThread::Entry()
 {
-  RasterizerSupervisor* pRasterSupervisor = new RasterizerSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
+  RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str());
 
 
-  pRasterSupervisor->start();
+  rasterSupervisor.start();
 
 
-  while (! pRasterSupervisor->workersDone() && ! pRasterSupervisor->fail() && ! pRasterSupervisor->cancelled()) {
+  while (! rasterSupervisor.workersDone() && ! rasterSupervisor.fail() && ! rasterSupervisor.cancelled()) {
     Sleep(100);
   }
 
     Sleep(100);
   }
 
-  if (pRasterSupervisor->fail())
+  if (rasterSupervisor.fail())
   {
     wxString msg ("Error starting Rasterizer supervisor: ");
   {
     wxString msg ("Error starting Rasterizer supervisor: ");
-    msg += pRasterSupervisor->getFailMessage().c_str();
+    msg += rasterSupervisor.getFailMessage().c_str();
     msg += "\n";
     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
     eventLog.SetString( msg );
     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
   }
 
     msg += "\n";
     wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT );
     eventLog.SetString( msg );
     wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event
   }
 
-  if (! pRasterSupervisor->cancelled())
-    pRasterSupervisor->onDone();
-  pRasterSupervisor->deleteWorkers();
-
+  if (! rasterSupervisor.cancelled())
+    rasterSupervisor.onDone();
+  rasterSupervisor.deleteWorkers();
+  
   return reinterpret_cast<wxThread::ExitCode>(0);
 }
 
   return reinterpret_cast<wxThread::ExitCode>(0);
 }
 
index f8d2940ee53483fc54da73dc3b12edc0386cc0a0..89c58fe61ff27e3788b9a78a2453ec793627cac0 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.h,v 1.11 2001/03/02 21:11:50 kevin Exp $
+**  $Id: threadrecon.h,v 1.12 2001/03/05 19:14:40 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
 **
 **  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
@@ -76,8 +76,8 @@ class ReconstructorSupervisor : public BackgroundSupervisor {
 private:
 
   std::vector<ImageFile*> m_vecpChildImageFile;
 private:
 
   std::vector<ImageFile*> m_vecpChildImageFile;
-  ProjectionFileDocument* m_pProjDoc;
   ProjectionFileView* m_pProjView;
   ProjectionFileView* m_pProjView;
+  ProjectionFileDocument* m_pProjDoc;
     
   const int m_iImageNX;
   const int m_iImageNY;
     
   const int m_iImageNX;
   const int m_iImageNY;