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