** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.21 2000/09/04 09:06:46 kevin Exp $
+** $Id: views.cpp,v 1.23 2000/10/11 08:16:08 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
PhantomView::OnProperties (wxCommandEvent& event)
{
const int idPhantom = GetDocument()->getPhantomID();
- const string& namePhantom = GetDocument()->getPhantomName();
+ const wxString& namePhantom = GetDocument()->getPhantomName();
ostringstream os;
- os << "Phantom " << namePhantom << " (" << idPhantom << ")\n";
+ os << "Phantom " << namePhantom.c_str() << " (" << idPhantom << ")\n";
*theApp->getLog() << os.str().c_str();
#if DEBUG
const Phantom& rPhantom = GetDocument()->getPhantom();
rProj.setRemark (os.str());
*theApp->getLog() << os.str().c_str();
+ m_frame->Lower();
::wxYield();
- pProjectionDoc->Modify(true);
- pProjectionDoc->UpdateAllViews(this);
- ::wxYield();
- if (wxView* pView = pProjectionDoc->GetFirstView())
+ if (wxView* pView = pProjectionDoc->GetFirstView()) {
if (wxFrame* pFrame = pView->GetFrame()) {
pFrame->SetFocus();
pFrame->Raise();
}
- m_frame->Lower();
+ theApp->getDocManager()->ActivateView (pView, true, false);
+ }
+ ::wxYield();
+ pProjectionDoc->Modify(true);
+ pProjectionDoc->UpdateAllViews(this);
}
}
}
imageFile.setArraySize (m_iDefaultNX, m_iDefaultNY);
Timer timerRecon;
+ if (m_iDefaultFilterMethod != ProcessSignal::FILTER_METHOD_CONVOLUTION && m_iDefaultFilterGeneration == ProcessSignal::FILTER_GENERATION_DIRECT && rProj.geometry() != Scanner::GEOMETRY_PARALLEL) {
+ wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with direct filter generation is not support for geometries other than parallel.\nAborting command.", "Not Supported", wxOK | wxICON_WARNING, m_frame);
+ return;
+ }
+#if 0
+ SGPDriver* pSGPDriver = NULL;
+ SGP* pSGP = NULL;
+ wxMemoryDC* pDCPlot = NULL;
+ wxBitmap bitmap;
+ if (m_iDefaultTrace >= Trace::TRACE_PLOT) {
+ bitmap.Create (500, 500);
+ pDCPlot = new wxMemoryDC;
+ pDCPlot->SelectObject (bitmap);
+ pSGPDriver = new SGPDriver (dynamic_cast<wxDC*>pDCPlot, 500, 500);
+ pSGP = new SGP (*pSGPDriver);
+ }
+ Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace, pSGP);
+ delete pSGP;
+#else
Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
+#endif
+
if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstruct, rProj, imageFile, m_iDefaultTrace, m_frame);
for (int iView = 0; iView < rProj.nView(); iView++) {