X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=eab097cfd309837d8e384946272ba44dd4001294;hb=ec73e3f9aa11aea5ba6a4255489fdca63d2b4990;hp=72ed48dd8a4f2fd3abfb758aee970ac39adc8d8c;hpb=e69a48c43eb11e0a6ffcf7f5edf28a1f10672d12;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index 72ed48d..eab097c 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.56 2001/01/08 02:02:18 kevin Exp $ +** $Id: views.cpp,v 1.64 2001/01/17 11:00:18 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 @@ -765,11 +765,12 @@ wxFrame* ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxMDIChildFrame *subframe = new wxMDIChildFrame(theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxMDIChildFrame *subframe = new wxMDIChildFrame (theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); #endif - + theApp->setIconForFrame (subframe); + wxMenu *file_menu = new wxMenu; file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom..."); @@ -839,6 +840,7 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) analyze_menu->Append (IFMENU_COMPARE_COL, "Compare &Column"); wxMenu *help_menu = new wxMenu; + help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); wxMenuBar *menu_bar = new wxMenuBar; @@ -1467,7 +1469,7 @@ ImageFileView::OnCompareCol (wxCommandEvent& event) s += rIF.labelGet(iL).getLabelString(); rPlotFile.addDescription (s.c_str()); } - for (iL = 0; iL < rIF.nLabels(); iL++) { + for (iL = 0; iL < rCompareIF.nLabels(); iL++) { std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str(); s += ": "; s += rCompareIF.labelGet(iL).getLabelString(); @@ -1557,7 +1559,7 @@ ImageFileView::OnCompareRow (wxCommandEvent& event) s += rIF.labelGet(iL).getLabelString(); rPlotFile.addDescription (s.c_str()); } - for (iL = 0; iL < rIF.nLabels(); iL++) { + for (iL = 0; iL < rCompareIF.nLabels(); iL++) { std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str(); s += ": "; s += rCompareIF.labelGet(iL).getLabelString(); @@ -1626,12 +1628,12 @@ ImageFileView::OnPlotHistogram (wxCommandEvent& event) rPlotFile.addColumn (0, pX); rPlotFile.addColumn (1, pY); for (unsigned int iL = 0; iL < rIF.nLabels(); iL++) { - std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle(); + std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str(); s += ": "; s += rIF.labelGet(iL).getLabelString(); rPlotFile.addDescription (s.c_str()); } - os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle(); + os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str(); *theApp->getLog() << os.str().c_str() << "\n"; rPlotFile.addDescription (os.str().c_str()); delete pX; @@ -1868,6 +1870,7 @@ PhantomView::CreateChildFrame(wxDocument *doc, wxView *view) #else wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(10, 10), wxSize(256, 256), wxDEFAULT_FRAME_STYLE); #endif + theApp->setIconForFrame (subframe); wxMenu *file_menu = new wxMenu; @@ -1890,7 +1893,7 @@ PhantomView::CreateChildFrame(wxDocument *doc, wxView *view) process_menu->Append(PHMMENU_PROCESS_PROJECTIONS, "&Projections..."); wxMenu *help_menu = new wxMenu; - help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); + help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); wxMenuBar *menu_bar = new wxMenuBar; @@ -2147,11 +2150,6 @@ ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) const Projections& rProj = GetDocument()->getProjections(); imageFile.setArraySize (m_iDefaultNX, m_iDefaultNY); - if (m_iDefaultFilterMethod != ProcessSignal::FILTER_METHOD_CONVOLUTION && m_iDefaultFilterGeneration == ProcessSignal::FILTER_GENERATION_DIRECT && rProj.geometry() != Scanner::GEOMETRY_PARALLEL) { - wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with direct filter generation is not support for geometries other than parallel.\nAborting command.", "Not Supported", wxOK | wxICON_WARNING, m_frame); - return; - } - Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, 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; @@ -2228,6 +2226,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) #else wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); #endif + theApp->setIconForFrame (subframe); wxMenu *file_menu = new wxMenu; @@ -2255,8 +2254,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) reconstruct_menu->Append (PJMENU_RECONSTRUCT_FOURIER, "&Fourier..."); wxMenu *help_menu = new wxMenu; - help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); - help_menu->AppendSeparator(); + help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); wxMenuBar *menu_bar = new wxMenuBar; @@ -2516,6 +2514,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view) #else wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(10, 10), wxSize(500, 300), wxDEFAULT_FRAME_STYLE); #endif + theApp->setIconForFrame (subframe); wxMenu *file_menu = new wxMenu; @@ -2540,8 +2539,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view) view_menu->Append(PLOTMENU_VIEW_SCALE_FULL, "Display &Full Scale"); wxMenu *help_menu = new wxMenu; - help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); - help_menu->AppendSeparator(); + help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics"); help_menu->Append(MAINMENU_HELP_ABOUT, "&About"); wxMenuBar *menu_bar = new wxMenuBar;