X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdialogs.cpp;h=d620b12f19f6aff22a825d0ae78835af3a549cab;hp=806b3fc996a429b445efce01ca8f6f2e5a984742;hb=c953cbb6ffc2fd50e736230f4e6976a025983cff;hpb=3b09207d7c37bc3d48e331657353123ed2f66ed9 diff --git a/src/dialogs.cpp b/src/dialogs.cpp index 806b3fc..d620b12 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.43 2001/02/25 06:32:12 kevin Exp $ +** $Id: dialogs.cpp,v 1.44 2001/03/01 07:30:49 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 @@ -575,14 +575,15 @@ DialogGetRasterParameters::getViewRatio () DialogGetProjectionParameters::DialogGetProjectionParameters (wxWindow* pParent, int iDefaultNDet, int iDefaultNView, int iDefaultNSamples, - double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultViewRatio, - double dDefaultScanRatio, int iDefaultGeometry, int iDefaultTrace) + double dDefaultRotAngle, double dDefaultFocalLength, double dDefaultCenterDetectorLength, + double dDefaultViewRatio, double dDefaultScanRatio, int iDefaultGeometry, int iDefaultTrace) : wxDialog (pParent, -1, "Set Projection Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION) { wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); m_dDefaultRotAngle = dDefaultRotAngle; m_dDefaultFocalLength = dDefaultFocalLength; + m_dDefaultCenterDetectorLength = dDefaultCenterDetectorLength; m_dDefaultViewRatio = dDefaultViewRatio; m_dDefaultScanRatio = dDefaultScanRatio; m_iDefaultNSamples = iDefaultNSamples; @@ -640,7 +641,13 @@ DialogGetProjectionParameters::DialogGetProjectionParameters m_pTextCtrlFocalLength = new wxTextCtrl (this, -1, osFocalLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); pText2Sizer->Add (new wxStaticText (this, -1, "Focal Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); pText2Sizer->Add (m_pTextCtrlFocalLength, 0, wxALIGN_CENTER_VERTICAL); - + + std::ostringstream osCenterDetectorLength; + osCenterDetectorLength << dDefaultCenterDetectorLength; + m_pTextCtrlCenterDetectorLength = new wxTextCtrl (this, -1, osCenterDetectorLength.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0); + pText2Sizer->Add (new wxStaticText (this, -1, "Center-Detector Length Ratio"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); + pText2Sizer->Add (m_pTextCtrlCenterDetectorLength, 0, wxALIGN_CENTER_VERTICAL); + if (theApp->getAdvancedOptions()) { std::ostringstream osRotAngle; osRotAngle << dDefaultRotAngle; @@ -740,6 +747,17 @@ DialogGetProjectionParameters::getFocalLengthRatio () return (m_dDefaultFocalLength); } +double +DialogGetProjectionParameters::getCenterDetectorLengthRatio () +{ + wxString strCtrl = m_pTextCtrlCenterDetectorLength->GetValue(); + double dValue; + if (strCtrl.ToDouble (&dValue)) + return (dValue); + else + return (m_dDefaultCenterDetectorLength); +} + double DialogGetProjectionParameters::getViewRatio () {