+ 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++) {
+ ::wxYield();
+ ::wxYield();
+ if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) {
+ delete pDlgReconstruct;
+ delete pReconstruct;
+ pReconDoc->DeleteAllViews();
+ return;
+ }
+ ::wxYield();
+ ::wxYield();
+ while (pDlgReconstruct->isPaused()) {
+ ::wxYield();
+ ::wxUsleep(50);
+ }
+ }
+ delete pDlgReconstruct;
+ } else {
+ wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, m_frame, wxPD_CAN_ABORT);
+ for (int i = 0; i < rProj.nView(); i++) {
+ pReconstruct->reconstructView (i, 1);
+ if (! dlgProgress.Update(i + 1)) {
+ delete pReconstruct;
+ pReconDoc->DeleteAllViews();
+ return;
+ }
+ }
+ }
+ delete pReconstruct;