]> Creatis software - creaContours.git/blob - lib/Interface_Icons_NDimensions/interfToolsPanels.h
#3327 creaContours Feature New Normal - Jump Slice
[creaContours.git] / lib / Interface_Icons_NDimensions / interfToolsPanels.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifndef __interfToolsPanelH__
27 #define __interfToolsPanelH__
28
29 #include <string>
30 #include <wx/wx.h>
31 #include "mBarRange.h"
32 #include <wx/grid.h>
33
34 class interfConfigurationPanel
35         : public wxPanel
36 {
37 public:
38         interfConfigurationPanel(wxWindow * parent);
39         ~interfConfigurationPanel();
40 private:
41         void onWidthOfContour(wxScrollEvent& event);
42         void onBrigthnessColorWindowLevel(wxScrollEvent& event);
43         void OnInterpolation(wxCommandEvent& event);
44         void OnShowTextContour(wxCommandEvent& event);
45         void OnBeforAfterContour(wxCommandEvent& event);
46         void OnBackwareSlice(wxCommandEvent& event);
47         void OnFordwareSlice(wxCommandEvent& event);
48         wxSlider*       _withOfContourLine;
49         wxSlider*       _brithtnessWindowLevel;
50         wxSlider*       _brithtnessColorLevel;
51         wxCheckBox* _interpolationCheckBox;
52         wxCheckBox* _showTextContourCheckBox;
53         wxCheckBox* _beforContourCheckBox;
54         wxCheckBox* _afterContourCheckBox;
55         wxSpinCtrl*     _jumpSpinCtrl;
56         wxSpinCtrl*     _shiftSpinCtrl;
57 };
58
59 class interfSpreadPanel
60         : public wxPanel
61 {
62 public:
63         interfSpreadPanel(wxWindow * parent);
64         ~interfSpreadPanel();
65     void appendStringSpread(std::string val);
66         void setStringSpread(std::string stringtemp);
67 private:
68         wxRadioBox      *_spreadMethodRadiobox;
69         wxStaticText    *_staticTextSpread;
70         wxTextCtrl      *_wxtextctrlSpread;
71         void onSpreadReset(wxCommandEvent& event);
72         void onSpreadAdd(wxCommandEvent& event);
73         void onSpreadAddAll(wxCommandEvent& event);
74         void onSpreadGo(wxCommandEvent& event);
75 };
76
77 class interfInformationPanel
78         : public wxPanel
79 {
80 public:
81         interfInformationPanel(wxWindow * parent);
82         ~interfInformationPanel();
83     void setStringInfoPanel(wxString tmpString);
84         void setRowLabelInfoPanel(int z,wxString tempString);
85         void appendCols(int numcols);
86         int getNumberCols();
87         void setCellValue(int z,int tmpIntA,wxString tempString);
88         void setColLabel(int tmpIntB,wxString tmpTitleString);
89         wxString getCellValue(int j,int i);
90 private:
91         mBarRange*              _mbarrangeRangeInformation;
92         mBarRange*              _mbarrangeSliceInformation;
93         wxGrid*                 _grid;
94         wxRadioBox*     _informationRadiobox;
95         wxRadioBox*     _radiolstboxContourGroup;
96         wxStaticText*   _staticTextInformation;
97         wxCheckBox*     _XYZValues;
98         wxCheckBox*     _contourImage;
99         wxCheckBox*     _statistics;
100         void onInformationContourLabels(wxCommandEvent& event);
101         void onExtractInformation(wxCommandEvent& event);
102         void onShowResultImages(wxCommandEvent& event);
103         void onSaveResults(wxCommandEvent& event);
104         void onContourGroup(wxCommandEvent& event);
105         void FillGridWithContoursInformation();
106         void onRangeSliceInformation(wxCommandEvent& event);
107 };
108
109
110 class interfFlipPanel
111         : public wxPanel
112 {
113 public:
114         interfFlipPanel(wxWindow * parent);             
115         ~interfFlipPanel();
116
117         wxRadioBox *_wichContoursRadioBox;
118
119 private:
120         void onFlipXPressed(wxCommandEvent& event);
121
122         void onFlipYPressed(wxCommandEvent& event);
123
124 };
125
126
127 //CMRU 29-08-09-----------------------------------------------------------------------------------------------
128 /**
129 * This class represents the calibration panel in the interface icons
130 */
131 class interfCalibrationPanel
132         : public wxPanel
133 {
134 public:
135
136         /**
137         * Initialized the panel
138         * @param parent Window who contains the panel
139         */
140         interfCalibrationPanel(wxWindow * parent);
141
142         ~interfCalibrationPanel();
143
144         /**
145         * Manages the event associated with the button of calibration
146         */
147         void onCalibrate(wxCommandEvent& event);
148
149 private:
150
151         /**
152         * Text field of the calibration measure
153         */
154         wxTextCtrl * _size;
155
156         /**
157         * Radio Box with the measurement units
158         */
159         wxRadioBox * _unitsRadiobox;
160 };
161
162 //------------------------------------------------------------------------------------------------------------
163
164 #endif
165
166