1 /*****************************************************************************
5 ** Purpose: Dialog routines for CTSim program
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: July 2000
9 ** This is part of the CTSim program
10 ** Copyright (c) 1983-2001 Kevin Rosenberg
12 ** $Id: dialogs.cpp,v 1.46 2001/03/02 21:11:50 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 ******************************************************************************/
29 // #pragma implementation
32 #include "wx/wxprec.h"
38 #if !wxUSE_DOC_VIEW_ARCHITECTURE
39 #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!
42 #include "wx/statline.h"
49 #include "imagefile.h"
51 #if defined(MSVC) || HAVE_SSTREAM
54 #include <sstream_subst>
58 ///////////////////////////////////////////////////////////////////////
59 // CLASS IMPLEMENTATION
60 // StringValueAndTitleListBox
61 ///////////////////////////////////////////////////////////////////////
63 StringValueAndTitleListBox::StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* const aszTitle[], const char* const aszValue[])
66 wxString* psTitle = new wxString [nChoices];
67 for (int i = 0; i < nChoices; i++)
68 psTitle[i] = aszTitle[i];
70 Create (pParent, -1, wxDefaultPosition, wxSize(-1,-1), nChoices, psTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
72 m_ppszValues = aszValue;
77 StringValueAndTitleListBox::getSelectionStringValue () const
79 return m_ppszValues[GetSelection()];
82 StringValueAndTitleRadioBox::StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* const aszTitle[], const char* const aszValue[])
85 wxString* psTitle = new wxString [nChoices];
86 for (int i = 0; i < nChoices; i++)
87 psTitle[i] = aszTitle[i];
89 Create (pParent, -1, strTitle, wxDefaultPosition, wxDefaultSize, nChoices, psTitle, 1, wxRA_SPECIFY_COLS);
91 m_ppszValues = aszValue;
96 StringValueAndTitleRadioBox::getSelectionStringValue () const
98 return m_ppszValues[GetSelection()];
101 ///////////////////////////////////////////////////////////////////////
102 // CLASS IMPLEMENTATION
104 ///////////////////////////////////////////////////////////////////////
106 DialogGetPhantom::DialogGetPhantom (wxWindow* pParent, int iDefaultPhantom)
107 : wxDialog (pParent, -1, "Select Phantom", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
109 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
111 pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxCENTER | wxALL, 5);
113 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
115 m_pRadioBoxPhantom = new StringValueAndTitleRadioBox (this, _T("Phantom"), Phantom::getPhantomCount(), Phantom::getPhantomTitleArray(), Phantom::getPhantomNameArray());
116 m_pRadioBoxPhantom->SetSelection (iDefaultPhantom);
117 pTopSizer->Add (m_pRadioBoxPhantom, 0, wxALL | wxALIGN_CENTER);
119 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
121 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
122 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
123 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
124 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
125 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
126 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PHANTOM);
127 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
129 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
130 pButtonOk->SetDefault();
132 SetAutoLayout (true);
133 SetSizer (pTopSizer);
134 pTopSizer->Fit (this);
135 pTopSizer->SetSizeHints (this);
139 DialogGetPhantom::getPhantom()
141 return m_pRadioBoxPhantom->getSelectionStringValue();
145 ///////////////////////////////////////////////////////////////////////
146 // CLASS IMPLEMENTATION
147 // DialogGetComparisonImage
148 ///////////////////////////////////////////////////////////////////////
150 DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, const char* const pszTitle, const std::vector<ImageFileDocument*>& rVecIF, bool bShowMakeDifference)
151 : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_rVecIF(rVecIF)
153 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
155 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxALL, 5);
157 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
159 int iNImages = m_rVecIF.size();
160 wxString* pstrImages = new wxString [iNImages];
161 for (int i = 0; i < iNImages; i++) {
162 ImageFileView* pView = dynamic_cast<ImageFileView*>(m_rVecIF[i]->GetFirstView());
164 pstrImages[i] = pView->getFrame()->GetTitle();
167 m_pListBoxImageChoices = new wxListBox (this, -1, wxDefaultPosition, wxDefaultSize, iNImages, pstrImages, wxLB_SINGLE);
168 delete [] pstrImages;
170 m_pListBoxImageChoices->SetSelection (0);
171 pTopSizer->Add (m_pListBoxImageChoices, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
173 if (bShowMakeDifference) {
174 m_pMakeDifferenceImage = new wxCheckBox (this, -1, "Make Difference Image");
175 m_pMakeDifferenceImage->SetValue (FALSE);
176 pTopSizer->Add (m_pMakeDifferenceImage, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
178 m_pMakeDifferenceImage = NULL;
180 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
182 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
183 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
184 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
185 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
186 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
187 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_COMPARISON);
188 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
190 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
191 pButtonOk->SetDefault();
193 SetAutoLayout (true);
194 SetSizer (pTopSizer);
195 pTopSizer->Fit (this);
196 pTopSizer->SetSizeHints (this);
200 DialogGetComparisonImage::getImageFileDocument()
202 return m_rVecIF[ m_pListBoxImageChoices->GetSelection() ];
206 DialogGetComparisonImage::getMakeDifferenceImage()
208 if (m_pMakeDifferenceImage)
209 return m_pMakeDifferenceImage->GetValue();
215 /////////////////////////////////////////////////////////////////////
216 // CLASS DiaglogPreferences Implementation
217 /////////////////////////////////////////////////////////////////////
219 DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTitle,
220 bool bAdvancedOptions, bool bAskDeleteNewDocs, bool bVerboseLogging, bool bStartupTips, bool bUseBackgroundTasks)
221 : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
223 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
225 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
227 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
229 m_pCBAdvancedOptions = new wxCheckBox (this, -1, "Advanced Options", wxDefaultPosition, wxSize(250, 25), 0);
230 m_pCBAdvancedOptions->SetValue (bAdvancedOptions);
231 pTopSizer->Add (m_pCBAdvancedOptions, 0, wxALIGN_CENTER_VERTICAL);
233 m_pCBAskDeleteNewDocs = new wxCheckBox (this, -1, "Ask \"Save New Documents\" Before Closing", wxDefaultPosition, wxSize(250, 25), 0);
234 m_pCBAskDeleteNewDocs->SetValue (bAskDeleteNewDocs);
235 pTopSizer->Add (m_pCBAskDeleteNewDocs, 0, wxALIGN_CENTER_VERTICAL);
237 m_pCBVerboseLogging = new wxCheckBox (this, -1, "Verbose Logging", wxDefaultPosition, wxSize(250, 25), 0);
238 m_pCBVerboseLogging->SetValue (bVerboseLogging);
239 pTopSizer->Add (m_pCBVerboseLogging, 0, wxALIGN_CENTER_VERTICAL);
241 m_pCBStartupTips = new wxCheckBox (this, -1, "Show Tips at Start", wxDefaultPosition, wxSize(250, 25), 0);
242 m_pCBStartupTips->SetValue (bStartupTips);
243 pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL);
245 m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
246 m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
247 #ifdef HAVE_WXTHREADS
248 pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL);
251 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
253 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
254 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
255 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
256 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
257 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
258 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PREFERENCES);
259 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
261 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
262 pButtonOk->SetDefault();
264 SetAutoLayout (true);
265 SetSizer (pTopSizer);
266 pTopSizer->Fit (this);
267 pTopSizer->SetSizeHints (this);
270 DialogPreferences::~DialogPreferences ()
275 DialogPreferences::getAdvancedOptions ()
277 return static_cast<bool>(m_pCBAdvancedOptions->GetValue());
281 DialogPreferences::getAskDeleteNewDocs ()
283 return static_cast<bool>(m_pCBAskDeleteNewDocs->GetValue());
287 DialogPreferences::getVerboseLogging ()
289 return static_cast<bool>(m_pCBVerboseLogging->GetValue());
293 DialogPreferences::getStartupTips ()
295 return static_cast<bool>(m_pCBStartupTips->GetValue());
299 DialogPreferences::getUseBackgroundTasks ()
301 return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
305 /////////////////////////////////////////////////////////////////////
306 // CLASS DiaglogGetMinMax Implementation
307 /////////////////////////////////////////////////////////////////////
309 DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin, double dDefaultMax)
310 : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
312 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
314 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
316 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
318 std::ostringstream os;
320 m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
321 std::ostringstream osMax;
322 osMax << dDefaultMax;
323 m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
325 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
326 pGridSizer->Add (new wxStaticText (this, -1, "Minimum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
327 pGridSizer->Add (m_pTextCtrlMin, 0, wxALIGN_CENTER_VERTICAL);
328 pGridSizer->Add (new wxStaticText (this, -1, "Maximum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
329 pGridSizer->Add (m_pTextCtrlMax, 0, wxALIGN_CENTER_VERTICAL);
330 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
332 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
334 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
335 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
336 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
337 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
338 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
339 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_MINMAX);
340 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
342 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
343 pButtonOk->SetDefault();
345 SetAutoLayout (true);
346 SetSizer (pTopSizer);
347 pTopSizer->Fit (this);
348 pTopSizer->SetSizeHints (this);
351 DialogGetMinMax::~DialogGetMinMax ()
356 DialogGetMinMax::getMinimum ()
358 wxString strCtrl = m_pTextCtrlMin->GetValue();
360 if (strCtrl.ToDouble (&dValue))
363 return (m_dDefaultMin);
367 DialogGetMinMax::getMaximum ()
369 wxString strCtrl = m_pTextCtrlMax->GetValue();
371 if (strCtrl.ToDouble (&dValue))
374 return (m_dDefaultMax);
378 /////////////////////////////////////////////////////////////////////
379 // CLASS DialogAutoScaleParameters IMPLEMENTATION
380 /////////////////////////////////////////////////////////////////////
382 DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double mean, double mode, double median, double stddev, double dDefaultScaleFactor)
383 : wxDialog (pParent, -1, "Auto Scale Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_dMean(mean), m_dMode(mode), m_dMedian(median), m_dStdDev(stddev)
385 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
387 pTopSizer->Add (new wxStaticText (this, -1, "Auto Scale Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
389 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
391 wxString asTitle[] = {"Median", "Mode", "Mean"};
393 m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
394 m_pRadioBoxCenter->SetSelection (0);
395 pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER);
397 wxGridSizer *pGridSizer = new wxGridSizer (2);
398 pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
399 std::ostringstream osDefaultFactor;
400 osDefaultFactor << dDefaultScaleFactor;
401 m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
402 pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
403 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
405 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
407 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
408 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
409 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
410 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
411 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
412 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_AUTOSCALE);
413 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
415 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
416 pButtonOk->SetDefault();
418 SetAutoLayout (true);
419 SetSizer (pTopSizer);
420 pTopSizer->Fit (this);
421 pTopSizer->SetSizeHints (this);
425 DialogAutoScaleParameters::getMinMax (double* pMin, double* pMax)
427 int iCenter = m_pRadioBoxCenter->GetSelection();
428 double dCenter = m_dMedian;
431 else if (iCenter == 2)
434 wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
436 if (! sStddevFactor.ToDouble (&dValue)) {
437 *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
440 double dHalfWidth = dValue * m_dStdDev / 2;
441 *pMin = dCenter - dHalfWidth;
442 *pMax = dCenter + dHalfWidth;
443 *theApp->getLog() << "Setting minimum to " << *pMin << " and maximum to " << *pMax << "\n";
449 DialogAutoScaleParameters::getAutoScaleFactor ()
451 wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
453 if (! sStddevFactor.ToDouble (&dValue)) {
454 *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
462 /////////////////////////////////////////////////////////////////////
463 // CLASS IDENTIFICATION
465 // DialogGetRasterParameters
466 /////////////////////////////////////////////////////////////////////
468 DialogGetRasterParameters::DialogGetRasterParameters
469 (wxWindow* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultNSamples, double dDefaultViewRatio)
470 : wxDialog (pParent, -1, "Set Rasterization Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
472 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
474 pTopSizer->Add (new wxStaticText (this, -1, "Set Rasterization Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
476 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
478 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
479 std::ostringstream os;
481 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
482 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
483 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
484 std::ostringstream osYSize;
485 osYSize << iDefaultYSize;
486 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
487 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
488 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
489 std::ostringstream osViewRatio;
490 osViewRatio << dDefaultViewRatio;
491 m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
492 pGridSizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
493 pGridSizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
494 std::ostringstream osNSamples;
495 osNSamples << iDefaultNSamples;
496 m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
497 pGridSizer->Add (new wxStaticText (this, -1, "Samples per Pixel"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
498 pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
500 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
502 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
504 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
505 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
506 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
507 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
508 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
509 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RASTERIZE);
510 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
512 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
513 pButtonOk->SetDefault();
515 SetAutoLayout (true);
516 SetSizer (pTopSizer);
517 pTopSizer->Fit (this);
518 pTopSizer->SetSizeHints (this);
521 DialogGetRasterParameters::~DialogGetRasterParameters ()
527 DialogGetRasterParameters::getXSize ()
529 wxString strCtrl = m_pTextCtrlXSize->GetValue();
530 unsigned long lValue;
531 if (strCtrl.ToULong (&lValue))
534 return (m_iDefaultXSize);
538 DialogGetRasterParameters::getYSize ()
540 wxString strCtrl = m_pTextCtrlYSize->GetValue();
541 unsigned long lValue;
542 if (strCtrl.ToULong (&lValue))
545 return (m_iDefaultYSize);
549 DialogGetRasterParameters::getNSamples ()
551 wxString strCtrl = m_pTextCtrlNSamples->GetValue();
552 unsigned long lValue;
553 if (strCtrl.ToULong (&lValue))
556 return (m_iDefaultNSamples);
560 DialogGetRasterParameters::getViewRatio ()
562 wxString strCtrl = m_pTextCtrlViewRatio->GetValue();
564 if (strCtrl.ToDouble (&dValue))
567 return (m_dDefaultViewRatio);
571 /////////////////////////////////////////////////////////////////////
572 // CLASS IDENTIFICATION
574 // DialogGetProjectionParameters
575 /////////////////////////////////////////////////////////////////////
578 DialogGetProjectionParameters::DialogGetProjectionParameters
579 (wxWindow* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples,
580 double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultCenterDetectorLength,
581 double dDefaultViewRatio, double dDefaultScanRatio, int iDefaultGeometry, int iDefaultTrace)
582 : wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
584 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
586 m_dDefaultRotAngle = dDefaultRotAngle;
587 m_dDefaultFocalLength = dDefaultFocalLength;
588 m_dDefaultCenterDetectorLength = dDefaultCenterDetectorLength;
589 m_dDefaultViewRatio = dDefaultViewRatio;
590 m_dDefaultScanRatio = dDefaultScanRatio;
591 m_iDefaultNSamples = iDefaultNSamples;
592 m_iDefaultNView = iDefaultNView;
593 m_iDefaultNDet = iDefaultNDet;
594 m_iDefaultTrace = iDefaultTrace;
595 m_iDefaultGeometry = iDefaultGeometry;
597 pTopSizer->Add (new wxStaticText (this, -1, "Set Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
599 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
601 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
602 m_pRadioBoxGeometry = new StringValueAndTitleRadioBox (this, _T("Geometry"), Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
603 m_pRadioBoxGeometry->SetSelection (iDefaultGeometry);
605 pGridSizer->Add (m_pRadioBoxGeometry, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
607 m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
608 m_pRadioBoxTrace->SetSelection (iDefaultTrace);
609 pGridSizer->Add (m_pRadioBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
611 wxFlexGridSizer* pText1Sizer = new wxFlexGridSizer(2);
612 std::ostringstream os;
614 m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
615 pText1Sizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
616 pText1Sizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
617 std::ostringstream osNView;
618 osNView << iDefaultNView;
619 m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
620 pText1Sizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
621 pText1Sizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
622 std::ostringstream osNSamples;
623 osNSamples << iDefaultNSamples;
624 m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
625 pText1Sizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
626 pText1Sizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
628 pGridSizer->Add (pText1Sizer);
630 wxFlexGridSizer* pText2Sizer = new wxFlexGridSizer(2);
631 std::ostringstream osViewRatio;
632 osViewRatio << dDefaultViewRatio;
633 m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
634 pText2Sizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
635 pText2Sizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
636 std::ostringstream osScanRatio;
637 osScanRatio << dDefaultScanRatio;
638 m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, osScanRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
639 pText2Sizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
640 pText2Sizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
641 std::ostringstream osFocalLength;
642 osFocalLength << dDefaultFocalLength;
643 m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
644 pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
645 pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
647 std::ostringstream osCenterDetectorLength;
648 osCenterDetectorLength << dDefaultCenterDetectorLength;
649 m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, osCenterDetectorLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
650 pText2Sizer->Add (new wxStaticText (this, -1, "Center-Detector Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
651 pText2Sizer->Add (m_pTextCtrlCenterDetectorLength, 0, wxALIGN_CENTER_VERTICAL);
653 if (theApp->getAdvancedOptions()) {
654 std::ostringstream osRotAngle;
655 osRotAngle << dDefaultRotAngle;
656 m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
657 pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (Fraction of circle)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
658 pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
660 pGridSizer->Add (pText2Sizer);
662 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
664 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
666 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
667 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
668 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
669 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
670 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
671 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PROJECTIONS);
672 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
674 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
675 pButtonOk->SetDefault();
677 SetAutoLayout (true);
678 SetSizer (pTopSizer);
679 pTopSizer->Fit (this);
680 pTopSizer->SetSizeHints (this);
683 DialogGetProjectionParameters::~DialogGetProjectionParameters ()
689 DialogGetProjectionParameters::getNDet ()
691 wxString strCtrl = m_pTextCtrlNDet->GetValue();
692 unsigned long lValue;
693 if (strCtrl.ToULong (&lValue))
696 return (m_iDefaultNDet);
700 DialogGetProjectionParameters::getNView ()
702 wxString strCtrl = m_pTextCtrlNView->GetValue();
703 unsigned long lValue;
704 if (strCtrl.ToULong (&lValue))
707 return (m_iDefaultNView);
712 DialogGetProjectionParameters::getNSamples ()
714 wxString strCtrl = m_pTextCtrlNSamples->GetValue();
715 unsigned long lValue;
716 if (strCtrl.ToULong (&lValue))
719 return (m_iDefaultNSamples);
723 DialogGetProjectionParameters::getRotAngle ()
725 if (theApp->getAdvancedOptions()) {
726 wxString strCtrl = m_pTextCtrlRotAngle->GetValue();
728 if (strCtrl.ToDouble (&dValue))
729 return (dValue * TWOPI);
731 return (m_dDefaultRotAngle);
733 if (Scanner::convertGeometryNameToID (m_pRadioBoxGeometry->getSelectionStringValue()) ==
734 Scanner::GEOMETRY_PARALLEL)
742 DialogGetProjectionParameters::getFocalLengthRatio ()
744 wxString strCtrl = m_pTextCtrlFocalLength->GetValue();
746 if (strCtrl.ToDouble (&dValue))
749 return (m_dDefaultFocalLength);
753 DialogGetProjectionParameters::getCenterDetectorLengthRatio ()
755 wxString strCtrl = m_pTextCtrlCenterDetectorLength->GetValue();
757 if (strCtrl.ToDouble (&dValue))
760 return (m_dDefaultCenterDetectorLength);
764 DialogGetProjectionParameters::getViewRatio ()
766 wxString strCtrl = m_pTextCtrlViewRatio->GetValue();
768 if (strCtrl.ToDouble (&dValue))
771 return (m_dDefaultViewRatio);
775 DialogGetProjectionParameters::getScanRatio ()
777 wxString strCtrl = m_pTextCtrlScanRatio->GetValue();
779 if (strCtrl.ToDouble (&dValue))
782 return (m_dDefaultScanRatio);
786 DialogGetProjectionParameters::getGeometry ()
788 return m_pRadioBoxGeometry->getSelectionStringValue();
792 DialogGetProjectionParameters::getTrace ()
794 return Trace::convertTraceNameToID(m_pRadioBoxTrace->getSelectionStringValue());
799 /////////////////////////////////////////////////////////////////////
800 // CLASS IDENTIFICATION
802 // DialogGetReconstructionParameters
803 /////////////////////////////////////////////////////////////////////
806 DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow* pParent, int iDefaultXSize,
807 int iDefaultYSize, int iDefaultFilterID, double dDefaultHammingParam,
808 int iDefaultFilterMethodID, int iDefaultFilterGenerationID, int iDefaultZeropad,
809 int iDefaultInterpID, int iDefaultInterpParam, int iDefaultBackprojectID, int iTrace)
810 : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
812 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
814 pTopSizer->Add (new wxStaticText (this, -1, "Set Reconstruction Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
815 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
817 wxFlexGridSizer* pGridSizer = NULL;
818 if (theApp->getAdvancedOptions())
819 pGridSizer = new wxFlexGridSizer (4);
821 pGridSizer = new wxFlexGridSizer (3);
823 if (theApp->getAdvancedOptions())
824 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
826 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getReconstructFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
827 m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
828 pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
830 if (theApp->getAdvancedOptions()) {
831 m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray());
832 m_pRadioBoxFilterMethod->SetSelection (iDefaultFilterMethodID);
833 pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
836 static const char* aszFilterMethodTitle[] = {"Convolution", "FFT"};
837 static const char* aszFilterMethodName[] = {"convolution", "rfftw"};
839 static const char* aszFilterMethodTitle[] = {"Convolution", "Fourier"};
840 static const char* aszFilterMethodName[] = {"convolution", "fourier-table"};
842 m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), 2, aszFilterMethodTitle, aszFilterMethodName);
844 m_pRadioBoxFilterMethod->SetSelection (1);
846 m_pRadioBoxFilterMethod->SetSelection (0);
848 pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
851 if (theApp->getAdvancedOptions()) {
852 m_pRadioBoxFilterGeneration = new StringValueAndTitleRadioBox (this, _T("Filter Generation"), ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray());
853 m_pRadioBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID);
854 pGridSizer->Add (m_pRadioBoxFilterGeneration, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
856 m_pRadioBoxBackproject = new StringValueAndTitleRadioBox (this, _T("Backprojection"), Backprojector::getBackprojectCount(), Backprojector::getBackprojectTitleArray(), Backprojector::getBackprojectNameArray());
857 m_pRadioBoxBackproject->SetSelection (iDefaultBackprojectID);
858 pGridSizer->Add (m_pRadioBoxBackproject, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
861 m_pRadioBoxInterp = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Backprojector::getInterpCount(), Backprojector::getInterpTitleArray(), Backprojector::getInterpNameArray());
862 m_pRadioBoxInterp->SetSelection (iDefaultInterpID);
863 pGridSizer->Add (m_pRadioBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
865 static const char* aszTraceTitle[] = {"None", "Full"};
866 static const char* aszTraceName[] = {"none", "full"};
867 m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), 2, aszTraceTitle, aszTraceName);
868 iTrace = clamp(iTrace, 0, 1);
869 m_pRadioBoxTrace->SetSelection (iTrace);
870 pGridSizer->Add (m_pRadioBoxTrace);
872 wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
873 std::ostringstream os;
875 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
876 pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
877 pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
878 std::ostringstream osYSize;
879 osYSize << iDefaultYSize;
880 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
881 pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
882 pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
884 std::ostringstream osHammingParam;
885 osHammingParam << dDefaultHammingParam;
886 m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
887 pTextGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
888 pTextGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
890 if (theApp->getAdvancedOptions()) {
891 std::ostringstream osZeropad;
892 osZeropad << iDefaultZeropad;
893 m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
894 pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
895 pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
897 pGridSizer->Add (pTextGridSizer);
899 #if HAVE_FREQ_PREINTERP
900 std::ostringstream osInterpParam;
901 osInterpParam << iDefaultInterpParam;
902 m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
903 pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
904 pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
907 pTopSizer->Add (pGridSizer, 1, wxALL, 3);
909 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
911 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
912 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
913 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
914 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
915 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
916 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RECONSTRUCTION);
917 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
919 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
920 pButtonOk->SetDefault();
922 SetAutoLayout (true);
923 SetSizer (pTopSizer);
925 pTopSizer->Fit (this);
926 pTopSizer->SetSizeHints (this);
929 DialogGetReconstructionParameters::~DialogGetReconstructionParameters ()
935 DialogGetReconstructionParameters::getXSize ()
937 wxString strCtrl = m_pTextCtrlXSize->GetValue();
938 unsigned long lValue;
939 if (strCtrl.ToULong (&lValue))
942 return (m_iDefaultXSize);
946 DialogGetReconstructionParameters::getYSize ()
948 wxString strCtrl = m_pTextCtrlYSize->GetValue();
949 unsigned long lValue;
950 if (strCtrl.ToULong (&lValue))
953 return (m_iDefaultYSize);
957 DialogGetReconstructionParameters::getZeropad ()
959 if (theApp->getAdvancedOptions()) {
960 wxString strCtrl = m_pTextCtrlZeropad->GetValue();
961 unsigned long lValue;
962 if (strCtrl.ToULong (&lValue))
965 return (m_iDefaultZeropad);
972 DialogGetReconstructionParameters::getInterpParam ()
974 #if HAVE_FREQ_PREINTERP
975 wxString strCtrl = m_pTextCtrlInterpParam->GetValue();
976 unsigned long lValue;
977 if (strCtrl.ToULong (&lValue))
980 return (m_iDefaultInterpParam);
987 DialogGetReconstructionParameters::getFilterParam ()
989 wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
991 if (strCtrl.ToDouble (&dValue))
994 return (m_dDefaultFilterParam);
998 DialogGetReconstructionParameters::getFilterName ()
1000 return m_pRadioBoxFilter->getSelectionStringValue();
1004 DialogGetReconstructionParameters::getFilterMethodName ()
1006 return m_pRadioBoxFilterMethod->getSelectionStringValue();
1010 DialogGetReconstructionParameters::getInterpName ()
1012 return m_pRadioBoxInterp->getSelectionStringValue();
1016 DialogGetReconstructionParameters::getTrace ()
1019 if (strcmp("full", m_pRadioBoxTrace->getSelectionStringValue()) == 0)
1020 iTrace = Trace::TRACE_PLOT;
1025 DialogGetReconstructionParameters::getBackprojectName ()
1027 if (theApp->getAdvancedOptions()) {
1028 return m_pRadioBoxBackproject->getSelectionStringValue();
1034 DialogGetReconstructionParameters::getFilterGenerationName ()
1036 if (theApp->getAdvancedOptions()) {
1037 return m_pRadioBoxFilterGeneration->getSelectionStringValue();
1039 if (ProcessSignal::convertFilterMethodNameToID(m_pRadioBoxFilterMethod->getSelectionStringValue())
1040 == ProcessSignal::FILTER_METHOD_CONVOLUTION)
1043 return "inverse-fourier";
1048 /////////////////////////////////////////////////////////////////////
1049 // CLASS IDENTIFICATION
1051 // DialogGetFilterParameters
1052 /////////////////////////////////////////////////////////////////////
1056 DialogGetFilterParameters::DialogGetFilterParameters (wxWindow* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam, double dDefaultBandwidth, int iDefaultDomainID, double dDefaultInputScale, double dDefaultOutputScale)
1057 : wxDialog (pParent, -1, "Set Filter Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1059 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1061 pTopSizer->Add (new wxStaticText (this, -1, "Set Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1062 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1064 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
1066 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
1067 m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
1068 pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
1070 m_pRadioBoxDomain = new StringValueAndTitleRadioBox (this, _T("Domain"), SignalFilter::getDomainCount(), SignalFilter::getDomainTitleArray(), SignalFilter::getDomainNameArray());
1071 m_pRadioBoxDomain->SetSelection (iDefaultDomainID);
1072 pGridSizer->Add (m_pRadioBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
1074 std::ostringstream os;
1075 os << iDefaultXSize;
1076 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1077 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1078 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1080 std::ostringstream osYSize;
1081 osYSize << iDefaultYSize;
1082 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1083 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1084 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1086 std::ostringstream osFilterParam;
1087 osFilterParam << dDefaultFilterParam;
1088 m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1089 pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1090 pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1092 std::ostringstream osBandwidth;
1093 osBandwidth << dDefaultBandwidth;
1094 m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1095 pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1096 pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1098 std::ostringstream osInputScale;
1099 osInputScale << dDefaultInputScale;
1100 m_pTextCtrlInputScale = new wxTextCtrl (this, -1, osInputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1101 pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1102 pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1104 std::ostringstream osOutputScale;
1105 osOutputScale << dDefaultOutputScale;
1106 m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, osOutputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1107 pGridSizer->Add (new wxStaticText (this, -1, "Filter Output Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1108 pGridSizer->Add (m_pTextCtrlOutputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1110 pTopSizer->Add (pGridSizer, 1, wxALL, 3);
1112 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1114 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1115 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1116 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1117 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1118 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1119 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_FILTER);
1120 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1122 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1123 pButtonOk->SetDefault();
1125 SetAutoLayout (true);
1126 SetSizer (pTopSizer);
1127 pTopSizer->Layout();
1128 pTopSizer->Fit (this);
1129 pTopSizer->SetSizeHints (this);
1132 DialogGetFilterParameters::~DialogGetFilterParameters ()
1138 DialogGetFilterParameters::getXSize ()
1140 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1141 unsigned long lValue;
1142 if (strCtrl.ToULong (&lValue))
1145 return (m_iDefaultXSize);
1149 DialogGetFilterParameters::getYSize ()
1151 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1152 unsigned long lValue;
1153 if (strCtrl.ToULong (&lValue))
1156 return (m_iDefaultYSize);
1160 DialogGetFilterParameters::getBandwidth ()
1162 wxString strCtrl = m_pTextCtrlBandwidth->GetValue();
1164 if (strCtrl.ToDouble (&dValue))
1167 return (m_dDefaultBandwidth);
1171 DialogGetFilterParameters::getFilterParam ()
1173 wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
1175 if (strCtrl.ToDouble (&dValue))
1178 return (m_dDefaultFilterParam);
1182 DialogGetFilterParameters::getInputScale ()
1184 wxString strCtrl = m_pTextCtrlInputScale->GetValue();
1186 if (strCtrl.ToDouble (&dValue))
1189 return (m_dDefaultInputScale);
1193 DialogGetFilterParameters::getOutputScale ()
1195 wxString strCtrl = m_pTextCtrlOutputScale->GetValue();
1197 if (strCtrl.ToDouble (&dValue))
1200 return (m_dDefaultOutputScale);
1204 DialogGetFilterParameters::getFilterName ()
1206 return m_pRadioBoxFilter->getSelectionStringValue();
1210 DialogGetFilterParameters::getDomainName ()
1212 return m_pRadioBoxDomain->getSelectionStringValue();
1216 ///////////////////////////////////////////////////////////////////////
1217 // CLASS IMPLEMENTATION
1218 // DialogExportParameters
1219 ///////////////////////////////////////////////////////////////////////
1221 DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultFormatID)
1222 : wxDialog (pParent, -1, "Select ExportParameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1224 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1226 pTopSizer->Add (new wxStaticText (this, -1, "Select Export Format"), 0, wxALIGN_CENTER | wxALL, 5);
1228 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1230 m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
1231 ImageFile::getExportFormatCount(), ImageFile::getExportFormatTitleArray(), ImageFile::getExportFormatNameArray());
1232 m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
1233 pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
1235 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1237 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1238 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1239 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1240 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1241 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1242 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_EXPORT);
1243 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1245 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1246 pButtonOk->SetDefault();
1248 SetAutoLayout (true);
1249 SetSizer (pTopSizer);
1250 pTopSizer->Fit (this);
1251 pTopSizer->SetSizeHints (this);
1255 DialogExportParameters::getFormatName()
1257 return m_pRadioBoxFormat->getSelectionStringValue();
1261 ///////////////////////////////////////////////////////////////////////
1262 // CLASS IMPLEMENTATION
1263 // DialogImportParameters
1264 ///////////////////////////////////////////////////////////////////////
1266 DialogImportParameters::DialogImportParameters (wxWindow* pParent, int iDefaultFormatID)
1267 : wxDialog (pParent, -1, "Select ImportParameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1269 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1271 pTopSizer->Add (new wxStaticText (this, -1, "Select Import Format"), 0, wxALIGN_CENTER | wxALL, 5);
1273 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1275 m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
1276 ImageFile::getImportFormatCount(), ImageFile::getImportFormatTitleArray(), ImageFile::getImportFormatNameArray());
1277 m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
1278 pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
1280 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1282 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1283 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1284 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1285 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1286 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1287 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT);
1288 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1290 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1291 pButtonOk->SetDefault();
1293 SetAutoLayout (true);
1294 SetSizer (pTopSizer);
1295 pTopSizer->Fit (this);
1296 pTopSizer->SetSizeHints (this);
1300 DialogImportParameters::getFormatName()
1302 return m_pRadioBoxFormat->getSelectionStringValue();
1306 /////////////////////////////////////////////////////////////////////
1307 // CLASS DiaglogGetXYSize Implementation
1308 /////////////////////////////////////////////////////////////////////
1310 DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize, int iDefaultYSize)
1311 : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1313 m_iDefaultXSize = iDefaultXSize;
1314 m_iDefaultYSize = iDefaultYSize;
1316 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1318 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1320 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1322 std::ostringstream os;
1323 os << iDefaultXSize;
1324 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1325 std::ostringstream osYSize;
1326 osYSize << iDefaultYSize;
1327 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1329 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
1330 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1331 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
1332 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1333 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
1334 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
1336 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1338 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1339 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1340 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1341 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1342 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1344 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1345 pButtonOk->SetDefault();
1347 SetAutoLayout (true);
1348 SetSizer (pTopSizer);
1349 pTopSizer->Fit (this);
1350 pTopSizer->SetSizeHints (this);
1353 DialogGetXYSize::~DialogGetXYSize ()
1358 DialogGetXYSize::getXSize ()
1360 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1362 if (strCtrl.ToLong (&lValue))
1365 return (m_iDefaultXSize);
1369 DialogGetXYSize::getYSize ()
1371 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1373 if (strCtrl.ToLong (&lValue))
1376 return (m_iDefaultYSize);
1381 /////////////////////////////////////////////////////////////////////
1382 // CLASS IDENTIFICATION
1384 // DialogGetConvertPolarParameters
1385 /////////////////////////////////////////////////////////////////////
1387 DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle,
1388 int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad)
1389 : wxDialog (pParent, -1, pszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1391 m_iDefaultXSize = iDefaultXSize;
1392 m_iDefaultYSize = iDefaultYSize;
1393 m_iDefaultZeropad = iDefaultZeropad;
1395 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1397 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1398 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1400 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1);
1402 m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray());
1403 m_pRadioBoxInterpolation->SetSelection (iDefaultInterpolationID);
1404 pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER);
1406 wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
1407 std::ostringstream os;
1408 os << iDefaultXSize;
1409 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1410 pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1411 pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1412 std::ostringstream osYSize;
1413 osYSize << iDefaultYSize;
1414 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1415 pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1416 pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1418 if (iDefaultZeropad >= 0) {
1419 std::ostringstream osZeropad;
1420 osZeropad << iDefaultZeropad;
1421 m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1422 pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1423 pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1427 pGridSizer->Add (pTextGridSizer, 0, wxALIGN_CENTER | wxALL);
1429 pTopSizer->Add (pGridSizer, 1, wxALL | wxALIGN_CENTER, 3);
1431 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1433 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1434 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1435 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1436 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1437 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1438 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_POLAR);
1439 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1441 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1442 pButtonOk->SetDefault();
1443 SetAutoLayout (true);
1444 SetSizer (pTopSizer);
1445 pTopSizer->Layout();
1446 pTopSizer->Fit (this);
1447 pTopSizer->SetSizeHints (this);
1451 DialogGetConvertPolarParameters::~DialogGetConvertPolarParameters ()
1457 DialogGetConvertPolarParameters::getXSize ()
1459 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1460 unsigned long lValue;
1461 if (strCtrl.ToULong (&lValue))
1464 return (m_iDefaultXSize);
1468 DialogGetConvertPolarParameters::getYSize ()
1470 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1471 unsigned long lValue;
1472 if (strCtrl.ToULong (&lValue))
1475 return (m_iDefaultYSize);
1479 DialogGetConvertPolarParameters::getZeropad ()
1482 wxString strCtrl = m_pTextCtrlZeropad->GetValue();
1483 unsigned long lValue;
1484 if (strCtrl.ToULong (&lValue))
1487 return (m_iDefaultZeropad);
1494 DialogGetConvertPolarParameters::getInterpolationName ()
1496 return m_pRadioBoxInterpolation->getSelectionStringValue();