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.13 2000/09/02 05:10:39 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"
40 // CLASS StringValueAndTitleListBox
42 // A superclass of wxListBox that can handle string values and titles
43 // and by displaying the title in the list box and returning the string value
45 class StringValueAndTitleListBox : public wxListBox
48 StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
50 const char* getSelectionStringValue () const;
53 const char** m_ppszValues;
57 class DialogGetPhantom : public wxDialog
60 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
61 virtual ~DialogGetPhantom () {}
63 const char* getPhantom ();
66 StringValueAndTitleListBox* m_pListBoxPhantom;
71 class DialogGetImageMinMax : public wxDialog
74 DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
75 virtual ~DialogGetImageMinMax ();
81 wxTextCtrl* m_pTextCtrlMin;
82 wxTextCtrl* m_pTextCtrlMax;
89 class DialogGetRasterParameters : public wxDialog
92 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
93 virtual ~DialogGetRasterParameters ();
95 unsigned int getXSize ();
96 unsigned int getYSize ();
97 unsigned int getNSamples ();
100 wxTextCtrl* m_pTextCtrlXSize;
101 wxTextCtrl* m_pTextCtrlYSize;
102 wxTextCtrl* m_pTextCtrlNSamples;
106 int m_iDefaultNSamples;
110 class DialogGetProjectionParameters : public wxDialog
113 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);
114 ~DialogGetProjectionParameters ();
116 unsigned int getNDet ();
117 unsigned int getNView ();
118 unsigned int getNSamples ();
121 double getRotAngle ();
122 double getFieldOfViewRatio ();
123 double getFocalLengthRatio ();
124 const char* getGeometry();
127 wxTextCtrl* m_pTextCtrlNDet;
128 wxTextCtrl* m_pTextCtrlNView;
129 wxTextCtrl* m_pTextCtrlNSamples;
130 wxTextCtrl* m_pTextCtrlRotAngle;
131 wxTextCtrl* m_pTextCtrlFocalLength;
132 wxTextCtrl* m_pTextCtrlFieldOfView;
134 StringValueAndTitleListBox* m_pListBoxGeometry;
135 StringValueAndTitleListBox* m_pListBoxTrace;
139 int m_iDefaultNSamples;
141 int m_iDefaultGeometry;
142 double m_dDefaultRotAngle;
143 double m_dDefaultFocalLength;
144 double m_dDefaultFieldOfView;
148 #include "backprojectors.h"
149 class DialogGetReconstructionParameters : public wxDialog
152 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);
153 virtual ~DialogGetReconstructionParameters ();
155 unsigned int getXSize();
156 unsigned int getYSize();
157 const char* getFilterName();
158 double getFilterParam();
159 const char* getFilterMethodName();
160 unsigned int getZeropad();
161 const char* getFilterGenerationName();
162 const char* getInterpName();
163 unsigned int getInterpParam();
164 const char* getBackprojectName();
168 wxTextCtrl* m_pTextCtrlXSize;
169 wxTextCtrl* m_pTextCtrlYSize;
170 wxTextCtrl* m_pTextCtrlZeropad;
171 wxTextCtrl* m_pTextCtrlFilterParam;
172 wxTextCtrl* m_pTextCtrlInterpParam;
174 StringValueAndTitleListBox* m_pListBoxFilter;
175 StringValueAndTitleListBox* m_pListBoxFilterMethod;
176 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
177 StringValueAndTitleListBox* m_pListBoxInterp;
178 StringValueAndTitleListBox* m_pListBoxBackproject;
179 StringValueAndTitleListBox* m_pListBoxTrace;
183 double m_dDefaultFilterParam;
184 int m_iDefaultZeropad;
185 int m_iDefaultInterpParam;
189 class DialogAutoScaleParameters : public wxDialog
192 DialogAutoScaleParameters (wxFrame* pParent, const ImageFile& rImageFile, double dDefaultScaleFactor = 1.);
193 virtual ~DialogAutoScaleParameters() {}
195 void getMinMax (double* pMin, double* pMax);
196 double getAutoScaleFactor ();
199 const ImageFile& m_rImageFile;
201 wxTextCtrl* m_pTextCtrlStdDevFactor;
202 wxListBox* m_pListBoxCenter;