** This is part of the CTSim program
** Copyright (C) 1983-2001 Kevin Rosenberg
**
-** $Id: threadrecon.h,v 1.10 2001/02/25 19:24:01 kevin Exp $
+** $Id$
**
** 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
#ifndef _THREADRECON_H
#define _THREADRECON_H
+#ifdef HAVE_WXTHREADS
+
+
#include <vector>
#include <wx/thread.h>
#include <wx/progdlg.h>
class ProjectionFileDocument;
class ReconstructorWorker;
class ProjectionFileView;
+struct ReconstructionROI;
class ReconstructorSupervisorThread : public SupervisorThread {
private:
const std::string m_strInterpName;
const int m_iInterpParam;
const std::string m_strBackprojectName;
- const std::string m_strLabel;
+ const wxString m_strLabel;
+ ReconstructionROI m_reconROI;
+ const bool m_bRebinToParallel;
public:
- ReconstructorSupervisorThread(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);
+ ReconstructorSupervisorThread(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, wxChar const* pszLabel,
+ ReconstructionROI* pROI, bool bRebinToParallel);
virtual wxThread::ExitCode Entry();
private:
std::vector<ImageFile*> m_vecpChildImageFile;
- ProjectionFileDocument* m_pProjDoc;
+ const Projections* m_pProj;
ProjectionFileView* m_pProjView;
-
+ ProjectionFileDocument* m_pProjDoc;
+
const int m_iImageNX;
const int m_iImageNY;
const char* const m_pszInterpName;
const int m_iInterpParam;
const char* const m_pszBackprojectName;
- const char* const m_pszLabel;
+ const wxString m_strLabel;
+ ReconstructionROI* m_pReconROI;
public:
- 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);
+ ReconstructorSupervisor (SupervisorThread* pMyThread, Projections* pProj, 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, wxChar const* pszLabel, ReconstructionROI* pReconROI);
virtual BackgroundWorkerThread* createWorker (int iThread, int iStartUnit, int iNumUnits);
};
-
-
class ReconstructorWorker : public BackgroundWorkerThread {
private:
+ const Projections* m_pProj;
ProjectionFileView* m_pProjView;
ImageFile* m_pImageFile;
const char* m_pszFilterName;
const char* m_pszInterpName;
int m_iInterpParam;
const char* m_pszBackprojectName;
+ ReconstructionROI* m_pReconROI;
public:
- ReconstructorWorker (ReconstructorSupervisor* pSupervisor, int iThread, int iStartView, int iNumViews)
+ ReconstructorWorker (ReconstructorSupervisor* pSupervisor, int iThread, int iStartView, int iNumViews)
: BackgroundWorkerThread (pSupervisor, iThread, iStartView, iNumViews)
{}
-
- void SetParameters (ProjectionFileView* pProjFile, ImageFile* pImageFile,
- const char* const pszFilterName, double dFilterParam, const char* const pszFilterMethod,
+
+ void SetParameters (const Projections* pProj, ProjectionFileView* pProjFile, ImageFile* pImageFile,
+ const char* const pszFilterName, double dFilterParam, const char* const pszFilterMethod,
int iZeropad, const char* const pszFilterGenerationName, const char* const pszInterpName, int iInterpParam,
- const char* pszBackprojectName);
+ const char* pszBackprojectName, ReconstructionROI* pROI);
virtual wxThread::ExitCode Entry(); // thread execution starts here
virtual void OnExit();
};
+#endif // HAVE_WXTHREADS
+#endif // _THREADRECON_H_
-#endif
-