projects
/
ctsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f169027
)
r1835: fixed loss of frame with rastered phantom with wxGTK
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Tue, 30 Apr 2002 03:37:12 +0000
(
03:37
+0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Tue, 30 Apr 2002 03:37:12 +0000
(
03:37
+0000)
src/views.cpp
patch
|
blob
|
history
diff --git
a/src/views.cpp
b/src/views.cpp
index 7ae2293fc27f2fd062c4953e048c188717f3ff7d..b7934f1901c9cc4320ae02e155561515a2e324a4 100644
(file)
--- a/
src/views.cpp
+++ b/
src/views.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.14
7 2001/09/27 02:11:29
kevin Exp $
+** $Id: views.cpp,v 1.14
8 2002/04/30 03:37:12
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
**
** 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
@@
-2225,14
+2225,15
@@
PhantomFileView::OnRasterize (wxCommandEvent& event)
#endif
{
ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY);
#endif
{
ImageFile* pImageFile = new ImageFile (m_iDefaultRasterNX, m_iDefaultRasterNY);
+
wxProgressDialog dlgProgress (wxString("Rasterize"), wxString("Rasterization Progress"),
wxProgressDialog dlgProgress (wxString("Rasterize"), wxString("Rasterization Progress"),
- pImageFile->nx() + 1, getFrameForChild(), wxPD_CAN_ABORT );
+
pImageFile->nx() + 1, getFrameForChild(), wxPD_CAN_ABORT );
Timer timer;
for (unsigned int i = 0; i < pImageFile->nx(); i++) {
rPhantom.convertToImagefile (*pImageFile, m_dDefaultRasterViewRatio, m_iDefaultRasterNSamples, Trace::TRACE_NONE, i, 1, true);
if (! dlgProgress.Update (i+1)) {
Timer timer;
for (unsigned int i = 0; i < pImageFile->nx(); i++) {
rPhantom.convertToImagefile (*pImageFile, m_dDefaultRasterViewRatio, m_iDefaultRasterNSamples, Trace::TRACE_NONE, i, 1, true);
if (! dlgProgress.Update (i+1)) {
-
delete pImageFile;
-
return;
+ delete pImageFile;
+ return;
}
}
}
}
@@
-2244,16
+2245,17
@@
PhantomFileView::OnRasterize (wxCommandEvent& event)
pRasterDoc->setImageFile (pImageFile);
if (theApp->getAskDeleteNewDocs())
pRasterDoc->Modify (true);
pRasterDoc->setImageFile (pImageFile);
if (theApp->getAskDeleteNewDocs())
pRasterDoc->Modify (true);
- pRasterDoc->UpdateAllViews (this);
- pRasterDoc->getView()->getFrame()->Show(true);
*theApp->getLog() << os.str().c_str() << "\n";
pImageFile->labelAdd (os.str().c_str(), timer.timerEnd());
*theApp->getLog() << os.str().c_str() << "\n";
pImageFile->labelAdd (os.str().c_str(), timer.timerEnd());
- ImageFileView* rasterView = pRasterDoc->getView();
- if (rasterView) {
+
+ if (ImageFileView* rasterView = pRasterDoc->getView()) {
+ rasterView->getFrame()->Show(true);
rasterView->getFrame()->SetFocus();
rasterView->OnUpdate (rasterView, NULL);
}
rasterView->getFrame()->SetFocus();
rasterView->OnUpdate (rasterView, NULL);
}
- pRasterDoc->Activate();
+ // Causes loss of frame in wxGTK
+ // pRasterDoc->UpdateAllViews (this);
+ // pRasterDoc->Activate();
}
}
}
}
@@
-2457,7
+2459,7
@@
EVT_MENU(PJMENU_CONVERT_FFT_POLAR, ProjectionFileView::OnConvertFFTPolar)
EVT_MENU(PJMENU_CONVERT_PARALLEL, ProjectionFileView::OnConvertParallel)
EVT_MENU(PJMENU_PLOT_TTHETA_SAMPLING, ProjectionFileView::OnPlotTThetaSampling)
EVT_MENU(PJMENU_PLOT_HISTOGRAM, ProjectionFileView::OnPlotHistogram)
EVT_MENU(PJMENU_CONVERT_PARALLEL, ProjectionFileView::OnConvertParallel)
EVT_MENU(PJMENU_PLOT_TTHETA_SAMPLING, ProjectionFileView::OnPlotTThetaSampling)
EVT_MENU(PJMENU_PLOT_HISTOGRAM, ProjectionFileView::OnPlotHistogram)
-EVT_MENU(PJMENU_ARTIFACT_REDUCTION, ProjectionFileView::OnArtifactReduction)
+
//
EVT_MENU(PJMENU_ARTIFACT_REDUCTION, ProjectionFileView::OnArtifactReduction)
END_EVENT_TABLE()
END_EVENT_TABLE()
@@
-2951,16
+2953,18
@@
ProjectionFileView::doReconstructFBP (const Projections& rProj, bool bRebinToPar
pReconDoc->setImageFile (pImageFile);
if (theApp->getAskDeleteNewDocs())
pReconDoc->Modify (true);
pReconDoc->setImageFile (pImageFile);
if (theApp->getAskDeleteNewDocs())
pReconDoc->Modify (true);
- pReconDoc->UpdateAllViews (this);
- pReconDoc->Activate();
- if (ImageFileView* rasterView = pReconDoc->getView()) {
- rasterView->OnUpdate (rasterView, NULL);
- rasterView->getFrame()->SetFocus();
- rasterView->getFrame()->Show(true);
- }
*theApp->getLog() << os.str().c_str() << "\n";
pImageFile->labelAdd (rProj.getLabel());
pImageFile->labelAdd (os.str().c_str(), timerRecon.timerEnd());
*theApp->getLog() << os.str().c_str() << "\n";
pImageFile->labelAdd (rProj.getLabel());
pImageFile->labelAdd (os.str().c_str(), timerRecon.timerEnd());
+
+ if (ImageFileView* rasterView = pReconDoc->getView()) {
+ rasterView->getFrame()->Show(true);
+ rasterView->getFrame()->SetFocus();
+ rasterView->OnUpdate (rasterView, NULL);
+ }
+ // causes loss of frame in wxGTK
+ //pReconDoc->UpdateAllViews (this);
+ // pReconDoc->Activate();
}
}
@@
-3033,8
+3037,8
@@
ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
convert_menu->AppendSeparator();
convert_menu->Append (PJMENU_CONVERT_PARALLEL, "&Interpolate to Parallel");
convert_menu->AppendSeparator();
convert_menu->Append (PJMENU_CONVERT_PARALLEL, "&Interpolate to Parallel");
- wxMenu* filter_menu = new wxMenu;
- filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, "&Artifact Reduction");
+
//
wxMenu* filter_menu = new wxMenu;
+
//
filter_menu->Append (PJMENU_ARTIFACT_REDUCTION, "&Artifact Reduction");
wxMenu* analyze_menu = new wxMenu;
analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, "&Plot Histogram");
wxMenu* analyze_menu = new wxMenu;
analyze_menu->Append (PJMENU_PLOT_HISTOGRAM, "&Plot Histogram");
@@
-3055,7
+3059,7
@@
ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view)
menu_bar->Append (m_pFileMenu, "&File");
menu_bar->Append (convert_menu, "&Convert");
menu_bar->Append (m_pFileMenu, "&File");
menu_bar->Append (convert_menu, "&Convert");
- menu_bar->Append (filter_menu, "Fi<er");
+
//
menu_bar->Append (filter_menu, "Fi<er");
menu_bar->Append (analyze_menu, "&Analyze");
menu_bar->Append (reconstruct_menu, "&Reconstruct");
menu_bar->Append (help_menu, "&Help");
menu_bar->Append (analyze_menu, "&Analyze");
menu_bar->Append (reconstruct_menu, "&Reconstruct");
menu_bar->Append (help_menu, "&Help");