r155: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 19 Jul 2000 04:33:27 +0000 (04:33 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 19 Jul 2000 04:33:27 +0000 (04:33 +0000)
ChangeLog
include/backprojectors.h
include/filter.h
include/phantom.h
src/ctsim.cpp
src/dialogs.cpp
src/dialogs.h
src/docs.h
src/views.cpp

index f13e24e3ce94927c845b06acc86550160771a64a..bc6b5ffd0e62037f2c7a5f8e885ed09fda356676 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2.0.0-b6 - 7/19/00
-   ctsim program: improved initial size and scroll area for image and projection files
-   ctsim program: added rasterization dialog
+   ctsim program: improved initial size and scroll area for image 
+       and projection files
+   ctsim program: added rasterization parameters, projections parameters,
+       and reconstruction parameters dialogs
        
 2.0.0-b5 - 7/17/00
    ctsim program: Added dialog to set minimum/maximum display levels 
index 297d8d156f36fce31c101415027716bf2e631cb3..f19b9043ecd0a1fcafd5e0ce2a404e46cebd54fb 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: backprojectors.h,v 1.9 2000/07/13 07:03:21 kevin Exp $
+**  $Id: backprojectors.h,v 1.10 2000/07/19 04:33:27 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
 ******************************************************************************/
 
 
+#ifndef __BACKPROJECTORS_H
+#define __BACKPROJECTORS_H
+
 #undef HAVE_BSPLINE_INTERP
 
+#include "imagefile.h"
+
+
 class Backproject;
 
 class Backprojector
@@ -202,3 +208,4 @@ class BackprojectIntDiff3 : public BackprojectDiff
 };
 
 
+#endif
index 4a25b5bcd6eee6a91eca50a4407dcf33af30cb1b..6ad776792158c2f4d6d7604268a39f2baa4a67fd 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: filter.h,v 1.13 2000/07/11 10:32:44 kevin Exp $
+**  $Id: filter.h,v 1.14 2000/07/19 04:33:27 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
 #define FILTER_H
 
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_FFTW
+#include <fftw.h>
+#include <rfftw.h>
+#endif
+
+#include <complex>
+
+
 class SignalFilter {
  public:
 
index 489c4eee98a6812c8da1f774d7f2d52c14932d00..dbaf169fc430d46ba8d7f09b12c773d112607505 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: phantom.h,v 1.7 2000/07/18 03:14:35 kevin Exp $
+**  $Id: phantom.h,v 1.8 2000/07/19 04:33:27 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
@@ -140,6 +140,12 @@ class Phantom
     static const char PHM_BROWLAND_STR[]=  "browland";
     static const char PHM_UNITPULSE_STR[]= "unitpulse";
 
+    static const char PHM_HERMAN_TITLE_STR[]=    "Herman Head";
+    static const char PHM_BHERMAN_TITLE_STR[]=   "Herman Head Bordered";
+    static const char PHM_ROWLAND_TITLE_STR[]=   "Rowland Head";
+    static const char PHM_BROWLAND_TITLE_STR[]=  "Rowland Head Bordered";
+    static const char PHM_UNITPULSE_TITLE_STR[]= "Unit Pulse";
+
     Phantom (void);
     Phantom (const char* const phmName);
 
index c7db0f0501a1ba70c9091d1828646c91d1dfd50b..a7417fed387b43cacbd41db94961e760e36d5e81 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.5 2000/07/15 08:36:13 kevin Exp $
+**  $Id: ctsim.cpp,v 1.6 2000/07/19 04:33:27 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
 #endif
 
 #include "wx/docview.h"
-#include "ct.h"
 #include "ctsim.h"
 #include "docs.h"
 #include "views.h"
+#include "dialogs.h"
+#include "ctsupport.h"
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+#if defined(HAVE_GETOPT_H) || defined(HAVE_GETOPT_LONG)
+#include <getopt.h>
+#endif
+
 
 class CTSimApp* theApp = NULL;
 
@@ -188,26 +196,14 @@ MainFrame::OnAbout(wxCommandEvent& WXUNUSED(event) )
 void 
 MainFrame::OnCreatePhantom(wxCommandEvent& WXUNUSED(event))
 {
-    wxString choiceStringList [5];
-    choiceStringList[0] = Phantom::PHM_HERMAN_STR;
-    choiceStringList[1] = Phantom::PHM_BHERMAN_STR;
-    choiceStringList[2] = Phantom::PHM_ROWLAND_STR;;
-    choiceStringList[3] = Phantom::PHM_BROWLAND_STR;
-    choiceStringList[4] = Phantom::PHM_UNITPULSE_STR;
-    wxString choiceTitleList [5];
-    choiceTitleList[0] = "Herman Head";
-    choiceTitleList[1] = "Herman Head Bordered";
-    choiceTitleList[2] = "Rowland Head";
-    choiceTitleList[3] = "Rowland Head Bordered";
-    choiceTitleList[4] = "Unit Pulse";
-    wxSingleChoiceDialog dialog (this, "Select phantom", "Phantom Selection", 5, choiceTitleList, NULL, wxOK|wxCANCEL|wxCENTRE);
-
-    int dialogReturn = dialog.ShowModal();
+    DialogGetPhantom dialogPhantom (this, Phantom::PHM_HERMAN_STR);
+    int dialogReturn = dialogPhantom.ShowModal();
     if (dialogReturn == wxID_OK) {
-       int selection = dialog.GetSelection();
-       *theApp->getLog() << "Selected phantom " << selection << "\n";
-       wxString filename = choiceStringList[selection] + ".phm";
-       theApp->getDocManager()->CreateDocument(filename, wxDOC_SILENT);
+      string selection = dialogPhantom.getPhantom();
+      *theApp->getLog() << "Selected phantom " << selection.c_str() << "\n";
+      wxString filename = selection.c_str();
+      filename += ".phm";
+      theApp->getDocManager()->CreateDocument(filename, wxDOC_SILENT);
     }
     
 }
index 4b37f4b31c2f90bdbbb091dde5d5b92cba4b440d..b084fd4c4fba2c7716c84a807cdea58d13ef78ff 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.cpp,v 1.2 2000/07/18 14:51:06 kevin Exp $
+**  $Id: dialogs.cpp,v 1.3 2000/07/19 04:33:27 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
 #include <sstream>
 #include "ctsupport.h"
 #include "scanner.h"
+#include "phantom.h"
+#include "filter.h"
+#include "backprojectors.h"
+
+
+DialogGetPhantom::DialogGetPhantom (wxFrame* pParent, const char* szDefaultPhantom = NULL)
+    : wxDialog (pParent, -1, "Select Phantom", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+    m_sDefaultPhantom = szDefaultPhantom;
+
+  wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+  pTopSizer->Add (new wxStaticText (this, -1, "Select Phantom"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
+                  
+  pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+  wxString aListPhantomTitle [5];
+  aListPhantomTitle[0] = Phantom::PHM_HERMAN_TITLE_STR;
+  aListPhantomTitle[1] = Phantom::PHM_BHERMAN_TITLE_STR;
+  aListPhantomTitle[2] = Phantom::PHM_ROWLAND_TITLE_STR;
+  aListPhantomTitle[3] = Phantom::PHM_BROWLAND_TITLE_STR;
+  aListPhantomTitle[4] = Phantom::PHM_UNITPULSE_TITLE_STR;
+  m_pListBoxPhantom = new wxListBox (this, -1, wxDefaultPosition, wxDefaultSize, 5, aListPhantomTitle, wxLB_SINGLE | wxLB_NEEDED_SB);
+  pTopSizer->Add (m_pListBoxPhantom, 0, wxALL | wxALIGN_CENTER | wxEXPAND);
+
+  pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+  wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
+  pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+  pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+
+  pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+
+  SetAutoLayout (true);
+  SetSizer (pTopSizer);
+  pTopSizer->Fit (this);
+  pTopSizer->SetSizeHints (this);
+}
+
+string
+DialogGetPhantom::getPhantom(void)
+{
+    string aListPhantom [5];
+    aListPhantom[0] = Phantom::PHM_HERMAN_STR;
+    aListPhantom[1] = Phantom::PHM_BHERMAN_STR;
+    aListPhantom[2] = Phantom::PHM_ROWLAND_STR;;
+    aListPhantom[3] = Phantom::PHM_BROWLAND_STR;
+    aListPhantom[4] = Phantom::PHM_UNITPULSE_STR;
+
+    int selection = m_pListBoxPhantom->GetSelection();
+    if (selection >= 0)
+       return (aListPhantom[selection]);
+
+    return (m_sDefaultPhantom);
+}
+
 
 DialogGetImageMinMax::DialogGetImageMinMax (wxFrame* pParent, const ImageFile& rImagefile, double dDefaultMin = 0., double dDefaultMax = 0.)
     : wxDialog (pParent, -1, "Set Image Display Minimum & Maximum", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
@@ -215,7 +273,7 @@ DialogGetRasterParameters::getNSamples (void)
 /////////////////////////////////////////////////////////////////////
 // CLASS IDENTIFICATION
 //
-// DialogGetProjectionsParameters
+// DialogGetProjectionParameters
 /////////////////////////////////////////////////////////////////////
 
 DialogGetProjectionParameters::DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., const char* szDefaultGeometry = NULL)
@@ -323,3 +381,164 @@ DialogGetProjectionParameters::getGeometry (void)
 {
   return m_sDefaultGeometry;
 }
+
+
+
+/////////////////////////////////////////////////////////////////////
+// CLASS IDENTIFICATION
+//
+// DialogGetReconstructionParameters
+/////////////////////////////////////////////////////////////////////
+
+DialogGetReconstructionParameters::DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, const char* szDefaultFilterName = NULL, double dDefaultFilterParam = 1.,  const char* szDefaultFilterMethodName = NULL, int iDefaultZeropad = 3, const char* szDefaultInterpName = NULL, int iDefaultInterpParam = 1, const char* szDefaultBackprojName = NULL)
+    : wxDialog (pParent, -1, "Set Reconstruction Parameters", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION)
+{
+  wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL);
+
+  pTopSizer->Add (new wxStaticText (this, -1, "Set Reconstruction Parameters"), 0, wxALIGN_CENTER | wxTOP | wxLEFT | wxRIGHT, 5);
+                  
+  pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+  ostringstream os;
+  os << iDefaultXSize;
+  m_pTextCtrlXSize = new wxTextCtrl (this, -1, os.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  ostringstream osYSize;
+  osYSize << iDefaultYSize;
+  m_pTextCtrlYSize = new wxTextCtrl (this, -1, osYSize.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  ostringstream osFilterParam;
+  osFilterParam << dDefaultFilterParam;
+  m_pTextCtrlFilterParam = new wxTextCtrl (this, -1, osFilterParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  ostringstream osZeropad;
+  osZeropad << iDefaultZeropad;
+  m_pTextCtrlZeropad = new wxTextCtrl (this, -1, osZeropad.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+  ostringstream osInterpParam;
+  osInterpParam << iDefaultInterpParam;
+  m_pTextCtrlInterpParam = new wxTextCtrl (this, -1, osInterpParam.str().c_str(), wxDefaultPosition, wxSize(100, 25), 0);
+
+  wxGridSizer *pGridSizer = new wxGridSizer (2, 5, 5);
+  pGridSizer->Add (new wxStaticText (this, -1, "X Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlXSize, 0, wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (new wxStaticText (this, -1, "Y Size"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlYSize, 0, wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (new wxStaticText (this, -1, "Filter Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlFilterParam, 0, wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (new wxStaticText (this, -1, "Zeropad"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlZeropad, 0, wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (new wxStaticText (this, -1, "Interpolation Parameter"), 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+  pGridSizer->Add (m_pTextCtrlInterpParam, 0, wxALIGN_CENTER_VERTICAL);
+  pTopSizer->Add (pGridSizer, 1, wxALL, 10);
+
+  wxString aTitlesFilter[4];
+  aTitlesFilter[0] = "Abs * Bandlimit";
+  aTitlesFilter[1] = "Abs * Hamming";
+  aTitlesFilter[2] = "Abs * Hanning";
+  aTitlesFilter[3] = "Abs * Cosine";
+
+  m_pListBoxFilter = new wxListBox (this, -1, wxDefaultPosition, wxSize(-1,-1), 4, aTitlesFilter, wxLB_SINGLE | wxLB_NEEDED_SB);
+  pTopSizer->Add (m_pListBoxFilter);
+
+  m_sDefaultFilterName = szDefaultFilterName;
+  m_sDefaultFilterMethodName = szDefaultFilterMethodName;
+  m_sDefaultInterpName = szDefaultInterpName;
+  m_sDefaultBackprojName = szDefaultBackprojName;
+
+  pTopSizer->Add (new wxStaticLine (this, -1, wxDefaultPosition, wxSize(3,3), wxHORIZONTAL), 0, wxEXPAND | wxALL, 5);
+
+  wxBoxSizer* pButtonSizer = new wxBoxSizer (wxHORIZONTAL);
+  wxButton* pButtonOk = new wxButton (this, wxID_OK, "Okay");
+  wxButton* pButtonCancel = new wxButton (this, wxID_CANCEL, "Cancel");
+  pButtonSizer->Add (pButtonOk, 0, wxEXPAND | wxALL, 10);
+  pButtonSizer->Add (pButtonCancel, 0, wxEXPAND | wxALL, 10);
+
+  pTopSizer->Add (pButtonSizer, 0, wxALIGN_CENTER);
+
+  SetAutoLayout (true);
+  SetSizer (pTopSizer);
+  pTopSizer->Fit (this);
+  pTopSizer->SetSizeHints (this);
+}
+
+DialogGetReconstructionParameters::~DialogGetReconstructionParameters (void)
+{
+}
+
+
+unsigned int
+DialogGetReconstructionParameters::getXSize (void)
+{
+    wxString strCtrl = m_pTextCtrlXSize->GetValue();
+    unsigned long lValue;
+    if (strCtrl.ToULong (&lValue))
+       return lValue;
+    else
+       return (m_iDefaultXSize);
+}
+
+unsigned int
+DialogGetReconstructionParameters::getYSize (void)
+{
+    wxString strCtrl = m_pTextCtrlYSize->GetValue();
+    unsigned long lValue;
+    if (strCtrl.ToULong (&lValue))
+       return lValue;
+    else
+       return (m_iDefaultYSize);
+}
+
+unsigned int
+DialogGetReconstructionParameters::getZeropad (void)
+{
+    wxString strCtrl = m_pTextCtrlZeropad->GetValue();
+    unsigned long lValue;
+    if (strCtrl.ToULong (&lValue))
+       return lValue;
+    else
+       return (m_iDefaultZeropad);
+}
+
+
+unsigned int
+DialogGetReconstructionParameters::getInterpParam (void)
+{
+    wxString strCtrl = m_pTextCtrlInterpParam->GetValue();
+    unsigned long lValue;
+    if (strCtrl.ToULong (&lValue))
+       return lValue;
+    else
+       return (m_iDefaultInterpParam);
+}
+
+double
+DialogGetReconstructionParameters::getFilterParam (void)
+{
+    wxString strCtrl = m_pTextCtrlFilterParam->GetValue();
+    double dValue;
+    if (strCtrl.ToDouble (&dValue))
+       return (dValue);
+    else
+      return (m_dDefaultFilterParam);
+}
+
+const string&
+DialogGetReconstructionParameters::getFilterName (void)
+{
+  return m_sDefaultFilterName;
+}
+
+const string&
+DialogGetReconstructionParameters::getFilterMethodName (void)
+{
+  return m_sDefaultFilterMethodName;
+}
+
+const string&
+DialogGetReconstructionParameters::getInterpName (void)
+{
+  return m_sDefaultInterpName;
+}
+
+const string&
+DialogGetReconstructionParameters::getBackprojName (void)
+{
+  return m_sDefaultBackprojName;
+}
index efdc3fac207bf3965f22aaa6c04999300906fa7a..6d4d94fef52f9908d364e20b6f25c6d003e7f13b 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: dialogs.h,v 1.3 2000/07/18 16:20:53 kevin Exp $
+**  $Id: dialogs.h,v 1.4 2000/07/19 04:33:27 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
 #include "wx/wx.h"
 #include <string>
 
+class DialogGetPhantom : public wxDialog
+{
+ public:
+    DialogGetPhantom (wxFrame* pParent, const char* szDefaultPhantom);
+    virtual ~DialogGetPhantom (void) {}
+
+    string getPhantom (void);
+
+ private:
+    wxListBox* m_pListBoxPhantom;
+    string m_sDefaultPhantom;
+};
+
+
 class ImageFile;
 class DialogGetImageMinMax : public wxDialog
 {
@@ -118,7 +132,6 @@ class DialogGetReconstructionParameters : public wxDialog
  private:
     wxTextCtrl* m_pTextCtrlXSize;
     wxTextCtrl* m_pTextCtrlYSize;
-    wxTextCtrl* m_pTextCtrlFilterName;
     wxTextCtrl* m_pTextCtrlFilterParam;
     wxTextCtrl* m_pTextCtrlFilterMethodName;
     wxTextCtrl* m_pTextCtrlZeropad;
@@ -126,15 +139,20 @@ class DialogGetReconstructionParameters : public wxDialog
     wxTextCtrl* m_pTextCtrlInterpParam;
     wxTextCtrl* m_pTextCtrlBackprojName;
 
+    wxListBox* m_pListBoxFilter;
+    wxListBox* m_pListBoxFilterMethod;
+    wxListBox* m_pListBoxInterp;
+    wxListBox* m_pListBoxBackproj;
+
     int m_iDefaultXSize;
     int m_iDefaultYSize;
     string m_sDefaultFilterName;
     double m_dDefaultFilterParam;
     string m_sDefaultFilterMethodName;
     int m_iDefaultZeropad;
-    string m_sInterpName;
+    string m_sDefaultInterpName;
     int m_iDefaultInterpParam;
-    string m_sBackprojName;
+    string m_sDefaultBackprojName;
 };
 
 #endif
index bf69f06d95a6d09b07f7f21359228a5335519c0e..b56ebe5442cbb5cd66d5f6d6ef3b9e47aaacf7b4 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: docs.h,v 1.2 2000/07/15 08:36:13 kevin Exp $
+**  $Id: docs.h,v 1.3 2000/07/19 04:33:27 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
@@ -33,7 +33,9 @@
 #define __DOCSH__
 
 #include "wx/docview.h"
+
 #include "imagefile.h"
+#include "phantom.h"
 #include "projections.h"
 
 
index 9939b1f07873030923f0441fee3709d590d09190..9f9713ec0bc816c574594cf9102078f5994e4830 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.5 2000/07/18 16:20:53 kevin Exp $
+**  $Id: views.cpp,v 1.6 2000/07/19 04:33:27 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
@@ -52,6 +52,7 @@
 #include "views.h"
 #include "dialogs.h"
 #include <sstream>
+#include "backprojectors.h"
 
 // ImageFileCanvas
 
@@ -606,27 +607,30 @@ ProjectionFileView::OnProperties (wxCommandEvent& event)
 void
 ProjectionFileView::OnReconstruct (wxCommandEvent& event)
 {
-  int xSize, ySize;
-  xSize = 256;
-  ySize = 256;
-  const char* optFilterName = "abs_bandlimit";
-  double optFilterParam = 1.;
-  const char*optFilterMethodName = "convolution";
-  int optZeropad = 3;
-  const char* optInterpName = "linear";
-  int optInterpParam = 1;
-  const char* optBackprojectName = "idiff3";
-  if (xSize > 0 && ySize > 0) {
-    ImageFileDocument* pReconDoc = dynamic_cast<ImageFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.if", wxDOC_SILENT));
-    ImageFile& imageFile = pReconDoc->getImageFile();
-    const Projections& rProj = GetDocument()->getProjections();
-    imageFile.setArraySize (xSize, ySize);
-    rProj.reconstruct (imageFile, optFilterName, optFilterParam, optFilterMethodName, optZeropad, optInterpName, optInterpParam, optBackprojectName, TRACE_NONE);
-    pReconDoc->Modify(true);
-    pReconDoc->UpdateAllViews(this);
-    ostringstream os;
-    os << "Reconstruct " << rProj.getFilename() << ": xSize=" << xSize << ", ySize=" << ySize << ", Filter=" << optFilterName << ", FilterParam=" << optFilterParam << ", FilterMethod=" << optFilterMethodName << ", Zeropad=" << optZeropad << ", Interpolation=" << optInterpName << ", InterpolationParam=" << optInterpParam << ", Backprojection=" << optBackprojectName << "\n";
-    *theApp->getLog() << os.str().c_str();
+  DialogGetReconstructionParameters dialogReconstruction (m_frame, 256, 256, SignalFilter::FILTER_ABS_BANDLIMIT_STR, 1., SignalFilter::FILTER_METHOD_CONVOLUTION_STR, 3, Backprojector::INTERP_LINEAR_STR, 1, Backprojector::BPROJ_IDIFF3_STR);
+  int retVal = dialogReconstruction.ShowModal();
+  if (retVal == wxID_OK) {
+    int xSize = dialogReconstruction.getXSize();
+    int ySize = dialogReconstruction.getYSize();
+    string optFilterName = dialogReconstruction.getFilterName();
+    double optFilterParam = dialogReconstruction.getFilterParam();
+    string optFilterMethodName = dialogReconstruction.getFilterMethodName();
+    int optZeropad = dialogReconstruction.getZeropad();
+    string optInterpName = dialogReconstruction.getInterpName();
+    int optInterpParam = dialogReconstruction.getInterpParam();
+    string optBackprojectName = dialogReconstruction.getBackprojName();
+    if (xSize > 0 && ySize > 0) {
+      ImageFileDocument* pReconDoc = dynamic_cast<ImageFileDocument*>(theApp->getDocManager()->CreateDocument("untitled.if", wxDOC_SILENT));
+      ImageFile& imageFile = pReconDoc->getImageFile();
+      const Projections& rProj = GetDocument()->getProjections();
+      imageFile.setArraySize (xSize, ySize);
+      rProj.reconstruct (imageFile, optFilterName.c_str(), optFilterParam, optFilterMethodName.c_str(), optZeropad, optInterpName.c_str(), optInterpParam, optBackprojectName.c_str(), TRACE_NONE);
+      pReconDoc->Modify(true);
+      pReconDoc->UpdateAllViews(this);
+      ostringstream os;
+      os << "Reconstruct " << rProj.getFilename() << ": xSize=" << xSize << ", ySize=" << ySize << ", Filter=" << optFilterName << ", FilterParam=" << optFilterParam << ", FilterMethod=" << optFilterMethodName << ", Zeropad=" << optZeropad << ", Interpolation=" << optInterpName << ", InterpolationParam=" << optInterpParam << ", Backprojection=" << optBackprojectName << "\n";
+      *theApp->getLog() << os.str().c_str();
+    }
   }
 }