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.10 2000/08/25 15:59:13 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 ******************************************************************************/
36 #include "procsignal.h"
39 // CLASS StringValueAndTitleListBox
41 // A superclass of wxListBox that can handle string values and titles
42 // and by displaying the title in the list box and returning the string value
44 class StringValueAndTitleListBox : public wxListBox
47 StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]);
49 const char* getSelectionStringValue (void) const;
52 const char** m_ppszValues;
56 class DialogGetPhantom : public wxDialog
59 DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN);
60 virtual ~DialogGetPhantom (void) {}
62 const char* getPhantom (void);
65 StringValueAndTitleListBox* m_pListBoxPhantom;
70 class DialogGetImageMinMax : public wxDialog
73 DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.);
74 virtual ~DialogGetImageMinMax (void);
76 double getMinimum (void);
77 double getMaximum (void);
80 wxTextCtrl* m_pTextCtrlMin;
81 wxTextCtrl* m_pTextCtrlMax;
88 class DialogGetRasterParameters : public wxDialog
91 DialogGetRasterParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1);
92 virtual ~DialogGetRasterParameters (void);
94 unsigned int getXSize (void);
95 unsigned int getYSize (void);
96 unsigned int getNSamples (void);
99 wxTextCtrl* m_pTextCtrlXSize;
100 wxTextCtrl* m_pTextCtrlYSize;
101 wxTextCtrl* m_pTextCtrlNSamples;
105 int m_iDefaultNSamples;
109 class DialogGetProjectionParameters : public wxDialog
112 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);
113 ~DialogGetProjectionParameters (void);
115 unsigned int getNDet (void);
116 unsigned int getNView (void);
117 unsigned int getNSamples (void);
118 double getRotAngle (void);
119 double getFieldOfViewRatio (void);
120 double getFocalLengthRatio (void);
121 const char* getGeometry(void);
124 wxTextCtrl* m_pTextCtrlNDet;
125 wxTextCtrl* m_pTextCtrlNView;
126 wxTextCtrl* m_pTextCtrlNSamples;
127 wxTextCtrl* m_pTextCtrlRotAngle;
128 wxTextCtrl* m_pTextCtrlFocalLength;
129 wxTextCtrl* m_pTextCtrlFieldOfView;
131 StringValueAndTitleListBox* m_pListBoxGeometry;
135 int m_iDefaultNSamples;
136 double m_dDefaultRotAngle;
137 double m_dDefaultFocalLength;
138 double m_dDefaultFieldOfView;
142 #include "backprojectors.h"
143 class DialogGetReconstructionParameters : public wxDialog
146 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);
147 virtual ~DialogGetReconstructionParameters (void);
149 unsigned int getXSize(void);
150 unsigned int getYSize(void);
151 const char* getFilterName(void);
152 double getFilterParam(void);
153 const char* getFilterMethodName(void);
154 unsigned int getZeropad(void);
155 const char* getFilterGenerationName(void);
156 const char* getInterpName(void);
157 unsigned int getInterpParam(void);
158 const char* getBackprojectName(void);
161 wxTextCtrl* m_pTextCtrlXSize;
162 wxTextCtrl* m_pTextCtrlYSize;
163 wxTextCtrl* m_pTextCtrlZeropad;
164 wxTextCtrl* m_pTextCtrlFilterParam;
165 wxTextCtrl* m_pTextCtrlInterpParam;
167 StringValueAndTitleListBox* m_pListBoxFilter;
168 StringValueAndTitleListBox* m_pListBoxFilterMethod;
169 StringValueAndTitleListBox* m_pListBoxFilterGeneration;
170 StringValueAndTitleListBox* m_pListBoxInterp;
171 StringValueAndTitleListBox* m_pListBoxBackproject;
175 double m_dDefaultFilterParam;
176 int m_iDefaultZeropad;
177 int m_iDefaultInterpParam;
180 class DialogAutoScaleParameters : public wxDialog
183 DialogAutoScaleParameters (wxFrame* pParent, const ImageFile& rImageFile);
184 virtual ~DialogAutoScaleParameters() {}
186 void getMinMax (double* pMin, double* pMax);
189 const ImageFile& m_rImageFile;
191 wxTextCtrl* m_pTextCtrlStdDevFactor;
192 wxListBox* m_pListBoxCenter;