+ DialogGetProjectionParameters dialogProjection (m_frame, 367, 320, 1, 1., Scanner::GEOMETRY_PARALLEL);
+ int retVal = dialogProjection.ShowModal();
+ if (retVal == wxID_OK) {
+ int nDet = dialogProjection.getNDet();
+ int nView = dialogProjection.getNView();
+ int nSamples = dialogProjection.getNSamples();
+ double dRotAngle = dialogProjection.getRotAngle();
+ wxString sGeometry = dialogProjection.getGeometry();
+ if (nDet > 0 && nView > 0 && sGeometry != "") {
+ const Phantom& rPhantom = GetDocument()->getPhantom();
+ ProjectionFileDocument* pProjectionDoc = dynamic_cast<ProjectionFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.pj", wxDOC_SILENT));
+ Projections& rProj = pProjectionDoc->getProjections();
+ Scanner theScanner (rPhantom, sGeometry.c_str(), nDet, nView, nSamples, dRotAngle);
+ rProj.initFromScanner (theScanner);
+
+#if 1
+ //wxScrolledWindow win (m_canvas, -1, wxDefaultPosition, wxSize(500,500), 0);
+ //win.SetSize (500, 500);
+ // wxClientDC dc (&win);
+ //win.PrepareDC ();
+ //win.Show();
+ wxClientDC dc (m_canvas);
+ SGPDriver driver ((wxDC*) &dc, "Projections", 400, 400);
+ SGP sgp (driver);
+ theScanner.collectProjections (rProj, rPhantom, 0, TRACE_PHM, &sgp);
+#else
+ theScanner.collectProjections (rProj, rPhantom, 0, TRACE_PHM);
+#endif
+
+ pProjectionDoc->Modify(true);
+ pProjectionDoc->UpdateAllViews(this);
+ ostringstream os;
+ os << "Projections for " << rPhantom.name() << ": nDet=" << nDet << ", nView=" << nView << ", nSamples=" << nSamples << ", RotAngle=" << dRotAngle << ", Geometry=" << sGeometry.c_str() << "\n";
+ *theApp->getLog() << os.str().c_str();
+ }
+ }