- if ( iViewNumber < m_rProjections.nView() ) {
- wxYield(); // update the display
- m_iLastView = iViewNumber;
- m_pSGP->eraseWindow();
- if (m_iTrace >= Trace::TRACE_PLOT)
- m_pSGP->setViewport (0, 0, 1, 1);
- char szProgress [256];
- snprintf (szProgress, sizeof(szProgress), "Reconstructing View %d (%.1f%%)", iViewNumber, 100 * iViewNumber / static_cast<double>(m_rProjections.nView()));
- double wText, hText;
- m_pSGP->setTextColor (C_LTRED, -1);
- m_pSGP->getTextExtent (szProgress, &wText, &hText);
- double xw_max, xw_min, yw_max, yw_min;
- m_pSGP->getWindow (xw_min, yw_min, xw_max, yw_max);
- m_pSGP->moveAbs ((xw_max - xw_min) / 2 + xw_min - wText / 2, yw_max - hText);
- m_pSGP->drawText (szProgress);
- if (m_iTrace >= Trace::TRACE_PLOT)
- m_pSGP->setViewport (0, .1, 0.66, 1);
- m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP);
-
- ::wxYield();
- m_pDC->SelectObject (wxNullBitmap);
- Refresh();
- m_pDC->SelectObject (m_bitmap);
+ if ( iViewNumber < m_rProjections.nView() ) {
+ m_iLastView = iViewNumber;
+ ::wxYield(); // update the display
+ m_pSGP->eraseWindow();
+ m_btnPause->Refresh();
+ m_btnStep->Refresh();
+ m_btnAbort->Refresh();
+
+ char szProgress [256];
+ snprintf (szProgress, sizeof(szProgress), "Reconstructing View %d (%.1f%%)", iViewNumber, 100 * iViewNumber / static_cast<double>(m_rProjections.nView()));
+ m_pSGP->setViewport (0, 0, 1, 1);
+ m_pSGP->setWindow (0, 0, 1, 1);
+ m_pSGP->setTextColor (C_LTRED, -1);
+ m_pSGP->setTextPointSize (20.);
+ m_pSGP->moveAbs(0., m_pSGP->getCharHeight());
+ m_pSGP->drawText (szProgress);
+ m_pSGP->setTextPointSize (10.);
+
+ int iXDialog, iYDialog;
+ GetClientSize (&iXDialog, &iYDialog);
+ double dGraphWidth = (iXDialog - m_nxImage) / static_cast<double>(iXDialog);
+
+ m_rReconstructor.reconstructView (iViewNumber, 1, m_pSGP, bBackprojectView, dGraphWidth);