X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdialogs.cpp;h=11cb30c7b949a632a741b71f41f7b5dc96f00d47;hb=50fd2b2fb2ff63871986e6853dbebad0ecd00698;hp=4681b7c8725b2e7a96d286525c02192f70b9c9b3;hpb=7c695eef645b25a1df6a95c4fc72f6b2994a3630;p=ctsim.git diff --git a/src/dialogs.cpp b/src/dialogs.cpp index 4681b7c..11cb30c 100644 --- a/src/dialogs.cpp +++ b/src/dialogs.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dialogs.cpp,v 1.32 2001/02/14 18:39:47 kevin Exp $ +** $Id: dialogs.cpp,v 1.34 2001/02/16 02:36:18 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -113,23 +113,26 @@ DialogGetPhantom::DialogGetPhantom (wxWindow* pParent, int iDefaultPhantom) { wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); - pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxALIGN_CENTER | wxALL, 5); + pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxCENTER | wxALL, 5); - pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxALL, 5); + pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5); m_pRadioBoxPhantom = new StringValueAndTitleRadioBox (this, _T("Phantom"), Phantom::getPhantomCount(), Phantom::getPhantomTitleArray(), Phantom::getPhantomNameArray()); m_pRadioBoxPhantom->SetSelection (iDefaultPhantom); - pTopSizer->Add (m_pRadioBoxPhantom, 0, wxALL | wxALIGN_CENTER | wxEXPAND); + pTopSizer->Add (m_pRadioBoxPhantom, 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, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); - + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PHANTOM); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); + pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -183,11 +186,14 @@ DialogGetComparisonImage::DialogGetComparisonImage (wxWindow* pParent, const cha wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_COMPARISON); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -237,11 +243,14 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PREFERENCES); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -297,11 +306,14 @@ DialogGetMinMax::DialogGetMinMax (wxWindow* pParent, const char* const pszTitle, wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_MINMAX); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -353,7 +365,7 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double m_pRadioBoxCenter = new wxRadioBox (this, -1, _T("Center"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS); m_pRadioBoxCenter->SetSelection (0); - pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER | wxEXPAND); + pTopSizer->Add (m_pRadioBoxCenter, 0, wxALL | wxALIGN_CENTER); wxGridSizer *pGridSizer = new wxGridSizer (2); pGridSizer->Add (new wxStaticText (this, -1, "Standard Deviation Factor"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); @@ -367,11 +379,14 @@ DialogAutoScaleParameters::DialogAutoScaleParameters (wxWindow *pParent, double wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_AUTOSCALE); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -416,6 +431,7 @@ DialogAutoScaleParameters::getAutoScaleFactor () } + ///////////////////////////////////////////////////////////////////// // CLASS IDENTIFICATION // @@ -460,11 +476,14 @@ DialogGetRasterParameters::DialogGetRasterParameters wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); - + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RASTERIZE); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); + pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -612,11 +631,14 @@ DialogGetProjectionParameters::DialogGetProjectionParameters wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_PROJECTIONS); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -760,10 +782,27 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow* m_pRadioBoxFilter->SetSelection (iDefaultFilterID); pGridSizer->Add (m_pRadioBoxFilter, 0, wxALL | wxALIGN_LEFT | wxEXPAND); - m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray()); - m_pRadioBoxFilterMethod->SetSelection (iDefaultFilterMethodID); - pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND); - + if (theApp->getAdvancedOptions()) { + m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), ProcessSignal::getFilterMethodCount(), ProcessSignal::getFilterMethodTitleArray(), ProcessSignal::getFilterMethodNameArray()); + m_pRadioBoxFilterMethod->SetSelection (iDefaultFilterMethodID); + pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND); + } else { +#if HAVE_FFTW + static const char* aszFilterMethodTitle[] = {"Convolution", "FFT"}; + static const char* aszFilterMethodName[] = {"convolution", "rfftw"}; +#else + static const char* aszFilterMethodTitle[] = {"Convolution", "Fourier"}; + static const char* aszFilterMethodName[] = {"convolution", "fourier-table"}; +#endif + m_pRadioBoxFilterMethod = new StringValueAndTitleRadioBox (this, _T("Filter Method"), 2, aszFilterMethodTitle, aszFilterMethodName); +#if HAVE_FFTW + m_pRadioBoxFilterMethod->SetSelection (1); +#else + m_pRadioBoxFilterMethod->SetSelection (0); +#endif + pGridSizer->Add (m_pRadioBoxFilterMethod, 0, wxALL | wxALIGN_LEFT | wxEXPAND); + } + if (theApp->getAdvancedOptions()) { m_pRadioBoxFilterGeneration = new StringValueAndTitleRadioBox (this, _T("Filter Generation"), ProcessSignal::getFilterGenerationCount(), ProcessSignal::getFilterGenerationTitleArray(), ProcessSignal::getFilterGenerationNameArray()); m_pRadioBoxFilterGeneration->SetSelection (iDefaultFilterGenerationID); @@ -826,11 +865,14 @@ DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxWindow* wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_RECONSTRUCTION); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); @@ -1026,12 +1068,15 @@ DialogGetFilterParameters::DialogGetFilterParameters (wxWindow* pParent, int iDe wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_FILTER); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); - + pButtonOk->SetDefault(); + SetAutoLayout (true); SetSizer (pTopSizer); pTopSizer->Layout(); @@ -1145,12 +1190,15 @@ DialogExportParameters::DialogExportParameters (wxWindow* pParent, int iDefaultF wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "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); @@ -1198,12 +1246,13 @@ DialogGetXYSize::DialogGetXYSize (wxWindow* pParent, const char* const pszTitle, wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); - + pButtonOk->SetDefault(); + SetAutoLayout (true); SetSizer (pTopSizer); pTopSizer->Fit (this); @@ -1289,12 +1338,14 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL); wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay"); - wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10); + wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel"); pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, IDH_DLG_POLAR); + pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER); - + pButtonOk->SetDefault(); SetAutoLayout (true); SetSizer (pTopSizer); pTopSizer->Layout();