+///////////////////////////////////////////////////////////////////////
+// CLASS IMPLEMENTATION
+// DialogGetThetaRange
+///////////////////////////////////////////////////////////////////////
+
+DialogGetThetaRange::DialogGetThetaRange (wxWindow* pParent, int iDefaultThetaRange)
+: wxDialog (pParent, -1, _T("Select Phantom"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+ wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+ pTopSizer->Add (new wxStaticText (this, -1, _T("Select Theta Range")), 0, wxCENTER | wxALL, 5);
+
+ pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+ wxString asTitle[] = {_T("Unconstrained"), _T("Normalized to 2pi"), _T("Fold to pi")};
+
+ m_pRadioBoxThetaRange = new wxRadioBox (this, -1, _T("Theta Range"), wxDefaultPosition, wxDefaultSize, 3, asTitle, 1, wxRA_SPECIFY_COLS);
+ if (iDefaultThetaRange == ParallelRaysums::THETA_RANGE_UNCONSTRAINED)
+ m_pRadioBoxThetaRange->SetSelection (0);
+ else if (iDefaultThetaRange == ParallelRaysums::THETA_RANGE_NORMALIZE_TO_TWOPI)
+ m_pRadioBoxThetaRange->SetSelection (1);
+ else if (iDefaultThetaRange == ParallelRaysums::THETA_RANGE_FOLD_TO_PI)
+ m_pRadioBoxThetaRange->SetSelection (2);
+
+ pTopSizer->Add (m_pRadioBoxThetaRange, 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_THETA_RANGE);
+ 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);
+}
+
+int
+DialogGetThetaRange::getThetaRange()
+{
+ int iSelection = m_pRadioBoxThetaRange->GetSelection();
+ if (iSelection == 0)
+ return ParallelRaysums::THETA_RANGE_UNCONSTRAINED;
+ else if (iSelection == 1)
+ return ParallelRaysums::THETA_RANGE_NORMALIZE_TO_TWOPI;
+ else
+ return ParallelRaysums::THETA_RANGE_FOLD_TO_PI;
+}
+
+