X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdialogs.cpp;h=df9354dee2bfe0fed68a96a93f8b41dba1b21083;hb=79b656146b04b1d57d1ac27f9f2e5474e17c4936;hp=66a577e5287cfb6fa8a76e2a890c83ebabf0c26b;hpb=728e9fcbe0b785e56e7dcd2bd305786c647050af;p=ctsim.git diff --git a/src/dialogs.cpp b/src/dialogs.cpp index 66a577e..df9354d 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.53 2001/03/29 21:25:50 kevin Exp $ +** $Id$ ** ** 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 @@ -25,10 +25,6 @@ ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ -#ifdef __GNUG__ -// #pragma implementation -#endif - #include "wx/wxprec.h" #ifndef WX_PRECOMP @@ -301,7 +297,7 @@ DialogPreferences::DialogPreferences (wxWindow* pParent, const char* const pszTi m_pCBStartupTips->SetValue (bStartupTips); pTopSizer->Add (m_pCBStartupTips, 0, wxALIGN_CENTER_VERTICAL); -#ifdef HAVE_WXTHREADS +#if HAVE_WXTHREADS && MSVC m_pCBUseBackgroundTasks = new wxCheckBox (this, -1, "Put Tasks in Background", wxDefaultPosition, wxSize(250, 25), 0); m_pCBUseBackgroundTasks->SetValue (bUseBackgroundTasks); pTopSizer->Add (m_pCBUseBackgroundTasks, 0, wxALIGN_CENTER_VERTICAL); @@ -357,7 +353,7 @@ DialogPreferences::getStartupTips () bool DialogPreferences::getUseBackgroundTasks () { -#ifdef HAVE_WXTHREADS +#if HAVE_WXTHREADS && MSVC return static_cast(m_pCBUseBackgroundTasks->GetValue()); #else return false; @@ -639,7 +635,7 @@ DialogGetRasterParameters::getViewRatio () DialogGetProjectionParameters::DialogGetProjectionParameters - (wxWindow* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples, + (wxWindow* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultOffsetView, int iDefaultNSamples, double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultCenterDetectorLength, double dDefaultViewRatio, double dDefaultScanRatio, int iDefaultGeometry, int iDefaultTrace) : wxDialog (pParent, -1, _T("Projection Parameters"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION) @@ -719,6 +715,13 @@ DialogGetProjectionParameters::DialogGetProjectionParameters m_pTextCtrlRotAngle = new wxTextCtrl (this, -1, osRotAngle.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pText2Sizer->Add (new wxStaticText (this, -1, "Rotation Angle (Fraction of circle)"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pText2Sizer->Add (m_pTextCtrlRotAngle, 0, wxALIGN_CENTER_VERTICAL); + + std::ostringstream osOffsetView; + osOffsetView << iDefaultOffsetView; + m_pTextCtrlOffsetView = new wxTextCtrl (this, -1, osOffsetView.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); + pText2Sizer->Add (new wxStaticText (this, -1, "Gantry offset in units of 'views' "), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + pText2Sizer->Add (m_pTextCtrlOffsetView, 0, wxALIGN_CENTER_VERTICAL); + } pGridSizer->Add (pText2Sizer); @@ -772,6 +775,20 @@ DialogGetProjectionParameters::getNView () return (m_iDefaultNView); } +unsigned int +DialogGetProjectionParameters::getOffsetView () +{ + if (theApp->getAdvancedOptions()) { + wxString strCtrl = m_pTextCtrlOffsetView->GetValue(); + unsigned long lValue; + if (strCtrl.ToULong (&lValue)) + return lValue; + else + return (m_iDefaultOffsetView); + } + else + return 0; +} unsigned int DialogGetProjectionParameters::getNSamples () @@ -1521,7 +1538,7 @@ DialogGetXYSize::getYSize () ///////////////////////////////////////////////////////////////////// DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pParent, const char* const pszTitle, - int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad) + int iDefaultXSize, int iDefaultYSize, int iDefaultInterpolationID, int iDefaultZeropad, int iHelpID) : wxDialog (pParent, -1, _T(pszTitle), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION) { m_iDefaultXSize = iDefaultXSize; @@ -1569,7 +1586,7 @@ DialogGetConvertPolarParameters::DialogGetConvertPolarParameters (wxWindow* pPar 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); + CTSimHelpButton* pButtonHelp = new CTSimHelpButton (this, iHelpID); pButtonSizer->Add (pButtonHelp, 0, wxEXPAND | wxALL, 10); pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);