1 /*****************************************************************************
5 ** Purpose: Header file for Dialogs of CTSim program
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: July 2000
9 ** This is part of the CTSim program
10 ** Copyright (C) 1983-2000 Kevin Rosenberg
12 ** $Id: dialogs.h,v 1.9 2000/08/22 07:02:48 kevin Exp $
14 ** This program is free software; you can redistribute it and/or modify
15 ** it under the terms of the GNU General Public License (version 2) as
16 ** published by the Free Software Foundation.
18 ** This program is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
23 ** You should have received a copy of the GNU General Public License
24 ** along with this program; if not, write to the Free Software
25 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 ******************************************************************************/
36 #include "procsignal.h"
39 // CLASS StringValueAndTitleListBox
41 // A superclass of wxListBox that can handle string values and titles
42 // and by displaying the title in the list box and returning the string value
44 class StringValueAndTitleListBox : public wxListBox
47 StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
49 const char* getSelectionStringValue (void) const;
52 const char** m_ppszValues;
56 class DialogGetPhantom : public wxDialog
59 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
60 virtual ~DialogGetPhantom (void) {}
62 const char* getPhantom (void);
65 StringValueAndTitleListBox* m_pListBoxPhantom;
70 class DialogGetImageMinMax : public wxDialog
73 DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
74 virtual ~DialogGetImageMinMax (void);
76 double getMinimum (void);
77 double getMaximum (void);
80 wxTextCtrl* m_pTextCtrlMin;
81 wxTextCtrl* m_pTextCtrlMax;
88 class DialogGetRasterParameters : public wxDialog
91 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
92 virtual ~DialogGetRasterParameters (void);
94 unsigned int getXSize (void);
95 unsigned int getYSize (void);
96 unsigned int getNSamples (void);
99 wxTextCtrl* m_pTextCtrlXSize;
100 wxTextCtrl* m_pTextCtrlYSize;
101 wxTextCtrl* m_pTextCtrlNSamples;
105 int m_iDefaultNSamples;
109 class DialogGetProjectionParameters : public wxDialog
112 DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL);
113 ~DialogGetProjectionParameters (void);
115 unsigned int getNDet (void);
116 unsigned int getNView (void);
117 unsigned int getNSamples (void);
118 double getRotAngle (void);
119 const char* getGeometry(void);
122 wxTextCtrl* m_pTextCtrlNDet;
123 wxTextCtrl* m_pTextCtrlNView;
124 wxTextCtrl* m_pTextCtrlNSamples;
125 wxTextCtrl* m_pTextCtrlRotAngle;
127 StringValueAndTitleListBox* m_pListBoxGeometry;
131 int m_iDefaultNSamples;
132 double m_dDefaultRotAngle;
136 #include "backprojectors.h"
137 class DialogGetReconstructionParameters : public wxDialog
140 DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, int iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVALID, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3);
141 virtual ~DialogGetReconstructionParameters (void);
143 unsigned int getXSize(void);
144 unsigned int getYSize(void);
145 const char* getFilterName(void);
146 double getFilterParam(void);
147 const char* getFilterMethodName(void);
148 unsigned int getZeropad(void);
149 const char* getFilterGenerationName(void);
150 const char* getInterpName(void);
151 unsigned int getInterpParam(void);
152 const char* getBackprojectName(void);
155 wxTextCtrl* m_pTextCtrlXSize;
156 wxTextCtrl* m_pTextCtrlYSize;
157 wxTextCtrl* m_pTextCtrlZeropad;
158 wxTextCtrl* m_pTextCtrlFilterParam;
159 wxTextCtrl* m_pTextCtrlInterpParam;
161 StringValueAndTitleListBox* m_pListBoxFilter;
162 StringValueAndTitleListBox* m_pListBoxFilterMethod;
163 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
164 StringValueAndTitleListBox* m_pListBoxInterp;
165 StringValueAndTitleListBox* m_pListBoxBackproject;
169 double m_dDefaultFilterParam;
170 int m_iDefaultZeropad;
171 int m_iDefaultInterpParam;