** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: dialogs.cpp,v 1.54 2001/03/30 19:17:32 kevin Exp $
+** $Id: dialogs.cpp,v 1.57 2002/05/03 09:57:41 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
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);
bool
DialogPreferences::getUseBackgroundTasks ()
{
-#ifdef HAVE_WXTHREADS
+#if HAVE_WXTHREADS && MSVC
return static_cast<bool>(m_pCBUseBackgroundTasks->GetValue());
#else
return false;
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)
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);
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 ()