X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fdialogs.h;h=6dcc2988cd5f5379114f045b8a741b67d64708e4;hb=711cae0ee02e046370fdb4d6c6f440596ff71980;hp=6d4d94fef52f9908d364e20b6f25c6d003e7f13b;hpb=ab4a3ba2c1ba9672136b5022897f81fc55d03493;p=ctsim.git diff --git a/src/dialogs.h b/src/dialogs.h index 6d4d94f..6dcc298 100644 --- a/src/dialogs.h +++ b/src/dialogs.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: dialogs.h,v 1.4 2000/07/19 04:33:27 kevin Exp $ +** $Id: dialogs.h,v 1.8 2000/07/28 08:28:08 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 @@ -31,18 +31,37 @@ #include "wx/wx.h" #include +#include "scanner.h" +#include "phantom.h" +#include "filter.h" + +// CLASS StringValueAndTitleListBox +// +// A superclass of wxListBox that can handle string values and titles +// and by displaying the title in the list box and returning the string value + +class StringValueAndTitleListBox : public wxListBox +{ + public: + StringValueAndTitleListBox (wxDialog* pParent, int nChoices, const char* aszTitle[], const char* aszValue[]); + + const char* getSelectionStringValue (void) const; + + private: + const char** m_ppszValues; +}; + class DialogGetPhantom : public wxDialog { public: - DialogGetPhantom (wxFrame* pParent, const char* szDefaultPhantom); + DialogGetPhantom (wxFrame* pParent, int iDefaultPhantom = Phantom::PHM_HERMAN); virtual ~DialogGetPhantom (void) {} - string getPhantom (void); + const char* getPhantom (void); private: - wxListBox* m_pListBoxPhantom; - string m_sDefaultPhantom; + StringValueAndTitleListBox* m_pListBoxPhantom; }; @@ -89,70 +108,64 @@ class DialogGetRasterParameters : public wxDialog class DialogGetProjectionParameters : public wxDialog { public: - DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., const char* szDefaultGeometry = NULL); + DialogGetProjectionParameters (wxFrame* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL); ~DialogGetProjectionParameters (void); unsigned int getNDet (void); unsigned int getNView (void); unsigned int getNSamples (void); double getRotAngle (void); - const string& getGeometry(void); + const char* getGeometry(void); private: wxTextCtrl* m_pTextCtrlNDet; wxTextCtrl* m_pTextCtrlNView; wxTextCtrl* m_pTextCtrlNSamples; wxTextCtrl* m_pTextCtrlRotAngle; - wxTextCtrl* m_pTextCtrlGeometry; + + StringValueAndTitleListBox* m_pListBoxGeometry; int m_iDefaultNDet; int m_iDefaultNView; int m_iDefaultNSamples; double m_dDefaultRotAngle; - string m_sDefaultGeometry; }; +#include "backprojectors.h" class DialogGetReconstructionParameters : public wxDialog { public: - 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); + DialogGetReconstructionParameters (wxFrame* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = SignalFilter::FILTER_METHOD_CONVOLUTION, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3); virtual ~DialogGetReconstructionParameters (void); unsigned int getXSize(void); unsigned int getYSize(void); - const string& getFilterName(void); + const char* getFilterName(void); double getFilterParam(void); - const string& getFilterMethodName(void); + const char* getFilterMethodName(void); unsigned int getZeropad(void); - const string& getInterpName(void); + const char* getInterpName(void); unsigned int getInterpParam(void); - const string& getBackprojName(void); + const char* getBackprojectName(void); private: wxTextCtrl* m_pTextCtrlXSize; wxTextCtrl* m_pTextCtrlYSize; - wxTextCtrl* m_pTextCtrlFilterParam; - wxTextCtrl* m_pTextCtrlFilterMethodName; wxTextCtrl* m_pTextCtrlZeropad; - wxTextCtrl* m_pTextCtrlInterpName; + wxTextCtrl* m_pTextCtrlFilterParam; wxTextCtrl* m_pTextCtrlInterpParam; - wxTextCtrl* m_pTextCtrlBackprojName; - wxListBox* m_pListBoxFilter; - wxListBox* m_pListBoxFilterMethod; - wxListBox* m_pListBoxInterp; - wxListBox* m_pListBoxBackproj; + StringValueAndTitleListBox* m_pListBoxFilter; + StringValueAndTitleListBox* m_pListBoxFilterMethod; + StringValueAndTitleListBox* m_pListBoxInterp; + StringValueAndTitleListBox* m_pListBoxBackproject; int m_iDefaultXSize; int m_iDefaultYSize; - string m_sDefaultFilterName; double m_dDefaultFilterParam; - string m_sDefaultFilterMethodName; int m_iDefaultZeropad; - string m_sDefaultInterpName; int m_iDefaultInterpParam; - string m_sDefaultBackprojName; }; #endif