X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=203636ef324d08640bcb702f9232c0da066e39a7;hb=71faaba5bf4be59ef81fff71f2f3403a41c90b0f;hp=02ded2091d98324a13ce8b5dd529e74791b1573b;hpb=1f05afcd917bbf8b56a9446e4f937864f09b33f4;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index 02ded20..203636e 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.58 2001/01/12 03:49:07 kevin Exp $ +** $Id: views.cpp,v 1.65 2001/01/17 13:03:24 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,8 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) analyze_menu->Append (IFMENU_COMPARE_COL, "Compare &Column"); 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; @@ -1467,7 +1470,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 +1560,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(); @@ -1868,6 +1871,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; @@ -1891,6 +1895,7 @@ PhantomView::CreateChildFrame(wxDocument *doc, wxView *view) 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; @@ -2009,7 +2014,7 @@ ProjectionFileView::ProjectionFileView(void) m_dDefaultFilterParam = 1.; #if HAVE_FFTW m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_RFFTW; - m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT; + m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVERSE_FOURIER; #else m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_CONVOLUTION; m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT; @@ -2147,13 +2152,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_INVERSE_FOURIER && - rProj.geometry() == Scanner::GEOMETRY_EQUIANGULAR) { - wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with inverse_fourier filter generation is not supported equiangular geometry.\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; @@ -2230,6 +2228,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; @@ -2258,7 +2257,7 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) 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; @@ -2518,6 +2517,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; @@ -2543,7 +2543,7 @@ PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view) 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;