Applied initial patches for wx2.8 compatibility
[ctsim.git] / src / threadrecon.h
index f4f91057787b14351797669be6655b00b17796df..ff74bba9321bd3811c8cdfdd33030873c03db898 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2001 Kevin Rosenberg
 **
-**  $Id: threadrecon.h,v 1.8 2001/02/25 06:32:12 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
@@ -28,6 +28,9 @@
 #ifndef _THREADRECON_H
 #define _THREADRECON_H
 
+#ifdef HAVE_WXTHREADS
+
+
 #include <vector>
 #include <wx/thread.h>
 #include <wx/progdlg.h>
@@ -40,6 +43,7 @@ class ImageFile;
 class ProjectionFileDocument;
 class ReconstructorWorker;
 class ProjectionFileView;
+struct ReconstructionROI;
 
 class ReconstructorSupervisorThread : public SupervisorThread {
 private:
@@ -55,12 +59,15 @@ 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();
 
@@ -73,9 +80,10 @@ class ReconstructorSupervisor : public BackgroundSupervisor {
 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;
 
@@ -87,12 +95,14 @@ private:
   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 (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);
 
@@ -105,10 +115,9 @@ public:
 };
 
 
-
-
 class ReconstructorWorker : public BackgroundWorkerThread {
 private:
+  const Projections* m_pProj;
   ProjectionFileView* m_pProjView;
   ImageFile* m_pImageFile;
   const char* m_pszFilterName;
@@ -119,22 +128,23 @@ private:
   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)
   {}
-  
-  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
-