X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fdialogs.h;h=3b76d9504460b2bd5992422a39b6fbf1edd480f3;hp=8bdada08368d8c990afdd59f6bb898742c1330cc;hb=17f20398d8bb0e4b97b5884b999bbe8d58c5254f;hpb=9f29c8b32c972db1178d6f8551d5cd57ceb67083 diff --git a/src/dialogs.h b/src/dialogs.h index 8bdada0..3b76d95 100644 --- a/src/dialogs.h +++ b/src/dialogs.h @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: dialogs.h,v 1.22 2001/01/28 19:10:18 kevin Exp $ +** $Id: dialogs.h,v 1.27 2001/02/16 00:28:41 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 @@ -39,6 +39,15 @@ #include "projections.h" +class CTSimHelpButton : public wxButton +{ +public: + CTSimHelpButton (wxWindow* parent, int id) + : wxButton (parent, id, "Help") + {} +}; + + // CLASS StringValueAndTitleListBox // // A superclass of wxListBox that can handle string values and titles @@ -56,6 +65,18 @@ class StringValueAndTitleListBox : public wxListBox }; +class StringValueAndTitleRadioBox : public wxRadioBox +{ + public: + StringValueAndTitleRadioBox (wxDialog* pParent, const wxString& strTitle, int nChoices, const char* aszTitle[], const char* aszValue[]); + + const char* getSelectionStringValue () const; + + private: + const char** m_ppszValues; +}; + + class DialogGetPhantom : public wxDialog { public: @@ -65,7 +86,7 @@ class DialogGetPhantom : public wxDialog const char* getPhantom (); private: - StringValueAndTitleListBox* m_pListBoxPhantom; + StringValueAndTitleRadioBox* m_pRadioBoxPhantom; }; @@ -88,6 +109,21 @@ class DialogGetComparisonImage : public wxDialog }; +class DialogPreferences : public wxDialog +{ + public: + DialogPreferences (wxWindow* pParent, const char* const pszTitle, bool bAdvanced, bool bAskNewDocs); + virtual ~DialogPreferences (); + + bool getAdvancedOptions (); + bool getAskDeleteNewDocs (); + + private: + wxCheckBox* m_pCBAdvancedOptions; + wxCheckBox* m_pCBAskDeleteNewDocs; +}; + + class ImageFile; class DialogGetMinMax : public wxDialog { @@ -110,28 +146,35 @@ class DialogGetMinMax : public wxDialog class DialogGetRasterParameters : public wxDialog { public: - DialogGetRasterParameters (wxWindow* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultNSamples = 1); + DialogGetRasterParameters (wxWindow* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, + int iDefaultNSamples = 1, double dDefaultViewRatio = 1); virtual ~DialogGetRasterParameters (); unsigned int getXSize (); unsigned int getYSize (); unsigned int getNSamples (); + double getViewRatio(); private: wxTextCtrl* m_pTextCtrlXSize; wxTextCtrl* m_pTextCtrlYSize; wxTextCtrl* m_pTextCtrlNSamples; + wxTextCtrl* m_pTextCtrlViewRatio; int m_iDefaultXSize; int m_iDefaultYSize; int m_iDefaultNSamples; + double m_dDefaultViewRatio; }; class DialogGetProjectionParameters : public wxDialog { public: - DialogGetProjectionParameters (wxWindow* pParent, int iDefaultNDet = 0, int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., double dDefaultFocalLength = 1, double dDefaultFieldOfView = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE); + DialogGetProjectionParameters (wxWindow* pParent, int iDefaultNDet = 0, + int iDefaultNView = 0, int iDefaultNSamples = 1, double dDefaultRotAngle = 1., + double dDefaultFocalLength = 1, double dDefaultViewRatio = 1., + double dDefaultScanRatio = 1., int iDefaultGeometry = Scanner::GEOMETRY_PARALLEL, int iDefaultTrace = Trace::TRACE_NONE); ~DialogGetProjectionParameters (); unsigned int getNDet (); @@ -140,7 +183,8 @@ class DialogGetProjectionParameters : public wxDialog int getTrace (); double getRotAngle (); - double getFieldOfViewRatio (); + double getViewRatio (); + double getScanRatio (); double getFocalLengthRatio (); const char* getGeometry(); @@ -150,10 +194,10 @@ class DialogGetProjectionParameters : public wxDialog wxTextCtrl* m_pTextCtrlNSamples; wxTextCtrl* m_pTextCtrlRotAngle; wxTextCtrl* m_pTextCtrlFocalLength; - wxTextCtrl* m_pTextCtrlFieldOfView; - - StringValueAndTitleListBox* m_pListBoxGeometry; - StringValueAndTitleListBox* m_pListBoxTrace; + wxTextCtrl* m_pTextCtrlViewRatio; + wxTextCtrl* m_pTextCtrlScanRatio; + StringValueAndTitleRadioBox* m_pRadioBoxGeometry; + StringValueAndTitleRadioBox* m_pRadioBoxTrace; int m_iDefaultNDet; int m_iDefaultNView; @@ -162,7 +206,8 @@ class DialogGetProjectionParameters : public wxDialog int m_iDefaultGeometry; double m_dDefaultRotAngle; double m_dDefaultFocalLength; - double m_dDefaultFieldOfView; + double m_dDefaultViewRatio; + double m_dDefaultScanRatio; }; @@ -170,7 +215,13 @@ class DialogGetProjectionParameters : public wxDialog class DialogGetReconstructionParameters : public wxDialog { public: - DialogGetReconstructionParameters (wxWindow* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, int iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVALID, int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF3, int iDefaultTrace = Trace::TRACE_NONE); + DialogGetReconstructionParameters (wxWindow* pParent, int iDefaultXSize = 0, int iDefaultYSize = 0, + int iDefaultFilterID = SignalFilter::FILTER_ABS_BANDLIMIT, double dDefaultFilterParam = 1., + int iDefaultFilterMethodID = ProcessSignal::FILTER_METHOD_CONVOLUTION, + int iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT, + int iDefaultZeropad = 3, int iDefaultInterpID = Backprojector::INTERP_LINEAR, + int iDefaultInterpParam = 1, int iDefaultBackprojectID = Backprojector::BPROJ_IDIFF, + int iDefaultTrace = Trace::TRACE_NONE); virtual ~DialogGetReconstructionParameters (); unsigned int getXSize(); @@ -192,12 +243,12 @@ class DialogGetReconstructionParameters : public wxDialog wxTextCtrl* m_pTextCtrlFilterParam; wxTextCtrl* m_pTextCtrlInterpParam; - StringValueAndTitleListBox* m_pListBoxFilter; - StringValueAndTitleListBox* m_pListBoxFilterMethod; - StringValueAndTitleListBox* m_pListBoxFilterGeneration; - StringValueAndTitleListBox* m_pListBoxInterp; - StringValueAndTitleListBox* m_pListBoxBackproject; - StringValueAndTitleListBox* m_pListBoxTrace; + StringValueAndTitleRadioBox* m_pRadioBoxFilter; + StringValueAndTitleRadioBox* m_pRadioBoxFilterMethod; + StringValueAndTitleRadioBox* m_pRadioBoxFilterGeneration; + StringValueAndTitleRadioBox* m_pRadioBoxInterp; + StringValueAndTitleRadioBox* m_pRadioBoxBackproject; + StringValueAndTitleRadioBox* m_pRadioBoxTrace; int m_iDefaultXSize; int m_iDefaultYSize; @@ -231,8 +282,8 @@ class DialogGetFilterParameters : public wxDialog wxTextCtrl* m_pTextCtrlInputScale; wxTextCtrl* m_pTextCtrlBandwidth; - StringValueAndTitleListBox* m_pListBoxFilter; - StringValueAndTitleListBox* m_pListBoxDomain; + StringValueAndTitleRadioBox* m_pRadioBoxFilter; + StringValueAndTitleRadioBox* m_pRadioBoxDomain; int m_iDefaultXSize; int m_iDefaultYSize; @@ -252,7 +303,7 @@ class DialogExportParameters : public wxDialog const char* getFormatName(); private: - StringValueAndTitleListBox* m_pListBoxFormat; + StringValueAndTitleRadioBox* m_pRadioBoxFormat; }; class DialogAutoScaleParameters : public wxDialog @@ -271,7 +322,7 @@ class DialogAutoScaleParameters : public wxDialog const double m_dStdDev; wxTextCtrl* m_pTextCtrlStdDevFactor; - wxListBox* m_pListBoxCenter; + wxRadioBox* m_pRadioBoxCenter; }; class DialogGetXYSize : public wxDialog @@ -310,7 +361,7 @@ class DialogGetConvertPolarParameters : public wxDialog wxTextCtrl* m_pTextCtrlYSize; wxTextCtrl* m_pTextCtrlZeropad; - StringValueAndTitleListBox* m_pListBoxInterpolation; + StringValueAndTitleRadioBox* m_pRadioBoxInterpolation; int m_iDefaultXSize; int m_iDefaultYSize;