** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.17 2000/08/27 20:32:55 kevin Exp $
+** $Id: views.cpp,v 1.18 2000/08/31 08:38:58 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
ImageFileView::OnScaleAuto (wxCommandEvent& event)
{
const ImageFile& rIF = GetDocument()->getImageFile();
- DialogAutoScaleParameters dialogAutoScale (m_frame, rIF);
+ DialogAutoScaleParameters dialogAutoScale (m_frame, rIF, m_dAutoScaleFactor);
int iRetVal = dialogAutoScale.ShowModal();
if (iRetVal == wxID_OK) {
m_bMinSpecified = true;
dialogAutoScale.getMinMax (&dMin, &dMax);
m_dMinPixel = dMin;
m_dMaxPixel = dMax;
+ m_dAutoScaleFactor = dialogAutoScale.getAutoScaleFactor();
OnUpdate (this, NULL);
}
}
m_bMinSpecified = false;
m_bMaxSpecified = false;
+ m_dAutoScaleFactor = 1.;
int width, height;
m_frame->GetClientSize(&width, &height);
if (iTrace > Trace::TRACE_CONSOLE) {
ProjectionsDialog dialogProjections (theScanner, rProj, rPhantom, iTrace, dynamic_cast<wxWindow*>(m_frame));
for (int iView = 0; iView < rProj.nView(); iView++) {
- if (! dialogProjections.projectView (iView)) {
+ ::wxYield();
+ ::wxYield();
+ if (dialogProjections.isCancelled() || ! dialogProjections.projectView (iView)) {
pProjectionDoc->DeleteAllViews();
return;
}
::wxYield();
+ ::wxYield();
+ while (dialogProjections.isPaused()) {
+ ::wxYield();
+ ::wxUsleep(50);
+ }
}
} else
- theScanner.collectProjections (rProj, rPhantom);
+ theScanner.collectProjections (rProj, rPhantom, iTrace);
pProjectionDoc->Modify(true);
pProjectionDoc->UpdateAllViews(this);
}
ostringstream os;
os << "Projections for " << rPhantom.name() << ": nDet=" << nDet << ", nView=" << nView << ", nSamples=" << nSamples << ", RotAngle=" << dRotAngle << ", FocalLengthRatio=" << dFocalLengthRatio << ", FieldOfViewRatio=" << dFieldOfViewRatio << ", Geometry=" << sGeometry.c_str() << "\n";
+ rProj.setRemark (os.str());
*theApp->getLog() << os.str().c_str();
}
}
{
const Projections& rProj = GetDocument()->getProjections();
ostringstream os;
- os << "ProjectionFile " << rProj.getFilename() << ": Number of Detectors = " << rProj.nDet() << ", Number of Views = " << rProj.nView() << "\n";
+ rProj.printScanInfo(os);
*theApp->getLog() << os.str().c_str();
}