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.8 2000/07/28 08:28:08 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 ******************************************************************************/
38 // CLASS StringValueAndTitleListBox
40 // A superclass of wxListBox that can handle string values and titles
41 // and by displaying the title in the list box and returning the string value
43 class StringValueAndTitleListBox : public wxListBox
46 StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
48 const char* getSelectionStringValue (void) const;
51 const char** m_ppszValues;
55 class DialogGetPhantom : public wxDialog
58 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
59 virtual ~DialogGetPhantom (void) {}
61 const char* getPhantom (void);
64 StringValueAndTitleListBox* m_pListBoxPhantom;
69 class DialogGetImageMinMax : public wxDialog
72 DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
73 virtual ~DialogGetImageMinMax (void);
75 double getMinimum (void);
76 double getMaximum (void);
79 wxTextCtrl* m_pTextCtrlMin;
80 wxTextCtrl* m_pTextCtrlMax;
87 class DialogGetRasterParameters : public wxDialog
90 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
91 virtual ~DialogGetRasterParameters (void);
93 unsigned int getXSize (void);
94 unsigned int getYSize (void);
95 unsigned int getNSamples (void);
98 wxTextCtrl* m_pTextCtrlXSize;
99 wxTextCtrl* m_pTextCtrlYSize;
100 wxTextCtrl* m_pTextCtrlNSamples;
104 int m_iDefaultNSamples;
108 class DialogGetProjectionParameters : public wxDialog
111 DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL);
112 ~DialogGetProjectionParameters (void);
114 unsigned int getNDet (void);
115 unsigned int getNView (void);
116 unsigned int getNSamples (void);
117 double getRotAngle (void);
118 const char* getGeometry(void);
121 wxTextCtrl* m_pTextCtrlNDet;
122 wxTextCtrl* m_pTextCtrlNView;
123 wxTextCtrl* m_pTextCtrlNSamples;
124 wxTextCtrl* m_pTextCtrlRotAngle;
126 StringValueAndTitleListBox* m_pListBoxGeometry;
130 int m_iDefaultNSamples;
131 double m_dDefaultRotAngle;
135 #include "backprojectors.h"
136 class DialogGetReconstructionParameters : public wxDialog
139 DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = SignalFilter::FILTER_METHOD_CONVOLUTION, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3);
140 virtual ~DialogGetReconstructionParameters (void);
142 unsigned int getXSize(void);
143 unsigned int getYSize(void);
144 const char* getFilterName(void);
145 double getFilterParam(void);
146 const char* getFilterMethodName(void);
147 unsigned int getZeropad(void);
148 const char* getInterpName(void);
149 unsigned int getInterpParam(void);
150 const char* getBackprojectName(void);
153 wxTextCtrl* m_pTextCtrlXSize;
154 wxTextCtrl* m_pTextCtrlYSize;
155 wxTextCtrl* m_pTextCtrlZeropad;
156 wxTextCtrl* m_pTextCtrlFilterParam;
157 wxTextCtrl* m_pTextCtrlInterpParam;
159 StringValueAndTitleListBox* m_pListBoxFilter;
160 StringValueAndTitleListBox* m_pListBoxFilterMethod;
161 StringValueAndTitleListBox* m_pListBoxInterp;
162 StringValueAndTitleListBox* m_pListBoxBackproject;
166 double m_dDefaultFilterParam;
167 int m_iDefaultZeropad;
168 int m_iDefaultInterpParam;