X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=f7d8a1f1407469442860b4d9657c150f6fa68563;hb=0eb095f799dd4222e6eb9b1db9e8c6f2831a1540;hp=42de3a170448f107f23076d14e6d84e46a538333;hpb=7a4e7e832456894448ee6676e239d6ccfd2e7eaf;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index 42de3a1..f7d8a1f 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.48 2001/01/02 13:57:30 kevin Exp $ +** $Id: views.cpp,v 1.50 2001/01/03 22:00:46 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 @@ -1593,7 +1593,9 @@ IMPLEMENT_DYNAMIC_CLASS(ProjectionFileView, wxView) BEGIN_EVENT_TABLE(ProjectionFileView, wxView) EVT_MENU(PJMENU_FILE_PROPERTIES, ProjectionFileView::OnProperties) -EVT_MENU(PJMENU_PROCESS_RECONSTRUCT, ProjectionFileView::OnReconstruct) +EVT_MENU(PJMENU_RECONSTRUCT_FBP, ProjectionFileView::OnReconstructFBP) +EVT_MENU(PJMENU_CONVERT_POLAR, ProjectionFileView::OnConvertPolar) +EVT_MENU(PJMENU_CONVERT_FFT_POLAR, ProjectionFileView::OnConvertFFTPolar) END_EVENT_TABLE() ProjectionFileView::ProjectionFileView(void) @@ -1634,7 +1636,35 @@ ProjectionFileView::OnProperties (wxCommandEvent& event) void -ProjectionFileView::OnReconstruct (wxCommandEvent& event) +ProjectionFileView::OnConvertPolar (wxCommandEvent& event) +{ + Projections& rProj = GetDocument()->getProjections(); +} + +void +ProjectionFileView::OnConvertFFTPolar (wxCommandEvent& event) +{ + Projections& rProj = GetDocument()->getProjections(); + wxMessageBox ("Polar conversion not yet implemented", "Unimplemented function"); +#if 0 + rProj.convertPolar (); + if (theApp->getSetModifyNewDocs()) + GetDocument()->Modify(true); + GetDocument()->UpdateAllViews(); +#ifndef HAVE_FFT + wxMessageBox ("FFT support has not been compiled into this version of CTSim", "Error"); +#endif +#endif +} + +void +ProjectionFileView::OnReconstructFourier (wxCommandEvent& event) +{ + wxMessageBox ("Fourier Reconstruction is not yet supported", "Unimplemented function"); +} + +void +ProjectionFileView::OnReconstructFBP (wxCommandEvent& event) { DialogGetReconstructionParameters dialogReconstruction (m_frame, m_iDefaultNX, m_iDefaultNY, m_iDefaultFilter, m_dDefaultFilterParam, m_iDefaultFilterMethod, m_iDefaultFilterGeneration, m_iDefaultZeropad, m_iDefaultInterpolation, m_iDefaultInterpParam, m_iDefaultBackprojector, m_iDefaultTrace); @@ -1761,9 +1791,14 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) file_menu->Append(wxID_PRINT_SETUP, "Print &Setup..."); file_menu->Append(wxID_PREVIEW, "Print Pre&view"); - wxMenu *process_menu = new wxMenu; - process_menu->Append(PJMENU_PROCESS_RECONSTRUCT, "R&econstruct..."); + wxMenu *convert_menu = new wxMenu; + convert_menu->Append (PJMENU_CONVERT_POLAR, "&Polar Image..."); + convert_menu->Append (PJMENU_CONVERT_FFT_POLAR, "&FFT->Polar Image..."); + wxMenu *reconstruct_menu = new wxMenu; + reconstruct_menu->Append (PJMENU_RECONSTRUCT_FBP, "&Filtered Backprojection..."); + reconstruct_menu->Append (PJMENU_RECONSTRUCT_FOURIER, "&Fourier..."); + wxMenu *help_menu = new wxMenu; help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents"); help_menu->AppendSeparator(); @@ -1771,9 +1806,10 @@ ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) wxMenuBar *menu_bar = new wxMenuBar; - menu_bar->Append(file_menu, "&File"); - menu_bar->Append(process_menu, "&Process"); - menu_bar->Append(help_menu, "&Help"); + menu_bar->Append (file_menu, "&File"); + menu_bar->Append (convert_menu, "&Convert"); + menu_bar->Append (reconstruct_menu, "&Reconstruct"); + menu_bar->Append (help_menu, "&Help"); subframe->SetMenuBar(menu_bar); @@ -1916,6 +1952,8 @@ END_EVENT_TABLE() PlotFileView::PlotFileView(void) : wxView(), m_canvas(NULL), m_frame(NULL), m_pEZPlot(NULL) { + m_bMinSpecified = false; + m_bMaxSpecified = false; } PlotFileView::~PlotFileView(void)