Revert "Update package dependency from libwxgtk3.0-dev to libwxgtk3.0-gtk3-dev for...
[ctsim.git] / include / reconstruct.h
1 /*****************************************************************************
2 ** FILE IDENTIFICATION
3 **
4 **   Name:         reconstruct.h          Header file for Reconstruction class
5 **   Programmer:   Kevin Rosenberg
6 **   Date Started: Aug 84
7 **
8 **  This is part of the CTSim program
9 **  Copyright (c) 1983-2009 Kevin Rosenberg
10 **
11 **  This program is free software; you can redistribute it and/or modify
12 **  it under the terms of the GNU General Public License (version 2) as
13 **  published by the Free Software Foundation.
14 **
15 **  This program is distributed in the hope that it will be useful,
16 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 **  GNU General Public License for more details.
19 **
20 **  You should have received a copy of the GNU General Public License
21 **  along with this program; if not, write to the Free Software
22 **  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23 ******************************************************************************/
24
25 #ifndef __RECONSTRUCT_H
26 #define __RECONSTRUCT_H
27
28
29 class Projections;
30 class ImageFile;
31 class Backprojector;
32 class ProcessSignal;
33
34 #include <string>
35
36 struct ReconstructionROI {
37   double m_dXMin;
38   double m_dYMin;
39   double m_dXMax;
40   double m_dYMax;
41 };
42
43 class Reconstructor
44 {
45  private:
46     const Projections& m_rOriginalProj;
47     const Projections* m_pProj;
48     ImageFile& m_rImagefile;
49     ProcessSignal* m_pProcessSignal;
50     Backprojector* m_pBackprojector;
51     int m_nFilteredProjections;
52     int m_iTrace;
53     const bool m_bRebinToParallel;
54     bool m_bFail;
55     std::string m_strFailMessage;
56
57     double* m_adPlotXAxis;
58
59  public:
60     Reconstructor (const Projections& rProj, ImageFile& rIF, const char* const filterName, double filt_param,
61       const char* const filterMethodName, const int zeropad, const char* filterGenerationName,
62       const char* const interpName, int interpFactor, const char* const backprojectName, const int trace,
63       ReconstructionROI* pROI = NULL, bool bRebinToParallel = false, SGP* pSGP = NULL);
64
65     ~Reconstructor ();
66
67     bool fail() const {return m_bFail;}
68     const std::string& failMessage() const {return m_strFailMessage;}
69
70     void plotFilter (SGP* pSGP = NULL);
71
72     void reconstructAllViews ();
73
74     void reconstructView (int iStartView = 0, int iViewCount = -1, SGP* pSGP = NULL, bool bBackprojectView = true, double dGraphWidth = 1.);
75     void postProcessing ();
76 };
77
78 #endif