X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=2edb737e0e0c74af7c010acf7a521b75dddb0884;hp=c17d50c5b41dc715b2dcedd9fd9fde44662dedc2;hb=98f894fe74f1a532f5e6d69cca0404d9a58893e7;hpb=586af74e42519b0511311df711bab2b2be962629 diff --git a/src/views.cpp b/src/views.cpp index c17d50c..2edb737 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** 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.22 2000/09/07 01:28:33 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 @@ -467,16 +467,18 @@ PhantomView::OnProjections (wxCommandEvent& event) 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); } } } @@ -731,7 +733,28 @@ ProjectionFileView::OnReconstruct (wxCommandEvent& event) 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_castpDCPlot, 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++) {