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.16 2000/12/22 04:18:00 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;
72 class ImageFileDocument;
\r
73 class DialogGetComparisonImage : public wxDialog
\r
76 DialogGetComparisonImage (wxFrame* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference);
\r
77 virtual ~DialogGetComparisonImage () {}
\r
79 ImageFileDocument* getImageFileDocument ();
\r
81 bool getMakeDifferenceImage();
\r
84 wxListBox* m_pListBoxImageChoices;
\r
85 wxCheckBox* m_pMakeDifferenceImage;
\r
86 const std::vector<ImageFileDocument*>& m_rVecIF;
\r
92 class DialogGetMinMax : public wxDialog
95 DialogGetMinMax (wxFrame* pParent, const char* const pszTitle, double dDefaultMin = 0., double dDefaultMax = 0.);
96 virtual ~DialogGetMinMax ();
102 wxTextCtrl* m_pTextCtrlMin;
103 wxTextCtrl* m_pTextCtrlMax;
105 double m_dDefaultMin;
106 double m_dDefaultMax;
110 class DialogGetRasterParameters : public wxDialog
113 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
114 virtual ~DialogGetRasterParameters ();
116 unsigned int getXSize ();
117 unsigned int getYSize ();
118 unsigned int getNSamples ();
121 wxTextCtrl* m_pTextCtrlXSize;
122 wxTextCtrl* m_pTextCtrlYSize;
123 wxTextCtrl* m_pTextCtrlNSamples;
127 int m_iDefaultNSamples;
131 class DialogGetProjectionParameters : public wxDialog
134 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);
135 ~DialogGetProjectionParameters ();
137 unsigned int getNDet ();
138 unsigned int getNView ();
139 unsigned int getNSamples ();
142 double getRotAngle ();
143 double getFieldOfViewRatio ();
144 double getFocalLengthRatio ();
145 const char* getGeometry();
148 wxTextCtrl* m_pTextCtrlNDet;
149 wxTextCtrl* m_pTextCtrlNView;
150 wxTextCtrl* m_pTextCtrlNSamples;
151 wxTextCtrl* m_pTextCtrlRotAngle;
152 wxTextCtrl* m_pTextCtrlFocalLength;
153 wxTextCtrl* m_pTextCtrlFieldOfView;
155 StringValueAndTitleListBox* m_pListBoxGeometry;
156 StringValueAndTitleListBox* m_pListBoxTrace;
160 int m_iDefaultNSamples;
162 int m_iDefaultGeometry;
163 double m_dDefaultRotAngle;
164 double m_dDefaultFocalLength;
165 double m_dDefaultFieldOfView;
169 #include "backprojectors.h"
170 class DialogGetReconstructionParameters : public wxDialog
173 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);
174 virtual ~DialogGetReconstructionParameters ();
176 unsigned int getXSize();
177 unsigned int getYSize();
178 const char* getFilterName();
179 double getFilterParam();
180 const char* getFilterMethodName();
181 unsigned int getZeropad();
182 const char* getFilterGenerationName();
183 const char* getInterpName();
184 unsigned int getInterpParam();
185 const char* getBackprojectName();
189 wxTextCtrl* m_pTextCtrlXSize;
190 wxTextCtrl* m_pTextCtrlYSize;
191 wxTextCtrl* m_pTextCtrlZeropad;
192 wxTextCtrl* m_pTextCtrlFilterParam;
193 wxTextCtrl* m_pTextCtrlInterpParam;
195 StringValueAndTitleListBox* m_pListBoxFilter;
196 StringValueAndTitleListBox* m_pListBoxFilterMethod;
197 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
198 StringValueAndTitleListBox* m_pListBoxInterp;
199 StringValueAndTitleListBox* m_pListBoxBackproject;
200 StringValueAndTitleListBox* m_pListBoxTrace;
204 double m_dDefaultFilterParam;
205 int m_iDefaultZeropad;
206 int m_iDefaultInterpParam;
210 class DialogAutoScaleParameters : public wxDialog
213 DialogAutoScaleParameters (wxFrame* pParent, double mean, double mode, double median, double stddev, double dDefaultScaleFactor = 1.);
214 virtual ~DialogAutoScaleParameters() {}
216 bool getMinMax (double* pMin, double* pMax);
217 double getAutoScaleFactor ();
220 const double m_dMean;
\r
221 const double m_dMode;
222 const double m_dMedian;
\r
223 const double m_dStdDev;
\r
225 wxTextCtrl* m_pTextCtrlStdDevFactor;
226 wxListBox* m_pListBoxCenter;