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.12 2000/08/31 08:38: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"
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 (void) const;
53 const char** m_ppszValues;
57 class DialogGetPhantom : public wxDialog
60 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
61 virtual ~DialogGetPhantom (void) {}
63 const char* getPhantom (void);
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 (void);
77 double getMinimum (void);
78 double getMaximum (void);
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 (void);
95 unsigned int getXSize (void);
96 unsigned int getYSize (void);
97 unsigned int getNSamples (void);
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 (void);
116 unsigned int getNDet (void);
117 unsigned int getNView (void);
118 unsigned int getNSamples (void);
121 double getRotAngle (void);
122 double getFieldOfViewRatio (void);
123 double getFocalLengthRatio (void);
124 const char* getGeometry(void);
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 double m_dDefaultRotAngle;
142 double m_dDefaultFocalLength;
143 double m_dDefaultFieldOfView;
147 #include "backprojectors.h"
148 class DialogGetReconstructionParameters : public wxDialog
151 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);
152 virtual ~DialogGetReconstructionParameters (void);
154 unsigned int getXSize(void);
155 unsigned int getYSize(void);
156 const char* getFilterName(void);
157 double getFilterParam(void);
158 const char* getFilterMethodName(void);
159 unsigned int getZeropad(void);
160 const char* getFilterGenerationName(void);
161 const char* getInterpName(void);
162 unsigned int getInterpParam(void);
163 const char* getBackprojectName(void);
166 wxTextCtrl* m_pTextCtrlXSize;
167 wxTextCtrl* m_pTextCtrlYSize;
168 wxTextCtrl* m_pTextCtrlZeropad;
169 wxTextCtrl* m_pTextCtrlFilterParam;
170 wxTextCtrl* m_pTextCtrlInterpParam;
172 StringValueAndTitleListBox* m_pListBoxFilter;
173 StringValueAndTitleListBox* m_pListBoxFilterMethod;
174 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
175 StringValueAndTitleListBox* m_pListBoxInterp;
176 StringValueAndTitleListBox* m_pListBoxBackproject;
180 double m_dDefaultFilterParam;
181 int m_iDefaultZeropad;
182 int m_iDefaultInterpParam;
185 class DialogAutoScaleParameters : public wxDialog
188 DialogAutoScaleParameters (wxFrame* pParent, const ImageFile& rImageFile, double dDefaultScaleFactor = 1.);
189 virtual ~DialogAutoScaleParameters() {}
191 void getMinMax (double* pMin, double* pMax);
192 double getAutoScaleFactor ();
195 const ImageFile& m_rImageFile;
197 wxTextCtrl* m_pTextCtrlStdDevFactor;
198 wxListBox* m_pListBoxCenter;