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.49 2001/03/11 12:37:34 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, _T("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, _T(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 #ifdef HAVE_WXTHREADS
246 m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0);
247 m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks);
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 #ifdef HAVE_WXTHREADS
302 return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
309 /////////////////////////////////////////////////////////////////////
310 // CLASS DiaglogGetMinMax Implementation
311 /////////////////////////////////////////////////////////////////////
313 DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, double dDefaultMin, double dDefaultMax)
314 : wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
316 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
318 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
320 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
322 std::ostringstream os;
324 m_pTextCtrlMin = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
325 std::ostringstream osMax;
326 osMax << dDefaultMax;
327 m_pTextCtrlMax = new wxTextCtrl (this, -1, osMax.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
329 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
330 pGridSizer->Add (new wxStaticText (this, -1, "Minimum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
331 pGridSizer->Add (m_pTextCtrlMin, 0, wxALIGN_CENTER_VERTICAL);
332 pGridSizer->Add (new wxStaticText (this, -1, "Maximum"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
333 pGridSizer->Add (m_pTextCtrlMax, 0, wxALIGN_CENTER_VERTICAL);
334 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
336 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
338 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
339 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
340 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
341 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
342 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
343 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_MINMAX);
344 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
346 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
347 pButtonOk->SetDefault();
349 SetAutoLayout (true);
350 SetSizer (pTopSizer);
351 pTopSizer->Fit (this);
352 pTopSizer->SetSizeHints (this);
355 DialogGetMinMax::~DialogGetMinMax ()
360 DialogGetMinMax::getMinimum ()
362 wxString strCtrl = m_pTextCtrlMin->GetValue();
364 if (strCtrl.ToDouble (&dValue))
367 return (m_dDefaultMin);
371 DialogGetMinMax::getMaximum ()
373 wxString strCtrl = m_pTextCtrlMax->GetValue();
375 if (strCtrl.ToDouble (&dValue))
378 return (m_dDefaultMax);
382 /////////////////////////////////////////////////////////////////////
383 // CLASS DialogAutoScaleParameters IMPLEMENTATION
384 /////////////////////////////////////////////////////////////////////
386 DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double mean, double mode, double median, double stddev, double dDefaultScaleFactor)
387 : wxDialog (pParent, -1, _T("Auto Scale Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION), m_dMean(mean), m_dMode(mode), m_dMedian(median), m_dStdDev(stddev)
389 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
391 pTopSizer->Add (new wxStaticText (this, -1, "Auto Scale Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
393 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
395 wxString asTitle[] = {"Median", "Mode", "Mean"};
397 m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
398 m_pRadioBoxCenter->SetSelection (0);
399 pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER);
401 wxGridSizer *pGridSizer = new wxGridSizer (2);
402 pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
403 std::ostringstream osDefaultFactor;
404 osDefaultFactor << dDefaultScaleFactor;
405 m_pTextCtrlStdDevFactor = new wxTextCtrl (this, -1, osDefaultFactor.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
406 pGridSizer->Add (m_pTextCtrlStdDevFactor, 0, wxALIGN_CENTER_VERTICAL);
407 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
409 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
411 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
412 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
413 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
414 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
415 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
416 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_AUTOSCALE);
417 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
419 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
420 pButtonOk->SetDefault();
422 SetAutoLayout (true);
423 SetSizer (pTopSizer);
424 pTopSizer->Fit (this);
425 pTopSizer->SetSizeHints (this);
429 DialogAutoScaleParameters::getMinMax (double* pMin, double* pMax)
431 int iCenter = m_pRadioBoxCenter->GetSelection();
432 double dCenter = m_dMedian;
435 else if (iCenter == 2)
438 wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
440 if (! sStddevFactor.ToDouble (&dValue)) {
441 *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
444 double dHalfWidth = dValue * m_dStdDev / 2;
445 *pMin = dCenter - dHalfWidth;
446 *pMax = dCenter + dHalfWidth;
447 *theApp->getLog() << "Setting minimum to " << *pMin << " and maximum to " << *pMax << "\n";
453 DialogAutoScaleParameters::getAutoScaleFactor ()
455 wxString sStddevFactor = m_pTextCtrlStdDevFactor->GetValue();
457 if (! sStddevFactor.ToDouble (&dValue)) {
458 *theApp->getLog() << "Error: Non-numeric Standard Deviation Factor of " << sStddevFactor << "\n";
466 /////////////////////////////////////////////////////////////////////
467 // CLASS IDENTIFICATION
469 // DialogGetRasterParameters
470 /////////////////////////////////////////////////////////////////////
472 DialogGetRasterParameters::DialogGetRasterParameters
473 (wxWindow* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultNSamples, double dDefaultViewRatio)
474 : wxDialog (pParent, -1, _T("Set Rasterization Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
476 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
478 pTopSizer->Add (new wxStaticText (this, -1, "Set Rasterization Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
480 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
482 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
483 std::ostringstream os;
485 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
486 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
487 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
488 std::ostringstream osYSize;
489 osYSize << iDefaultYSize;
490 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
491 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
492 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
493 std::ostringstream osViewRatio;
494 osViewRatio << dDefaultViewRatio;
495 m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
496 pGridSizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
497 pGridSizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
498 std::ostringstream osNSamples;
499 osNSamples << iDefaultNSamples;
500 m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
501 pGridSizer->Add (new wxStaticText (this, -1, "Samples per Pixel"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
502 pGridSizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
504 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
506 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
508 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
509 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
510 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
511 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
512 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
513 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RASTERIZE);
514 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
516 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
517 pButtonOk->SetDefault();
519 SetAutoLayout (true);
520 SetSizer (pTopSizer);
521 pTopSizer->Fit (this);
522 pTopSizer->SetSizeHints (this);
525 DialogGetRasterParameters::~DialogGetRasterParameters ()
531 DialogGetRasterParameters::getXSize ()
533 wxString strCtrl = m_pTextCtrlXSize->GetValue();
534 unsigned long lValue;
535 if (strCtrl.ToULong (&lValue))
538 return (m_iDefaultXSize);
542 DialogGetRasterParameters::getYSize ()
544 wxString strCtrl = m_pTextCtrlYSize->GetValue();
545 unsigned long lValue;
546 if (strCtrl.ToULong (&lValue))
549 return (m_iDefaultYSize);
553 DialogGetRasterParameters::getNSamples ()
555 wxString strCtrl = m_pTextCtrlNSamples->GetValue();
556 unsigned long lValue;
557 if (strCtrl.ToULong (&lValue))
560 return (m_iDefaultNSamples);
564 DialogGetRasterParameters::getViewRatio ()
566 wxString strCtrl = m_pTextCtrlViewRatio->GetValue();
568 if (strCtrl.ToDouble (&dValue))
571 return (m_dDefaultViewRatio);
575 /////////////////////////////////////////////////////////////////////
576 // CLASS IDENTIFICATION
578 // DialogGetProjectionParameters
579 /////////////////////////////////////////////////////////////////////
582 DialogGetProjectionParameters::DialogGetProjectionParameters
583 (wxWindow* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples,
584 double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultCenterDetectorLength,
585 double dDefaultViewRatio, double dDefaultScanRatio, int iDefaultGeometry, int iDefaultTrace)
586 : wxDialog (pParent, -1, _T("Set Projection Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
588 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
590 m_dDefaultRotAngle = dDefaultRotAngle;
591 m_dDefaultFocalLength = dDefaultFocalLength;
592 m_dDefaultCenterDetectorLength = dDefaultCenterDetectorLength;
593 m_dDefaultViewRatio = dDefaultViewRatio;
594 m_dDefaultScanRatio = dDefaultScanRatio;
595 m_iDefaultNSamples = iDefaultNSamples;
596 m_iDefaultNView = iDefaultNView;
597 m_iDefaultNDet = iDefaultNDet;
598 m_iDefaultTrace = iDefaultTrace;
599 m_iDefaultGeometry = iDefaultGeometry;
601 pTopSizer->Add (new wxStaticText (this, -1, "Set Projection Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
603 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
605 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
606 m_pRadioBoxGeometry = new StringValueAndTitleRadioBox (this, _T("Geometry"), Scanner::getGeometryCount(), Scanner::getGeometryTitleArray(), Scanner::getGeometryNameArray());
607 m_pRadioBoxGeometry->SetSelection (iDefaultGeometry);
609 pGridSizer->Add (m_pRadioBoxGeometry, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
611 m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), Trace::getTraceCount(), Trace::getTraceTitleArray(), Trace::getTraceNameArray());
612 m_pRadioBoxTrace->SetSelection (iDefaultTrace);
613 pGridSizer->Add (m_pRadioBoxTrace, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
615 wxFlexGridSizer* pText1Sizer = new wxFlexGridSizer(2);
616 std::ostringstream os;
618 m_pTextCtrlNDet = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
619 pText1Sizer->Add (new wxStaticText (this, -1, "Detectors"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
620 pText1Sizer->Add (m_pTextCtrlNDet, 0, wxALIGN_CENTER_VERTICAL);
621 std::ostringstream osNView;
622 osNView << iDefaultNView;
623 m_pTextCtrlNView = new wxTextCtrl (this, -1, osNView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
624 pText1Sizer->Add (new wxStaticText (this, -1, "Views"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
625 pText1Sizer->Add (m_pTextCtrlNView, 0, wxALIGN_CENTER_VERTICAL);
626 std::ostringstream osNSamples;
627 osNSamples << iDefaultNSamples;
628 m_pTextCtrlNSamples = new wxTextCtrl (this, -1, osNSamples.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
629 pText1Sizer->Add (new wxStaticText (this, -1, "Samples per Detector"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
630 pText1Sizer->Add (m_pTextCtrlNSamples, 0, wxALIGN_CENTER_VERTICAL);
632 pGridSizer->Add (pText1Sizer);
634 wxFlexGridSizer* pText2Sizer = new wxFlexGridSizer(2);
635 std::ostringstream osViewRatio;
636 osViewRatio << dDefaultViewRatio;
637 m_pTextCtrlViewRatio = new wxTextCtrl (this, -1, osViewRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
638 pText2Sizer->Add (new wxStaticText (this, -1, "View Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
639 pText2Sizer->Add (m_pTextCtrlViewRatio, 0, wxALIGN_CENTER_VERTICAL);
640 std::ostringstream osScanRatio;
641 osScanRatio << dDefaultScanRatio;
642 m_pTextCtrlScanRatio = new wxTextCtrl (this, -1, osScanRatio.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
643 pText2Sizer->Add (new wxStaticText (this, -1, "Scan Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
644 pText2Sizer->Add (m_pTextCtrlScanRatio, 0, wxALIGN_CENTER_VERTICAL);
645 std::ostringstream osFocalLength;
646 osFocalLength << dDefaultFocalLength;
647 m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
648 pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
649 pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL);
651 std::ostringstream osCenterDetectorLength;
652 osCenterDetectorLength << dDefaultCenterDetectorLength;
653 m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, osCenterDetectorLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
654 pText2Sizer->Add (new wxStaticText (this, -1, "Center-Detector Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
655 pText2Sizer->Add (m_pTextCtrlCenterDetectorLength, 0, wxALIGN_CENTER_VERTICAL);
657 if (theApp->getAdvancedOptions()) {
658 std::ostringstream osRotAngle;
659 osRotAngle << dDefaultRotAngle;
660 m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
661 pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (Fraction of circle)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
662 pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL);
664 pGridSizer->Add (pText2Sizer);
666 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
668 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
670 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
671 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
672 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
673 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
674 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
675 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PROJECTIONS);
676 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
678 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
679 pButtonOk->SetDefault();
681 SetAutoLayout (true);
682 SetSizer (pTopSizer);
683 pTopSizer->Fit (this);
684 pTopSizer->SetSizeHints (this);
686 m_pRadioBoxGeometry->SetFocus();
689 DialogGetProjectionParameters::~DialogGetProjectionParameters ()
695 DialogGetProjectionParameters::getNDet ()
697 wxString strCtrl = m_pTextCtrlNDet->GetValue();
698 unsigned long lValue;
699 if (strCtrl.ToULong (&lValue))
702 return (m_iDefaultNDet);
706 DialogGetProjectionParameters::getNView ()
708 wxString strCtrl = m_pTextCtrlNView->GetValue();
709 unsigned long lValue;
710 if (strCtrl.ToULong (&lValue))
713 return (m_iDefaultNView);
718 DialogGetProjectionParameters::getNSamples ()
720 wxString strCtrl = m_pTextCtrlNSamples->GetValue();
721 unsigned long lValue;
722 if (strCtrl.ToULong (&lValue))
725 return (m_iDefaultNSamples);
729 DialogGetProjectionParameters::getRotAngle ()
731 if (theApp->getAdvancedOptions()) {
732 wxString strCtrl = m_pTextCtrlRotAngle->GetValue();
734 if (strCtrl.ToDouble (&dValue))
735 return (dValue * TWOPI);
737 return (m_dDefaultRotAngle);
739 if (Scanner::convertGeometryNameToID (m_pRadioBoxGeometry->getSelectionStringValue()) ==
740 Scanner::GEOMETRY_PARALLEL)
748 DialogGetProjectionParameters::getFocalLengthRatio ()
750 wxString strCtrl = m_pTextCtrlFocalLength->GetValue();
752 if (strCtrl.ToDouble (&dValue))
755 return (m_dDefaultFocalLength);
759 DialogGetProjectionParameters::getCenterDetectorLengthRatio ()
761 wxString strCtrl = m_pTextCtrlCenterDetectorLength->GetValue();
763 if (strCtrl.ToDouble (&dValue))
766 return (m_dDefaultCenterDetectorLength);
770 DialogGetProjectionParameters::getViewRatio ()
772 wxString strCtrl = m_pTextCtrlViewRatio->GetValue();
774 if (strCtrl.ToDouble (&dValue))
777 return (m_dDefaultViewRatio);
781 DialogGetProjectionParameters::getScanRatio ()
783 wxString strCtrl = m_pTextCtrlScanRatio->GetValue();
785 if (strCtrl.ToDouble (&dValue))
788 return (m_dDefaultScanRatio);
792 DialogGetProjectionParameters::getGeometry ()
794 return m_pRadioBoxGeometry->getSelectionStringValue();
798 DialogGetProjectionParameters::getTrace ()
800 return Trace::convertTraceNameToID(m_pRadioBoxTrace->getSelectionStringValue());
805 /////////////////////////////////////////////////////////////////////
806 // CLASS IDENTIFICATION
808 // DialogGetReconstructionParameters
809 /////////////////////////////////////////////////////////////////////
812 DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow* pParent, int iDefaultXSize,
813 int iDefaultYSize, int iDefaultFilterID, double dDefaultHammingParam,
814 int iDefaultFilterMethodID, int iDefaultFilterGenerationID, int iDefaultZeropad,
815 int iDefaultInterpID, int iDefaultInterpParam, int iDefaultBackprojectID, int iTrace)
816 : wxDialog (pParent, -1, _T("Set Reconstruction Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
818 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
820 pTopSizer->Add (new wxStaticText (this, -1, "Set Reconstruction Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
821 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
823 wxFlexGridSizer* pGridSizer = NULL;
824 if (theApp->getAdvancedOptions())
825 pGridSizer = new wxFlexGridSizer (4);
827 pGridSizer = new wxFlexGridSizer (3);
829 if (theApp->getAdvancedOptions())
830 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
832 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getReconstructFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
833 m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
834 pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
836 if (theApp->getAdvancedOptions()) {
837 m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray());
838 m_pRadioBoxFilterMethod->SetSelection (iDefaultFilterMethodID);
839 pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
842 static const char* aszFilterMethodTitle[] = {"Convolution", "FFT"};
843 static const char* aszFilterMethodName[] = {"convolution", "rfftw"};
845 static const char* aszFilterMethodTitle[] = {"Convolution", "Fourier"};
846 static const char* aszFilterMethodName[] = {"convolution", "fourier-table"};
848 m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), 2, aszFilterMethodTitle, aszFilterMethodName);
850 m_pRadioBoxFilterMethod->SetSelection (1);
852 m_pRadioBoxFilterMethod->SetSelection (0);
854 pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
857 if (theApp->getAdvancedOptions()) {
858 m_pRadioBoxFilterGeneration = new StringValueAndTitleRadioBox (this, _T("Filter Generation"), ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray());
859 m_pRadioBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID);
860 pGridSizer->Add (m_pRadioBoxFilterGeneration, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
862 m_pRadioBoxBackproject = new StringValueAndTitleRadioBox (this, _T("Backprojection"), Backprojector::getBackprojectCount(), Backprojector::getBackprojectTitleArray(), Backprojector::getBackprojectNameArray());
863 m_pRadioBoxBackproject->SetSelection (iDefaultBackprojectID);
864 pGridSizer->Add (m_pRadioBoxBackproject, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
867 m_pRadioBoxInterp = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Backprojector::getInterpCount(), Backprojector::getInterpTitleArray(), Backprojector::getInterpNameArray());
868 m_pRadioBoxInterp->SetSelection (iDefaultInterpID);
869 pGridSizer->Add (m_pRadioBoxInterp, 0, wxALL | wxALIGN_RIGHT | wxEXPAND);
871 static const char* aszTraceTitle[] = {"None", "Full"};
872 static const char* aszTraceName[] = {"none", "full"};
873 m_pRadioBoxTrace = new StringValueAndTitleRadioBox (this, _T("Trace Level"), 2, aszTraceTitle, aszTraceName);
874 iTrace = clamp(iTrace, 0, 1);
875 m_pRadioBoxTrace->SetSelection (iTrace);
876 pGridSizer->Add (m_pRadioBoxTrace);
878 wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
879 std::ostringstream os;
881 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
882 pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
883 pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
884 std::ostringstream osYSize;
885 osYSize << iDefaultYSize;
886 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
887 pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
888 pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
890 std::ostringstream osHammingParam;
891 osHammingParam << dDefaultHammingParam;
892 m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osHammingParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
893 pTextGridSizer->Add (new wxStaticText (this, -1, "Hamming Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
894 pTextGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
896 if (theApp->getAdvancedOptions()) {
897 std::ostringstream osZeropad;
898 osZeropad << iDefaultZeropad;
899 m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
900 pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
901 pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
903 pGridSizer->Add (pTextGridSizer);
905 #if HAVE_FREQ_PREINTERP
906 std::ostringstream osInterpParam;
907 osInterpParam << iDefaultInterpParam;
908 m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
909 pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
910 pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
913 pTopSizer->Add (pGridSizer, 1, wxALL, 3);
915 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
917 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
918 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
919 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
920 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
921 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
922 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RECONSTRUCTION);
923 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
925 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
926 pButtonOk->SetDefault();
928 SetAutoLayout (true);
929 SetSizer (pTopSizer);
931 pTopSizer->Fit (this);
932 pTopSizer->SetSizeHints (this);
935 DialogGetReconstructionParameters::~DialogGetReconstructionParameters ()
941 DialogGetReconstructionParameters::getXSize ()
943 wxString strCtrl = m_pTextCtrlXSize->GetValue();
944 unsigned long lValue;
945 if (strCtrl.ToULong (&lValue))
948 return (m_iDefaultXSize);
952 DialogGetReconstructionParameters::getYSize ()
954 wxString strCtrl = m_pTextCtrlYSize->GetValue();
955 unsigned long lValue;
956 if (strCtrl.ToULong (&lValue))
959 return (m_iDefaultYSize);
963 DialogGetReconstructionParameters::getZeropad ()
965 if (theApp->getAdvancedOptions()) {
966 wxString strCtrl = m_pTextCtrlZeropad->GetValue();
967 unsigned long lValue;
968 if (strCtrl.ToULong (&lValue))
971 return (m_iDefaultZeropad);
978 DialogGetReconstructionParameters::getInterpParam ()
980 #if HAVE_FREQ_PREINTERP
981 wxString strCtrl = m_pTextCtrlInterpParam->GetValue();
982 unsigned long lValue;
983 if (strCtrl.ToULong (&lValue))
986 return (m_iDefaultInterpParam);
993 DialogGetReconstructionParameters::getFilterParam ()
995 wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
997 if (strCtrl.ToDouble (&dValue))
1000 return (m_dDefaultFilterParam);
1004 DialogGetReconstructionParameters::getFilterName ()
1006 return m_pRadioBoxFilter->getSelectionStringValue();
1010 DialogGetReconstructionParameters::getFilterMethodName ()
1012 return m_pRadioBoxFilterMethod->getSelectionStringValue();
1016 DialogGetReconstructionParameters::getInterpName ()
1018 return m_pRadioBoxInterp->getSelectionStringValue();
1022 DialogGetReconstructionParameters::getTrace ()
1025 if (strcmp("full", m_pRadioBoxTrace->getSelectionStringValue()) == 0)
1026 iTrace = Trace::TRACE_PLOT;
1031 DialogGetReconstructionParameters::getBackprojectName ()
1033 if (theApp->getAdvancedOptions()) {
1034 return m_pRadioBoxBackproject->getSelectionStringValue();
1040 DialogGetReconstructionParameters::getFilterGenerationName ()
1042 if (theApp->getAdvancedOptions()) {
1043 return m_pRadioBoxFilterGeneration->getSelectionStringValue();
1045 if (ProcessSignal::convertFilterMethodNameToID(m_pRadioBoxFilterMethod->getSelectionStringValue())
1046 == ProcessSignal::FILTER_METHOD_CONVOLUTION)
1049 return "inverse-fourier";
1054 /////////////////////////////////////////////////////////////////////
1055 // CLASS IDENTIFICATION
1057 // DialogGetFilterParameters
1058 /////////////////////////////////////////////////////////////////////
1062 DialogGetFilterParameters::DialogGetFilterParameters (wxWindow* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam, double dDefaultBandwidth, int iDefaultDomainID, double dDefaultInputScale, double dDefaultOutputScale)
1063 : wxDialog (pParent, -1, _T("Set Filter Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1065 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1067 pTopSizer->Add (new wxStaticText (this, -1, "Set Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1068 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1070 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);
1072 m_pRadioBoxFilter = new StringValueAndTitleRadioBox (this, _T("Filter"), SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());
1073 m_pRadioBoxFilter->SetSelection (iDefaultFilterID);
1074 pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
1076 m_pRadioBoxDomain = new StringValueAndTitleRadioBox (this, _T("Domain"), SignalFilter::getDomainCount(), SignalFilter::getDomainTitleArray(), SignalFilter::getDomainNameArray());
1077 m_pRadioBoxDomain->SetSelection (iDefaultDomainID);
1078 pGridSizer->Add (m_pRadioBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);
1080 std::ostringstream os;
1081 os << iDefaultXSize;
1082 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1083 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1084 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1086 std::ostringstream osYSize;
1087 osYSize << iDefaultYSize;
1088 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1089 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1090 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1092 std::ostringstream osFilterParam;
1093 osFilterParam << dDefaultFilterParam;
1094 m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1095 pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1096 pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1098 std::ostringstream osBandwidth;
1099 osBandwidth << dDefaultBandwidth;
1100 m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1101 pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1102 pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1104 std::ostringstream osInputScale;
1105 osInputScale << dDefaultInputScale;
1106 m_pTextCtrlInputScale = new wxTextCtrl (this, -1, osInputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1107 pGridSizer->Add (new wxStaticText (this, -1, "Axis (input) Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1108 pGridSizer->Add (m_pTextCtrlInputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1110 std::ostringstream osOutputScale;
1111 osOutputScale << dDefaultOutputScale;
1112 m_pTextCtrlOutputScale = new wxTextCtrl (this, -1, osOutputScale.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1113 pGridSizer->Add (new wxStaticText (this, -1, "Filter Output Scale"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1114 pGridSizer->Add (m_pTextCtrlOutputScale, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1116 pTopSizer->Add (pGridSizer, 1, wxALL, 3);
1118 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1120 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1121 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1122 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1123 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1124 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1125 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_FILTER);
1126 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1128 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1129 pButtonOk->SetDefault();
1131 SetAutoLayout (true);
1132 SetSizer (pTopSizer);
1133 pTopSizer->Layout();
1134 pTopSizer->Fit (this);
1135 pTopSizer->SetSizeHints (this);
1138 DialogGetFilterParameters::~DialogGetFilterParameters ()
1144 DialogGetFilterParameters::getXSize ()
1146 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1147 unsigned long lValue;
1148 if (strCtrl.ToULong (&lValue))
1151 return (m_iDefaultXSize);
1155 DialogGetFilterParameters::getYSize ()
1157 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1158 unsigned long lValue;
1159 if (strCtrl.ToULong (&lValue))
1162 return (m_iDefaultYSize);
1166 DialogGetFilterParameters::getBandwidth ()
1168 wxString strCtrl = m_pTextCtrlBandwidth->GetValue();
1170 if (strCtrl.ToDouble (&dValue))
1173 return (m_dDefaultBandwidth);
1177 DialogGetFilterParameters::getFilterParam ()
1179 wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
1181 if (strCtrl.ToDouble (&dValue))
1184 return (m_dDefaultFilterParam);
1188 DialogGetFilterParameters::getInputScale ()
1190 wxString strCtrl = m_pTextCtrlInputScale->GetValue();
1192 if (strCtrl.ToDouble (&dValue))
1195 return (m_dDefaultInputScale);
1199 DialogGetFilterParameters::getOutputScale ()
1201 wxString strCtrl = m_pTextCtrlOutputScale->GetValue();
1203 if (strCtrl.ToDouble (&dValue))
1206 return (m_dDefaultOutputScale);
1210 DialogGetFilterParameters::getFilterName ()
1212 return m_pRadioBoxFilter->getSelectionStringValue();
1216 DialogGetFilterParameters::getDomainName ()
1218 return m_pRadioBoxDomain->getSelectionStringValue();
1222 ///////////////////////////////////////////////////////////////////////
1223 // CLASS IMPLEMENTATION
1224 // DialogExportParameters
1225 ///////////////////////////////////////////////////////////////////////
1227 DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultFormatID)
1228 : wxDialog (pParent, -1, _T("Select ExportParameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1230 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1232 pTopSizer->Add (new wxStaticText (this, -1, "Select Export Format"), 0, wxALIGN_CENTER | wxALL, 5);
1234 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1236 m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
1237 ImageFile::getExportFormatCount(), ImageFile::getExportFormatTitleArray(), ImageFile::getExportFormatNameArray());
1238 m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
1239 pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
1241 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1243 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1244 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1245 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1246 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1247 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1248 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_EXPORT);
1249 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1251 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1252 pButtonOk->SetDefault();
1254 SetAutoLayout (true);
1255 SetSizer (pTopSizer);
1256 pTopSizer->Fit (this);
1257 pTopSizer->SetSizeHints (this);
1261 DialogExportParameters::getFormatName()
1263 return m_pRadioBoxFormat->getSelectionStringValue();
1267 ///////////////////////////////////////////////////////////////////////
1268 // CLASS IMPLEMENTATION
1269 // DialogImportParameters
1270 ///////////////////////////////////////////////////////////////////////
1272 DialogImportParameters::DialogImportParameters (wxWindow* pParent, int iDefaultFormatID)
1273 : wxDialog (pParent, -1, _T("Select Import Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1275 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1277 pTopSizer->Add (new wxStaticText (this, -1, "Select Import Format"), 0, wxALIGN_CENTER | wxALL, 5);
1279 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
1281 m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
1282 ImageFile::getImportFormatCount(), ImageFile::getImportFormatTitleArray(), ImageFile::getImportFormatNameArray());
1283 m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
1284 pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
1286 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1288 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1289 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1290 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1291 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1292 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1293 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT);
1294 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1296 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1297 pButtonOk->SetDefault();
1299 SetAutoLayout (true);
1300 SetSizer (pTopSizer);
1301 pTopSizer->Fit (this);
1302 pTopSizer->SetSizeHints (this);
1306 DialogImportParameters::getFormatName()
1308 return m_pRadioBoxFormat->getSelectionStringValue();
1312 /////////////////////////////////////////////////////////////////////
1313 // CLASS DiaglogGetXYSize Implementation
1314 /////////////////////////////////////////////////////////////////////
1316 DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, int iDefaultXSize, int iDefaultYSize)
1317 : wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1319 m_iDefaultXSize = iDefaultXSize;
1320 m_iDefaultYSize = iDefaultYSize;
1322 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1324 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1326 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1328 std::ostringstream os;
1329 os << iDefaultXSize;
1330 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1331 std::ostringstream osYSize;
1332 osYSize << iDefaultYSize;
1333 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1335 wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
1336 pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1337 pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
1338 pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1339 pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
1340 pTopSizer->Add (pGridSizer, 1, wxALL, 10);
1342 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1344 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1345 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1346 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1347 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1348 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1350 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1351 pButtonOk->SetDefault();
1353 SetAutoLayout (true);
1354 SetSizer (pTopSizer);
1355 pTopSizer->Fit (this);
1356 pTopSizer->SetSizeHints (this);
1359 DialogGetXYSize::~DialogGetXYSize ()
1364 DialogGetXYSize::getXSize ()
1366 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1368 if (strCtrl.ToLong (&lValue))
1371 return (m_iDefaultXSize);
1375 DialogGetXYSize::getYSize ()
1377 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1379 if (strCtrl.ToLong (&lValue))
1382 return (m_iDefaultYSize);
1387 /////////////////////////////////////////////////////////////////////
1388 // CLASS IDENTIFICATION
1390 // DialogGetConvertPolarParameters
1391 /////////////////////////////////////////////////////////////////////
1393 DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle,
1394 int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad)
1395 : wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
1397 m_iDefaultXSize = iDefaultXSize;
1398 m_iDefaultYSize = iDefaultYSize;
1399 m_iDefaultZeropad = iDefaultZeropad;
1401 wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
1403 pTopSizer->Add (new wxStaticText (this, -1, pszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
1404 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1406 wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1);
1408 m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray());
1409 m_pRadioBoxInterpolation->SetSelection (iDefaultInterpolationID);
1410 pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER);
1412 wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
1413 std::ostringstream os;
1414 os << iDefaultXSize;
1415 m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1416 pTextGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1417 pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1418 std::ostringstream osYSize;
1419 osYSize << iDefaultYSize;
1420 m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1421 pTextGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1422 pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1424 if (iDefaultZeropad >= 0) {
1425 std::ostringstream osZeropad;
1426 osZeropad << iDefaultZeropad;
1427 m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
1428 pTextGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
1429 pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
1433 pGridSizer->Add (pTextGridSizer, 0, wxALIGN_CENTER | wxALL);
1435 pTopSizer->Add (pGridSizer, 1, wxALL | wxALIGN_CENTER, 3);
1437 pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
1439 wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
1440 wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
1441 pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
1442 wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
1443 pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
1444 CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_POLAR);
1445 pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
1447 pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
1448 pButtonOk->SetDefault();
1449 SetAutoLayout (true);
1450 SetSizer (pTopSizer);
1451 pTopSizer->Layout();
1452 pTopSizer->Fit (this);
1453 pTopSizer->SetSizeHints (this);
1457 DialogGetConvertPolarParameters::~DialogGetConvertPolarParameters ()
1463 DialogGetConvertPolarParameters::getXSize ()
1465 wxString strCtrl = m_pTextCtrlXSize->GetValue();
1466 unsigned long lValue;
1467 if (strCtrl.ToULong (&lValue))
1470 return (m_iDefaultXSize);
1474 DialogGetConvertPolarParameters::getYSize ()
1476 wxString strCtrl = m_pTextCtrlYSize->GetValue();
1477 unsigned long lValue;
1478 if (strCtrl.ToULong (&lValue))
1481 return (m_iDefaultYSize);
1485 DialogGetConvertPolarParameters::getZeropad ()
1488 wxString strCtrl = m_pTextCtrlZeropad->GetValue();
1489 unsigned long lValue;
1490 if (strCtrl.ToULong (&lValue))
1493 return (m_iDefaultZeropad);
1500 DialogGetConvertPolarParameters::getInterpolationName ()
1502 return m_pRadioBoxInterpolation->getSelectionStringValue();