X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadrecon.h;h=ff74bba9321bd3811c8cdfdd33030873c03db898;hp=97b36f42238a51720e2d4020191f597c90a21451;hb=f7ee98f7d964ed361068179f0e7ea4475ed1abdf;hpb=a97f1819c4f24321ba8d54a16f6534ee94404d26 diff --git a/src/threadrecon.h b/src/threadrecon.h index 97b36f4..ff74bba 100644 --- a/src/threadrecon.h +++ b/src/threadrecon.h @@ -9,7 +9,7 @@ ** 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 @@ -28,6 +28,9 @@ #ifndef _THREADRECON_H #define _THREADRECON_H +#ifdef HAVE_WXTHREADS + + #include #include #include @@ -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 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 (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); @@ -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) {} - - 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 -