X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fviews.cpp;h=f7d8a1f1407469442860b4d9657c150f6fa68563;hp=8f9b512f8e88aec0eca671f38afc0b3850b9aa4c;hb=0eb095f799dd4222e6eb9b1db9e8c6f2831a1540;hpb=80c08292941c41d5a5863b932262722cb5512ebf diff --git a/src/views.cpp b/src/views.cpp index 8f9b512..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.49 2001/01/02 15:58:18 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);