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
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)
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)
** 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
}
while (m_bBackgroundTaskAdded) {
- Sleep(50);
+ m_pMyThread->Sleep(50);
ProcessPendingEvents();
}
}
while (m_iRunning > 0) {
- Sleep(50);
+ m_pMyThread->Sleep(50);
ProcessPendingEvents();
}
m_iRunning = 0;
** 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
class BackgroundSupervisor : public wxEvtHandler {
private:
DECLARE_DYNAMIC_CLASS(BackgroundSupervisor)
-
+
typedef std::vector<BackgroundWorkerThread*> ThreadContainer;
ThreadContainer m_vecpThreads;
wxFrame* m_pParentFrame;
bool m_bWorkersDeleted;
wxCriticalSection m_critsectThreads;
+protected:
+ SupervisorThread* m_MyThread;
+
public:
enum {
MSG_BACKGROUND_SUPERVISOR_ADD = 7500, // sends to BackgroundManager and Document
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 ()
{}
};
-#endif // _BACKGROUNDSUPR_H_
\ No newline at end of file
+#endif // _BACKGROUNDSUPR_H_
** 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
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())
//
/////////////////////////////////////////////////////////////////////
-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);
** 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
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);
** 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
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())
//
/////////////////////////////////////////////////////////////////////
-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)
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++) {
** 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
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);