-DialogGetReconstructionParameters::getFilterGenerationName (void)
-{
- return m_pListBoxFilterGeneration->getSelectionStringValue();
-}
-
-\r
-/////////////////////////////////////////////////////////////////////\r
-// CLASS IDENTIFICATION\r
-//\r
-// DialogGetFilterParameters\r
-/////////////////////////////////////////////////////////////////////\r
-\r
-\r
-DialogGetFilterParameters::DialogGetFilterParameters (wxFrame* pParent, int iDefaultXSize, int iDefaultYSize, int iDefaultFilterID, double dDefaultFilterParam, double dDefaultBandwidth, int iDefaultDomainID)\r
-: wxDialog (pParent, -1, "Set Filter Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)\r
-{\r
- wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);\r
- \r
- pTopSizer->Add (new wxStaticText (this, -1, "Set Filter Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);\r
- \r
- pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
- \r
- std::ostringstream os;\r
- os << iDefaultXSize;\r
- m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
- std::ostringstream osYSize;\r
- osYSize << iDefaultYSize;\r
- m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
- std::ostringstream osFilterParam;\r
- osFilterParam << dDefaultFilterParam;\r
- m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
- std::ostringstream osBandwidth;\r
- osBandwidth << dDefaultBandwidth;\r
- m_pTextCtrlBandwidth = new wxTextCtrl (this, -1, osBandwidth.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);\r
- \r
- wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (2);\r
- pGridSizer->Add (new wxStaticText (this, -1, "Filter"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);\r
- m_pListBoxFilter = new StringValueAndTitleListBox (this, SignalFilter::getFilterCount(), SignalFilter::getFilterTitleArray(), SignalFilter::getFilterNameArray());\r
- m_pListBoxFilter->SetSelection (iDefaultFilterID);\r
- pGridSizer->Add (m_pListBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND);\r
- \r
- m_pListBoxDomain = new StringValueAndTitleListBox (this, SignalFilter::getDomainCount(), SignalFilter::getDomainTitleArray(), SignalFilter::getDomainNameArray());\r
- m_pListBoxDomain->SetSelection (iDefaultDomainID);\r
- pGridSizer->Add (new wxStaticText (this, -1, "Domain"), 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxALL, 5);\r
- pGridSizer->Add (m_pListBoxDomain, 0, wxALL | wxALIGN_LEFT | wxEXPAND);\r
- \r
- pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (new wxStaticText (this, -1, "Bandwidth"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);\r
- pGridSizer->Add (m_pTextCtrlBandwidth, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);\r
- \r
- pTopSizer->Add (pGridSizer, 1, wxALL, 3);\r
- \r
- pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);\r
- \r
- wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);\r
- wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");\r
- wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");\r
- pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);\r
- pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);\r
- \r
- pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);\r
- \r
- SetAutoLayout (true);\r
- SetSizer (pTopSizer);\r
- pTopSizer->Layout();\r
- pTopSizer->Fit (this);\r
- pTopSizer->SetSizeHints (this);\r
-}\r
-\r
-DialogGetFilterParameters::~DialogGetFilterParameters (void)\r
-{\r
-}\r
-\r
-\r
-unsigned int\r
-DialogGetFilterParameters::getXSize (void)\r
-{\r
- wxString strCtrl = m_pTextCtrlXSize->GetValue();\r
- unsigned long lValue;\r
- if (strCtrl.ToULong (&lValue))\r
- return lValue;\r
- else\r
- return (m_iDefaultXSize);\r
-}\r
-\r
-unsigned int\r
-DialogGetFilterParameters::getYSize (void)\r
-{\r
- wxString strCtrl = m_pTextCtrlYSize->GetValue();\r
- unsigned long lValue;\r
- if (strCtrl.ToULong (&lValue))\r
- return lValue;\r
- else\r
- return (m_iDefaultYSize);\r
-}\r
-\r
-double\r
-DialogGetFilterParameters::getBandwidth (void)\r
-{\r
- wxString strCtrl = m_pTextCtrlBandwidth->GetValue();\r
- double dValue;\r
- if (strCtrl.ToDouble (&dValue))\r
- return dValue;\r
- else\r
- return (m_dDefaultBandwidth);\r
-}\r
-\r
-double\r
-DialogGetFilterParameters::getFilterParam (void)\r
-{\r
- wxString strCtrl = m_pTextCtrlFilterParam->GetValue();\r
- double dValue;\r
- if (strCtrl.ToDouble (&dValue))\r
- return (dValue);\r
- else\r
- return (m_dDefaultFilterParam);\r
-}\r
-\r
-const char*\r
-DialogGetFilterParameters::getFilterName (void)\r
-{\r
- return m_pListBoxFilter->getSelectionStringValue();\r
-}\r
-\r
-const char*\r
-DialogGetFilterParameters::getDomainName (void)\r
-{\r
- return m_pListBoxDomain->getSelectionStringValue();\r
-}\r
-\r
+DialogGetFilterParameters::getDomainName ()
+{
+ return m_pRadioBoxDomain->getSelectionStringValue();
+}
+
+
+///////////////////////////////////////////////////////////////////////
+// CLASS IMPLEMENTATION
+// DialogExportParameters
+///////////////////////////////////////////////////////////////////////
+
+DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultFormatID)
+: wxDialog (pParent, -1, _T("Select ExportParameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, _T("Select Export Format")), 0, wxALIGN_CENTER | wxALL, 5);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
+
+ m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
+ ImageFile::getExportFormatCount(), ImageFile::getExportFormatTitleArray(), ImageFile::getExportFormatNameArray());
+ m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
+ pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+ CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_EXPORT);
+ pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
+
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+ pButtonOk->SetDefault();
+
+ SetAutoLayout (true);
+ SetSizer (pTopSizer);
+ pTopSizer->Fit (this);
+ pTopSizer->SetSizeHints (this);
+}
+
+const char*
+DialogExportParameters::getFormatName()
+{
+ return m_pRadioBoxFormat->getSelectionStringValue();
+}
+
+
+///////////////////////////////////////////////////////////////////////
+// CLASS IMPLEMENTATION
+// DialogImportParameters
+///////////////////////////////////////////////////////////////////////
+
+DialogImportParameters::DialogImportParameters (wxWindow* pParent, int iDefaultFormatID)
+: wxDialog (pParent, -1, _T("Select Import Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, _T("Select Import Format")), 0, wxALIGN_CENTER | wxALL, 5);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5);
+
+ m_pRadioBoxFormat = new StringValueAndTitleRadioBox (this, _T("File Type"),
+ ImageFile::getImportFormatCount(), ImageFile::getImportFormatTitleArray(), ImageFile::getImportFormatNameArray());
+ m_pRadioBoxFormat->SetSelection (iDefaultFormatID);
+ pTopSizer->Add (m_pRadioBoxFormat, 0, wxALL | wxALIGN_CENTER);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+ CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_IMPORT);
+ pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
+
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+ pButtonOk->SetDefault();
+
+ SetAutoLayout (true);
+ SetSizer (pTopSizer);
+ pTopSizer->Fit (this);
+ pTopSizer->SetSizeHints (this);
+}
+
+const char*
+DialogImportParameters::getFormatName()
+{
+ return m_pRadioBoxFormat->getSelectionStringValue();
+}
+
+
+/////////////////////////////////////////////////////////////////////
+// CLASS DiaglogGetXYSize Implementation
+/////////////////////////////////////////////////////////////////////
+
+DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, wxChar const * pwszTitle, int iDefaultXSize, int iDefaultYSize)
+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ m_iDefaultXSize = iDefaultXSize;
+ m_iDefaultYSize = iDefaultYSize;
+
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxString sXSize;
+ sXSize << iDefaultXSize;
+ m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
+ wxString sYSize;
+ sYSize << iDefaultYSize;
+ m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
+
+ wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2);
+ pGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
+ pGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
+ pTopSizer->Add (pGridSizer, 1, wxALL, 10);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+ pButtonOk->SetDefault();
+
+ SetAutoLayout (true);
+ SetSizer (pTopSizer);
+ pTopSizer->Fit (this);
+ pTopSizer->SetSizeHints (this);
+}
+
+DialogGetXYSize::~DialogGetXYSize ()
+{
+}
+
+unsigned int
+DialogGetXYSize::getXSize ()
+{
+ wxString strCtrl = m_pTextCtrlXSize->GetValue();
+ long lValue;
+ if (strCtrl.ToLong (&lValue))
+ return lValue;
+ else
+ return (m_iDefaultXSize);
+}
+
+unsigned int
+DialogGetXYSize::getYSize ()
+{
+ wxString strCtrl = m_pTextCtrlYSize->GetValue();
+ long lValue;
+ if (strCtrl.ToLong (&lValue))
+ return lValue;
+ else
+ return (m_iDefaultYSize);
+}
+
+
+
+/////////////////////////////////////////////////////////////////////
+// CLASS IDENTIFICATION
+//
+// DialogGetConvertPolarParameters
+/////////////////////////////////////////////////////////////////////
+
+DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, wxChar const * pwszTitle,
+ int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad, int iHelpID)
+: wxDialog (pParent, -1, pwszTitle, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ m_iDefaultXSize = iDefaultXSize;
+ m_iDefaultYSize = iDefaultYSize;
+ m_iDefaultZeropad = iDefaultZeropad;
+
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, pwszTitle), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxFlexGridSizer* pGridSizer = new wxFlexGridSizer (1);
+
+ m_pRadioBoxInterpolation = new StringValueAndTitleRadioBox (this, _T("Interpolation"), Projections::getInterpCount(), Projections::getInterpTitleArray(), Projections::getInterpNameArray());
+ m_pRadioBoxInterpolation->SetSelection (iDefaultInterpolationID);
+ pGridSizer->Add (m_pRadioBoxInterpolation, 0, wxALL | wxALIGN_CENTER);
+
+ wxFlexGridSizer* pTextGridSizer = new wxFlexGridSizer (2);
+ wxString sXSize;
+ sXSize << iDefaultXSize;
+ m_pTextCtrlXSize = new wxTextCtrl (this, -1, sXSize, wxDefaultPosition, wxSize(100, 25), 0);
+ pTextGridSizer->Add (new wxStaticText (this, -1, _T("X Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pTextGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ wxString sYSize;
+ sYSize << iDefaultYSize;
+ m_pTextCtrlYSize = new wxTextCtrl (this, -1, sYSize, wxDefaultPosition, wxSize(100, 25), 0);
+ pTextGridSizer->Add (new wxStaticText (this, -1, _T("Y Size")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pTextGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ if (m_iDefaultZeropad >= 0) {
+ wxString sZeropad;
+ sZeropad << iDefaultZeropad;
+ m_pTextCtrlZeropad = new wxTextCtrl (this, -1, sZeropad, wxDefaultPosition, wxSize(100, 25), 0);
+ pTextGridSizer->Add (new wxStaticText (this, -1, _T("Zeropad")), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+ pTextGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ }
+
+ pGridSizer->Add (pTextGridSizer, 0, wxALIGN_CENTER | wxALL);
+
+ pTopSizer->Add (pGridSizer, 1, wxALL | wxALIGN_CENTER, 3);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+ wxButton* pButtonOk = new wxButton (this, wxID_OK, _T("Okay"));
+ pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+ wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, _T("Cancel"));
+ pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+ CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, iHelpID);
+ pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10);
+
+ pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+ pButtonOk->SetDefault();
+ SetAutoLayout (true);
+ SetSizer (pTopSizer);
+ pTopSizer->Layout();
+ pTopSizer->Fit (this);
+ pTopSizer->SetSizeHints (this);
+}
+
+
+DialogGetConvertPolarParameters::~DialogGetConvertPolarParameters ()
+{
+}
+
+
+unsigned int
+DialogGetConvertPolarParameters::getXSize ()
+{
+ wxString strCtrl = m_pTextCtrlXSize->GetValue();
+ unsigned long lValue;
+ if (strCtrl.ToULong (&lValue))
+ return lValue;
+ else
+ return (m_iDefaultXSize);
+}
+
+unsigned int
+DialogGetConvertPolarParameters::getYSize ()
+{
+ wxString strCtrl = m_pTextCtrlYSize->GetValue();
+ unsigned long lValue;
+ if (strCtrl.ToULong (&lValue))
+ return lValue;
+ else
+ return (m_iDefaultYSize);
+}
+
+unsigned int
+DialogGetConvertPolarParameters::getZeropad ()
+{
+ if (m_iDefaultZeropad >= 0) {
+ wxString strCtrl = m_pTextCtrlZeropad->GetValue();
+ unsigned long lValue;
+ if (strCtrl.ToULong (&lValue))
+ return lValue;
+ else
+ return (m_iDefaultZeropad);
+ } else
+ return 0;
+}
+
+const char*
+DialogGetConvertPolarParameters::getInterpolationName ()
+{
+ return m_pRadioBoxInterpolation->getSelectionStringValue();
+}
+