--- /dev/null
+/*****************************************************************************
+** FILE IDENTIFICATION
+**
+** Name: threadproj.h
+** Purpose: Header file for thread reconstructions
+** Programmer: Kevin Rosenberg
+** Date Started: February 2001
+**
+** This is part of the CTSim program
+** Copyright (C) 1983-2001 Kevin Rosenberg
+**
+** $Id: threadproj.h,v 1.1 2001/02/25 10:52:55 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
+** published by the Free Software Foundation.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+******************************************************************************/
+
+#ifndef _THREADPROJ_H
+#define _THREADPROJ_H
+
+#include <vector>
+#include <wx/thread.h>
+#include <wx/progdlg.h>
+#include "timer.h"
+#include "backgroundsupr.h"
+
+
+class Reconstructor;
+class ImageFile;
+class PhantomFileDocument;
+class ProjectorWorker;
+class ProjectionFileView;
+
+class ProjectorSupervisorThread : public SupervisorThread {
+private:
+ PhantomFileView* m_pPhantomView;
+ const int m_iNDet;
+ const int m_iNView;
+ const std::string m_strGeometry;
+ const int m_iNSample;
+ const double m_dRotation;
+ const double m_dFocalLength;
+ const double m_dViewRatio;
+ const double m_dScanRatio;
+ const std::string m_strLabel;
+
+public:
+ ProjectorSupervisorThread(PhantomFileView* pProjView, int iNDet, int iNView,
+ const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dViewRatio,
+ double dScanRatio, const char* const pszLabel);
+
+ virtual wxThread::ExitCode Entry();
+
+ virtual void OnExit();
+};
+
+
+
+class ProjectorSupervisor : public BackgroundSupervisor {
+private:
+
+ std::vector<Projections*> m_vecpChildProjections;
+ PhantomFileDocument* m_pPhantomDoc;
+ PhantomFileView* m_pPhantomView;
+
+ const int m_iNDet;
+ const int m_iNView;
+ const char* const m_pszGeometry;
+ const int m_iNSample;
+ const double m_dRotation;
+ const double m_dFocalLength;
+ const double m_dViewRatio;
+ const double m_dScanRatio;
+ const char* const m_pszLabel;
+
+
+public:
+ ProjectorSupervisor (PhantomFileView* pProjView, int iNDet, int iNView,
+ const char* pszGeometry, int iNSample, double dRotation, double dFocalLength, double dViewRatio,
+ double dScanRatio, const char* const pszLabel);
+
+ virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
+
+ virtual ~ProjectorSupervisor ();
+
+ void onDone();
+
+ Projections* getProjections();
+
+};
+
+
+
+
+class ProjectorWorker : public BackgroundWorkerThread {
+private:
+ PhantomFileView* m_pPhantomView;
+ Projections* m_pProjections;
+ int m_iNDet;
+ int m_iNView;
+ const char* m_pszGeometry;
+ int m_iNSample;
+ double m_dRotation;
+ double m_dFocalLength;
+ double m_dViewRatio;
+ double m_dScanRatio;
+
+
+public:
+ ProjectorWorker (ProjectorSupervisor* pSupervisor, int iThread, int iStartView, int iNumViews)
+ : BackgroundWorkerThread (pSupervisor, iThread, iStartView, iNumViews)
+ {}
+
+ void SetParameters (PhantomFileView* pPhantomFile, Projections* pProjections, int iNDet, int iView,
+ const char* const pszGeometry, int iNSample, double dRotation, double dFocalLength, double dViewRatio,
+ double dScanRatio);
+
+ virtual wxThread::ExitCode Entry(); // thread execution starts here
+
+ virtual void OnExit();
+};
+
+
+#endif
+