** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.107 2001/02/19 20:23:17 kevin Exp $
+** $Id: views.cpp,v 1.108 2001/02/20 04:48:45 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
return;
}
pProj->initFromScanner (theScanner);
- m_dDefaultRotation /= PI; // convert back to PI units
+ m_dDefaultRotation /= TWOPI; // convert back to fraction of a circle
Timer timer;
if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
wxString optBackprojectName = dialogReconstruction.getBackprojectName();
m_iDefaultBackprojector = Backprojector::convertBackprojectNameToID (optBackprojectName.c_str());
m_iDefaultTrace = dialogReconstruction.getTrace();
+
if (m_iDefaultNX > 0 && m_iDefaultNY > 0) {
const Projections& rProj = GetDocument()->getProjections();
-
ImageFile* pImageFile = new ImageFile;
pImageFile->setArraySize (m_iDefaultNX, m_iDefaultNY);
- Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
+ Reconstructor* pReconstructor = new Reconstructor (rProj, *pImageFile, optFilterName.c_str(),
+ m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(),
+ optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
Timer timerRecon;
if (m_iDefaultTrace > Trace::TRACE_CONSOLE) {
ReconstructDialog* pDlgReconstruct = new ReconstructDialog (*pReconstructor, rProj, *pImageFile, m_iDefaultTrace, getFrameForChild());
for (int iView = 0; iView < rProj.nView(); iView++) {
::wxYield();
- if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView)) {
+ if (pDlgReconstruct->isCancelled() || ! pDlgReconstruct->reconstructView (iView, true)) {
delete pDlgReconstruct;
delete pReconstructor;
delete pImageFile;
return;
}
::wxYield();
+ ::wxYield();
while (pDlgReconstruct->isPaused()) {
::wxYield();
::wxUsleep(50);
delete pDlgReconstruct;
} else {
wxProgressDialog dlgProgress (wxString("Reconstruction"), wxString("Reconstruction Progress"), rProj.nView() + 1, getFrameForChild(), wxPD_CAN_ABORT);
- for (int i = 0; i < rProj.nView(); i++) {
- pReconstructor->reconstructView (i, 1);
- if (! dlgProgress.Update (i + 1)) {
+ for (int iView = 0; iView < rProj.nView(); iView++) {
+ pReconstructor->reconstructView (iView, 1);
+ if (! dlgProgress.Update (iView + 1)) {
delete pReconstructor;
delete pImageFile;
return;