r586: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 25 Feb 2001 19:24:01 +0000 (19:24 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 25 Feb 2001 19:24:01 +0000 (19:24 +0000)
src/Makefile.in
src/backgroundsupr.cpp
src/backgroundsupr.h
src/threadproj.cpp
src/threadproj.h
src/threadrecon.cpp
src/threadrecon.h

index 0bb18c1eadf0826a325b2b5325d303952f371951..0a7b4bccd8849dc3c8fd7815bad9c97c86ba925b 100644 (file)
@@ -92,7 +92,8 @@ wxlibs = @wxlibs@
 
 bin_PROGRAMS = ctsim
 
-ctsim_SOURCES = ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h dlgreconstruct.cpp dlgreconstruct.h  graph3dview.cpp graph3dview.h ctsim-map.h ctsim.xpm splash.xpm 
+ctsim_SOURCES = ctsim.cpp docs.cpp views.cpp dialogs.cpp ctsim.h docs.h views.h dialogs.h dlgprojections.cpp dlgprojections.h dlgreconstruct.cpp dlgreconstruct.h  graph3dview.cpp graph3dview.h ctsim-map.h ctsim.xpm splash.xpm tips.cpp tips.h threadrecon.cpp threadrecon.h backgroundmgr.cpp backgroundmgr.h backgroundsupr.cpp backgroundsupr.h threadproj.cpp threadproj.h
+
 ctsim_DEPENDENCIES = ../libctgraphics/libctgraphics.a ../libctsupport/libctsupport.a ../libctsim/libctsim.a ../include/ct.h
 ctsim_LDADD = -L../libctgraphics -L../libctsupport -L../libctsim @ctlibs@
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -106,7 +107,8 @@ CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 ctsim_OBJECTS =  ctsim.o docs.o views.o dialogs.o dlgprojections.o \
-dlgreconstruct.o graph3dview.o
+dlgreconstruct.o graph3dview.o tips.o threadrecon.o backgroundmgr.o \
+backgroundsupr.o threadproj.o
 ctsim_LDFLAGS = 
 CXXFLAGS = @CXXFLAGS@
 CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -123,8 +125,10 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
 TAR = gtar
 GZIP_ENV = --best
-DEP_FILES =  .deps/ctsim.P .deps/dialogs.P .deps/dlgprojections.P \
-.deps/dlgreconstruct.P .deps/docs.P .deps/graph3dview.P .deps/views.P
+DEP_FILES =  .deps/backgroundmgr.P .deps/backgroundsupr.P .deps/ctsim.P \
+.deps/dialogs.P .deps/dlgprojections.P .deps/dlgreconstruct.P \
+.deps/docs.P .deps/graph3dview.P .deps/threadproj.P .deps/threadrecon.P \
+.deps/tips.P .deps/views.P
 SOURCES = $(ctsim_SOURCES)
 OBJECTS = $(ctsim_OBJECTS)
 
index 4f9e4c616eaab24cb1cf256b8e448048231ed1ab..4083c8220f8647253b19f44aa124c2bd8eae9bb3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundsupr.cpp,v 1.6 2001/02/25 16:21:36 kevin Exp $
+**  $Id: backgroundsupr.cpp,v 1.7 2001/02/25 19:24:01 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
@@ -92,7 +92,7 @@ BackgroundSupervisor::~BackgroundSupervisor()
   }
 
   while (m_bBackgroundTaskAdded) {
-    Sleep(50);
+    m_pMyThread->Sleep(50);
     ProcessPendingEvents();
   }
 
@@ -113,7 +113,7 @@ BackgroundSupervisor::deleteWorkers()
   }
 
   while (m_iRunning > 0) {
-    Sleep(50);
+    m_pMyThread->Sleep(50);
     ProcessPendingEvents();
   }
   m_iRunning = 0;
index acc5f55b2331a7af0653790537035bf3c1b4abc6..12372d0b4e0e88ae5eed87445d3744ee90182d7d 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: backgroundsupr.h,v 1.3 2001/02/25 08:43:03 kevin Exp $
+**  $Id: backgroundsupr.h,v 1.4 2001/02/25 19:24:01 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
@@ -53,7 +53,7 @@ class BackgroundWorkerThread;
 class BackgroundSupervisor : public wxEvtHandler {
 private:
   DECLARE_DYNAMIC_CLASS(BackgroundSupervisor)
-
+      
   typedef std::vector<BackgroundWorkerThread*> ThreadContainer;
   ThreadContainer m_vecpThreads;
   wxFrame* m_pParentFrame;
@@ -74,6 +74,9 @@ private:
   bool m_bWorkersDeleted;
   wxCriticalSection m_critsectThreads;
 
+protected:
+  SupervisorThread* m_MyThread;
+
 public:
   enum {
     MSG_BACKGROUND_SUPERVISOR_ADD = 7500, // sends to BackgroundManager and Document
@@ -87,7 +90,7 @@ public:
     MSG_WORKER_THREAD_FAIL = 7507,   // sent by workers when they fail
   };
 
-  BackgroundSupervisor (wxFrame* pParentFrame, wxDocument* pDocument, const char* const pszProcessTitle, 
+  BackgroundSupervisor (SupervisorThread* pMyThread, wxFrame* pParentFrame, wxDocument* pDocument, const char* const pszProcessTitle, 
     int iTotalUnits);
 
   BackgroundSupervisor ()
@@ -138,4 +141,4 @@ public:
   {}
 };
 
-#endif  // _BACKGROUNDSUPR_H_
\ No newline at end of file
+#endif  // _BACKGROUNDSUPR_H_
index db6070c1484a8a5b12bd92ddc9fb228556aca137..dfdf2be26e43ceee7ed28b8464e937cb1e0d6a58 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadproj.cpp,v 1.3 2001/02/25 16:21:36 kevin Exp $
+**  $Id: threadproj.cpp,v 1.4 2001/02/25 19:24:01 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
@@ -64,12 +64,12 @@ ProjectorSupervisorThread::ProjectorSupervisorThread (PhantomFileView* pProjView
 wxThread::ExitCode
 ProjectorSupervisorThread::Entry()
 {
-  ProjectorSupervisor projSupervisor (m_pPhantomView, m_iNDet, m_iNView, 
+  ProjectorSupervisor projSupervisor (this, m_pPhantomView, m_iNDet, m_iNView, 
    m_strGeometry.c_str(), m_iNSample, m_dRotation, m_dFocalLength, m_dViewRatio, m_dScanRatio, m_strLabel.c_str());
 
   projSupervisor.start();
   while (! projSupervisor.isDone() && ! projSupervisor.fail()) {
-    Sleep(50);
+    Sleep(100);
     Yield();
   }
   if (projSupervisor.fail())
@@ -102,14 +102,14 @@ ProjectorSupervisorThread::OnExit()
 //
 /////////////////////////////////////////////////////////////////////
 
-ProjectorSupervisor::ProjectorSupervisor (PhantomFileView* pPhantomView, int iNDet, int iNView, 
+ProjectorSupervisor::ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pPhantomView, int iNDet, int iNView, 
    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dViewRatio, 
    double dScanRatio, const char* const pszLabel)
     : m_pPhantomView(pPhantomView), m_pPhantomDoc(pPhantomView->GetDocument()), 
       m_iNDet(iNDet), m_iNView(iNView),
       m_pszGeometry(pszGeometry), m_iNSample(iNSample), m_dRotation(dRotation), m_dFocalLength(dFocalLength),
       m_dViewRatio(dViewRatio), m_dScanRatio(dScanRatio), m_pszLabel(pszLabel), 
-      BackgroundSupervisor (pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Projecting", iNView)
+      BackgroundSupervisor (pThread, pPhantomView->GetFrame(), pPhantomView->GetDocument(), "Projecting", iNView)
 {
   m_pScanner = new Scanner (m_pPhantomDoc->getPhantom(), m_pszGeometry, m_iNDet,
                   m_iNView, m_iNSample, m_dRotation, m_dFocalLength, m_dViewRatio, m_dScanRatio);
index 6bb16f5e3d6ba605d649ad0d153ffcbff436adbd..6e6db11cffbb2780b462a80266f69049cc3769fd 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadproj.h,v 1.2 2001/02/25 15:27:28 kevin Exp $
+**  $Id: threadproj.h,v 1.3 2001/02/25 19:24:01 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
@@ -86,7 +86,7 @@ private:
 
 
 public:
-   ProjectorSupervisor (PhantomFileView* pProjView, int iNDet, int iNView, 
+   ProjectorSupervisor (SupervisorThread* pThread, PhantomFileView* pProjView, int iNDet, int iNView, 
    const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dViewRatio, 
    double dScanRatio, const char* const pszLabel);
 
index 51b930d536ea416eb801d651989d767716051868..dba08273bb2580683a8e31f2ce52866abe56e73c 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.cpp,v 1.12 2001/02/25 10:52:55 kevin Exp $
+**  $Id: threadrecon.cpp,v 1.13 2001/02/25 19:24:01 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
@@ -65,13 +65,13 @@ ReconstructorSupervisorThread::ReconstructorSupervisorThread (ProjectionFileView
 wxThread::ExitCode
 ReconstructorSupervisorThread::Entry()
 {
-  ReconstructorSupervisor reconSupervisor (m_pProjView, m_iNX, m_iNY, 
+  ReconstructorSupervisor reconSupervisor (this, m_pProjView, m_iNX, m_iNY, 
    m_strFilterName.c_str(), m_dFilterParam, m_strFilterMethod.c_str(), m_iZeropad, m_strFilterGenerationName.c_str(), 
    m_strInterpName.c_str(), m_iInterpParam, m_strBackprojectName.c_str(), m_strLabel.c_str());
 
   reconSupervisor.start();
   while (! reconSupervisor.isDone() && ! reconSupervisor.fail()) {
-    Sleep(50);
+    Sleep(100);
     Yield();
   }
   if (reconSupervisor.fail())
@@ -104,7 +104,7 @@ ReconstructorSupervisorThread::OnExit()
 //
 /////////////////////////////////////////////////////////////////////
 
-ReconstructorSupervisor::ReconstructorSupervisor (ProjectionFileView* pProjView, 
+ReconstructorSupervisor::ReconstructorSupervisor (SupervisorThread* pThread, ProjectionFileView* pProjView, 
   int iImageNX, int iImageNY, const char* pszFilterName, double dFilterParam, const char* pszFilterMethod, 
   int iZeropad, const char* pszFilterGenerationName, const char* pszInterpName, int iInterpParam,
   const char* pszBackprojectName, const char* const pszLabel)
@@ -113,7 +113,7 @@ ReconstructorSupervisor::ReconstructorSupervisor (ProjectionFileView* pProjView,
       m_pszFilterName(pszFilterName), m_dFilterParam(dFilterParam), m_pszFilterMethod(pszFilterMethod),
       m_iZeropad(iZeropad), m_pszFilterGenerationName(pszFilterGenerationName), m_pszInterpName(pszInterpName),
       m_iInterpParam(iInterpParam), m_pszBackprojectName(pszBackprojectName), m_pszLabel(pszLabel), 
-      BackgroundSupervisor (pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView())
+      BackgroundSupervisor (pThread, pProjView->GetFrame(), pProjView->GetDocument(), "Reconstructing", pProjView->GetDocument()->getProjections().nView())
 {
   m_vecpChildImageFile.reserve (getNumWorkers());
   for (unsigned int iThread = 0; iThread < getNumWorkers(); iThread++) {
index cbb2ea91df31b41616219b5a790bbdf3607caa68..97b36f42238a51720e2d4020191f597c90a21451 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.h,v 1.9 2001/02/25 10:52:55 kevin Exp $
+**  $Id: threadrecon.h,v 1.10 2001/02/25 19:24:01 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
@@ -90,7 +90,7 @@ private:
   const char* const m_pszLabel;
 
 public:
-   ReconstructorSupervisor (ProjectionFileView* pProjView, int iNX, int iNY, const char* pszFilterName, 
+   ReconstructorSupervisor (SupervisorThread* pMyThread, ProjectionFileView* pProjView, int iNX, int iNY, const char* pszFilterName, 
    double dFilterParam, const char* pszFilterMethod, int iZeropad, const char* pszFilterGenerationName, 
    const char* pszInterpName, int iInterpParam, const char* pszBackprojectName, const char* const pszLabel);