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.15 2000/12/21 03:40:58 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 ******************************************************************************/
34 #include "ctsupport.h"
37 #include "procsignal.h"
41 // CLASS StringValueAndTitleListBox
43 // A superclass of wxListBox that can handle string values and titles
44 // and by displaying the title in the list box and returning the string value
46 class StringValueAndTitleListBox : public wxListBox
49 StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
51 const char* getSelectionStringValue () const;
54 const char** m_ppszValues;
58 class DialogGetPhantom : public wxDialog
61 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
62 virtual ~DialogGetPhantom () {}
64 const char* getPhantom ();
67 StringValueAndTitleListBox* m_pListBoxPhantom;
73 class DialogGetMinMax : public wxDialog
76 DialogGetMinMax (wxFrame* pParent, const char* const pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
77 virtual ~DialogGetMinMax ();
83 wxTextCtrl* m_pTextCtrlMin;
84 wxTextCtrl* m_pTextCtrlMax;
91 class DialogGetRasterParameters : public wxDialog
94 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
95 virtual ~DialogGetRasterParameters ();
97 unsigned int getXSize ();
98 unsigned int getYSize ();
99 unsigned int getNSamples ();
102 wxTextCtrl* m_pTextCtrlXSize;
103 wxTextCtrl* m_pTextCtrlYSize;
104 wxTextCtrl* m_pTextCtrlNSamples;
108 int m_iDefaultNSamples;
112 class DialogGetProjectionParameters : public wxDialog
115 DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., double dDefaultFocalLength = 1, double dDefaultFieldOfView = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE);
116 ~DialogGetProjectionParameters ();
118 unsigned int getNDet ();
119 unsigned int getNView ();
120 unsigned int getNSamples ();
123 double getRotAngle ();
124 double getFieldOfViewRatio ();
125 double getFocalLengthRatio ();
126 const char* getGeometry();
129 wxTextCtrl* m_pTextCtrlNDet;
130 wxTextCtrl* m_pTextCtrlNView;
131 wxTextCtrl* m_pTextCtrlNSamples;
132 wxTextCtrl* m_pTextCtrlRotAngle;
133 wxTextCtrl* m_pTextCtrlFocalLength;
134 wxTextCtrl* m_pTextCtrlFieldOfView;
136 StringValueAndTitleListBox* m_pListBoxGeometry;
137 StringValueAndTitleListBox* m_pListBoxTrace;
141 int m_iDefaultNSamples;
143 int m_iDefaultGeometry;
144 double m_dDefaultRotAngle;
145 double m_dDefaultFocalLength;
146 double m_dDefaultFieldOfView;
150 #include "backprojectors.h"
151 class DialogGetReconstructionParameters : public wxDialog
154 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, int iDefaultTrace = Trace::TRACE_NONE);
155 virtual ~DialogGetReconstructionParameters ();
157 unsigned int getXSize();
158 unsigned int getYSize();
159 const char* getFilterName();
160 double getFilterParam();
161 const char* getFilterMethodName();
162 unsigned int getZeropad();
163 const char* getFilterGenerationName();
164 const char* getInterpName();
165 unsigned int getInterpParam();
166 const char* getBackprojectName();
170 wxTextCtrl* m_pTextCtrlXSize;
171 wxTextCtrl* m_pTextCtrlYSize;
172 wxTextCtrl* m_pTextCtrlZeropad;
173 wxTextCtrl* m_pTextCtrlFilterParam;
174 wxTextCtrl* m_pTextCtrlInterpParam;
176 StringValueAndTitleListBox* m_pListBoxFilter;
177 StringValueAndTitleListBox* m_pListBoxFilterMethod;
178 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
179 StringValueAndTitleListBox* m_pListBoxInterp;
180 StringValueAndTitleListBox* m_pListBoxBackproject;
181 StringValueAndTitleListBox* m_pListBoxTrace;
185 double m_dDefaultFilterParam;
186 int m_iDefaultZeropad;
187 int m_iDefaultInterpParam;
191 class DialogAutoScaleParameters : public wxDialog
194 DialogAutoScaleParameters (wxFrame* pParent, double mean, double mode, double median, double stddev, double dDefaultScaleFactor = 1.);
195 virtual ~DialogAutoScaleParameters() {}
197 bool getMinMax (double* pMin, double* pMax);
198 double getAutoScaleFactor ();
201 const double m_dMean;
\r
202 const double m_dMode;
203 const double m_dMedian;
\r
204 const double m_dStdDev;
\r
206 wxTextCtrl* m_pTextCtrlStdDevFactor;
207 wxListBox* m_pListBoxCenter;