1
///////////////////////////////////////////////////////////////////////////
2
// C++ code generated with wxFormBuilder (version May 4 2010)
3
// http://www.wxformbuilder.org/
5
// PLEASE DO "NOT" EDIT THIS FILE!
6
///////////////////////////////////////////////////////////////////////////
8
#include "wx/ginkgostyle/ginkgostyle.h"
10
#include "reconstructionviews.h"
12
///////////////////////////////////////////////////////////////////////////
14
wxVolumeRenderingBase::wxVolumeRenderingBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
16
this->SetSizeHints( wxSize( 640,500 ), wxDefaultSize );
18
wxBoxSizer* m_pMainSizer;
19
m_pMainSizer = new wxBoxSizer( wxVERTICAL );
21
m_pBarSizer = new wxBoxSizer( wxVERTICAL );
23
m_pMainSizer->Add( m_pBarSizer, 0, wxEXPAND, 5 );
25
wxBoxSizer* m_pVolumeSizer;
26
m_pVolumeSizer = new wxBoxSizer( wxHORIZONTAL );
28
ViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
31
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
34
ViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
36
m_pVolumeSizer->Add( ViewInteractor, 1, wxEXPAND, 5 );
38
m_pToolTitlePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 26,-1 ), wxTAB_TRAVERSAL );
39
m_pToolTitlePanel->SetBackgroundColour( wxColour( 155, 155, 155 ) );
40
m_pToolTitlePanel->Hide();
41
m_pToolTitlePanel->SetMinSize( wxSize( 20,-1 ) );
43
wxBoxSizer* m_pToolTitleSizer;
44
m_pToolTitleSizer = new wxBoxSizer( wxVERTICAL );
46
m_panel26 = new VerticalHeader( m_pToolTitlePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
47
m_panel26->SetToolTip( _("Surface settings") );
49
m_pToolTitleSizer->Add( m_panel26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
51
m_pToolTitlePanel->SetSizer( m_pToolTitleSizer );
52
m_pToolTitlePanel->Layout();
53
m_pVolumeSizer->Add( m_pToolTitlePanel, 0, wxEXPAND, 5 );
55
m_pToolPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
56
wxBoxSizer* m_pToolPanelSizer;
57
m_pToolPanelSizer = new wxBoxSizer( wxVERTICAL );
59
m_pHeaderPanel = new HeaderPanelWithButton( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
60
m_pHeaderPanel->SetToolTip( _("Surface settings") );
62
m_pToolPanelSizer->Add( m_pHeaderPanel, 0, wxEXPAND, 5 );
64
m_pBody = new BodyPanelSinScroll( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
65
wxBoxSizer* m_pBodySizer;
66
m_pBodySizer = new wxBoxSizer( wxVERTICAL );
68
m_pQualityPanel = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
69
m_pQualityPanel->SetToolTip( _("Quality") );
71
wxBoxSizer* m_pQualitySizer;
72
m_pQualitySizer = new wxBoxSizer( wxVERTICAL );
74
m_pSmoothCheckBox = new wxCheckBox( m_pQualityPanel, wxID_ANY, _("Smooth"), wxDefaultPosition, wxDefaultSize, 0 );
75
m_pSmoothCheckBox->SetValue(true);
76
m_pSmoothCheckBox->Hide();
78
m_pQualitySizer->Add( m_pSmoothCheckBox, 0, wxTOP|wxBOTTOM|wxRIGHT, 2 );
81
bSizer27 = new wxBoxSizer( wxHORIZONTAL );
83
m_staticText15 = new wxStaticText( m_pQualityPanel, wxID_ANY, _("Resolution"), wxDefaultPosition, wxDefaultSize, 0 );
84
m_staticText15->Wrap( -1 );
85
m_staticText15->SetToolTip( _("Volume visualization resolution (25-100%)") );
87
bSizer27->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL, 18 );
89
m_pResolutionSlider = new wxSlider( m_pQualityPanel, wxID_ANY, 100, 25, 100, wxDefaultPosition, wxDefaultSize, wxSL_BOTH|wxSL_HORIZONTAL );
90
m_pResolutionSlider->SetToolTip( _("Volume visualization resolution (25-100%)") );
92
bSizer27->Add( m_pResolutionSlider, 1, wxEXPAND, 5 );
94
m_pQualitySizer->Add( bSizer27, 0, wxEXPAND, 5 );
96
m_pQualityPanel->SetSizer( m_pQualitySizer );
97
m_pQualityPanel->Layout();
98
m_pQualitySizer->Fit( m_pQualityPanel );
99
m_pBodySizer->Add( m_pQualityPanel, 0, wxEXPAND, 5 );
101
m_pSep = new SubTitledPanelSeparator( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
102
m_pBodySizer->Add( m_pSep, 0, wxEXPAND, 5 );
104
m_pVolumePanel = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
105
m_pVolumePanel->SetToolTip( _("Surfaces") );
107
wxBoxSizer* m_pVolumePanelSizer;
108
m_pVolumePanelSizer = new wxBoxSizer( wxVERTICAL );
110
wxStaticBoxSizer* m_pVolumePropsSizer;
111
m_pVolumePropsSizer = new wxStaticBoxSizer( new wxStaticBox( m_pVolumePanel, wxID_ANY, _("Volume visualization") ), wxVERTICAL );
113
m_panel25 = new wxPanel( m_pVolumePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
114
wxFlexGridSizer* fgSizer1;
115
fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
116
fgSizer1->SetFlexibleDirection( wxBOTH );
117
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
119
m_pstWindowLevel = new wxStaticText( m_panel25, wxID_ANY, _("Window/Level"), wxDefaultPosition, wxDefaultSize, 0 );
120
m_pstWindowLevel->Wrap( -1 );
121
m_pstWindowLevel->SetToolTip( _("Radiolucency Window/Level") );
123
fgSizer1->Add( m_pstWindowLevel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
125
wxBoxSizer* m_pWLSizer;
126
m_pWLSizer = new wxBoxSizer( wxHORIZONTAL );
128
m_pWindowTextBox = new wxTextCtrl( m_panel25, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 30,-1 ), 0 );
129
m_pWindowTextBox->SetToolTip( _("Radiolucency Level") );
131
m_pWLSizer->Add( m_pWindowTextBox, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
133
m_pstSep = new wxStaticText( m_panel25, wxID_ANY, _("/"), wxDefaultPosition, wxDefaultSize, 0 );
134
m_pstSep->Wrap( -1 );
135
m_pWLSizer->Add( m_pstSep, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
137
m_pLevelTextBox = new wxTextCtrl( m_panel25, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 30,-1 ), 0 );
138
m_pLevelTextBox->SetToolTip( _("Radiolucency Window") );
140
m_pWLSizer->Add( m_pLevelTextBox, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
142
fgSizer1->Add( m_pWLSizer, 1, wxEXPAND, 5 );
144
m_pstBlendMode = new wxStaticText( m_panel25, wxID_ANY, _("Blend Mode"), wxDefaultPosition, wxDefaultSize, 0 );
145
m_pstBlendMode->Wrap( -1 );
146
m_pstBlendMode->SetToolTip( _("Visualization blend type") );
148
fgSizer1->Add( m_pstBlendMode, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
150
m_pBlendModeComboBox = new wxComboBox( m_panel25, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
151
m_pBlendModeComboBox->Append( _("MIP") );
152
m_pBlendModeComboBox->Append( _("Composite Ramp") );
153
m_pBlendModeComboBox->Append( _("Composite Ramp Shaded") );
154
m_pBlendModeComboBox->Append( _("RGB Composite") );
155
m_pBlendModeComboBox->Append( _("CT Skin") );
156
m_pBlendModeComboBox->Append( _("CT Muscle") );
157
m_pBlendModeComboBox->Append( _("CT Bone") );
158
m_pBlendModeComboBox->SetToolTip( _("Visualization blending mode") );
160
fgSizer1->Add( m_pBlendModeComboBox, 1, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
162
m_panel25->SetSizer( fgSizer1 );
164
fgSizer1->Fit( m_panel25 );
165
m_pVolumePropsSizer->Add( m_panel25, 0, wxEXPAND, 25 );
167
m_pVolumePanelSizer->Add( m_pVolumePropsSizer, 0, wxEXPAND, 5 );
169
m_pVolumePanel->SetSizer( m_pVolumePanelSizer );
170
m_pVolumePanel->Layout();
171
m_pVolumePanelSizer->Fit( m_pVolumePanel );
172
m_pBodySizer->Add( m_pVolumePanel, 0, wxEXPAND, 5 );
175
m_pBodySizer->Add( 0, 0, 1, wxEXPAND, 5 );
177
m_pBody->SetSizer( m_pBodySizer );
179
m_pBodySizer->Fit( m_pBody );
180
m_pToolPanelSizer->Add( m_pBody, 1, wxEXPAND, 5 );
182
m_panel27 = new wxPanel( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
183
wxBoxSizer* bSizer32;
184
bSizer32 = new wxBoxSizer( wxVERTICAL );
186
m_pApplyButton = new wxButton( m_panel27, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
187
m_pApplyButton->SetDefault();
188
m_pApplyButton->SetToolTip( _("Apply reconstuction") );
190
bSizer32->Add( m_pApplyButton, 0, wxALL|wxALIGN_RIGHT, 5 );
192
m_panel27->SetSizer( bSizer32 );
194
bSizer32->Fit( m_panel27 );
195
m_pToolPanelSizer->Add( m_panel27, 0, wxEXPAND, 5 );
197
m_pToolPanel->SetSizer( m_pToolPanelSizer );
198
m_pToolPanel->Layout();
199
m_pToolPanelSizer->Fit( m_pToolPanel );
200
m_pVolumeSizer->Add( m_pToolPanel, 0, wxEXPAND, 5 );
202
m_pMainSizer->Add( m_pVolumeSizer, 1, wxEXPAND, 5 );
204
m_pDataSetSelector = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
205
m_pDataSetSelector->Hide();
207
wxBoxSizer* m_pDataSetSizer;
208
m_pDataSetSizer = new wxBoxSizer( wxHORIZONTAL );
210
m_pstDataSet = new wxStaticText( m_pDataSetSelector, wxID_ANY, _("DataSet 0000/0000"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
211
m_pstDataSet->Wrap( -1 );
212
m_pDataSetSizer->Add( m_pstDataSet, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
214
m_pDataSetSlider = new wxSlider( m_pDataSetSelector, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
215
m_pDataSetSlider->SetForegroundColour( wxColour( 64, 64, 64 ) );
217
m_pDataSetSizer->Add( m_pDataSetSlider, 1, wxALIGN_CENTER_VERTICAL, 1 );
219
m_pDataSetSelector->SetSizer( m_pDataSetSizer );
220
m_pDataSetSelector->Layout();
221
m_pDataSetSizer->Fit( m_pDataSetSelector );
222
m_pMainSizer->Add( m_pDataSetSelector, 0, wxEXPAND, 5 );
224
this->SetSizer( m_pMainSizer );
227
this->Centre( wxBOTH );
230
m_panel26->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxVolumeRenderingBase::OnTitleLeftUp ), NULL, this );
231
m_pLevelTextBox->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxVolumeRenderingBase::OnToolSurface1TextChanged ), NULL, this );
232
m_pApplyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxVolumeRenderingBase::OnApplyClick ), NULL, this );
233
m_pDataSetSlider->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxVolumeRenderingBase::OnEraseBackground ), NULL, this );
234
m_pDataSetSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
235
m_pDataSetSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
236
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
237
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
238
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
239
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
240
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
241
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
242
m_pDataSetSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
245
wxVolumeRenderingBase::~wxVolumeRenderingBase()
248
m_panel26->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxVolumeRenderingBase::OnTitleLeftUp ), NULL, this );
249
m_pLevelTextBox->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxVolumeRenderingBase::OnToolSurface1TextChanged ), NULL, this );
250
m_pApplyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxVolumeRenderingBase::OnApplyClick ), NULL, this );
251
m_pDataSetSlider->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxVolumeRenderingBase::OnEraseBackground ), NULL, this );
252
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
253
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
254
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
255
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
256
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
257
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
258
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
259
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
260
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxVolumeRenderingBase::OnTimeInstantChanged ), NULL, this );
264
wxMIPRenderingBase::wxMIPRenderingBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
266
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
268
wxBoxSizer* m_pMainSizer;
269
m_pMainSizer = new wxBoxSizer( wxVERTICAL );
271
ViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
274
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
277
ViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
279
m_pMainSizer->Add( ViewInteractor, 1, wxEXPAND, 5 );
281
m_pDataSetSelector = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
282
wxBoxSizer* m_pDataSetSizer;
283
m_pDataSetSizer = new wxBoxSizer( wxHORIZONTAL );
285
m_pstDataSet = new wxStaticText( m_pDataSetSelector, wxID_ANY, _("DataSet 0000/0000"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
286
m_pstDataSet->Wrap( -1 );
287
m_pDataSetSizer->Add( m_pstDataSet, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
289
m_pDataSetSlider = new wxSlider( m_pDataSetSelector, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
290
m_pDataSetSlider->SetForegroundColour( wxColour( 64, 64, 64 ) );
292
m_pDataSetSizer->Add( m_pDataSetSlider, 1, wxALIGN_CENTER_VERTICAL, 1 );
294
m_pDataSetSelector->SetSizer( m_pDataSetSizer );
295
m_pDataSetSelector->Layout();
296
m_pDataSetSizer->Fit( m_pDataSetSelector );
297
m_pMainSizer->Add( m_pDataSetSelector, 0, wxEXPAND, 5 );
299
this->SetSizer( m_pMainSizer );
302
this->Centre( wxBOTH );
305
m_pDataSetSlider->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxMIPRenderingBase::OnEraseBackground ), NULL, this );
306
m_pDataSetSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
307
m_pDataSetSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
308
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
309
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
310
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
311
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
312
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
313
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
314
m_pDataSetSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
317
wxMIPRenderingBase::~wxMIPRenderingBase()
320
m_pDataSetSlider->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxMIPRenderingBase::OnEraseBackground ), NULL, this );
321
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
322
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
323
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
324
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
325
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
326
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
327
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
328
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
329
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxMIPRenderingBase::OnDataSetSliderChanged ), NULL, this );
333
wxSurfaceRenderingBase::wxSurfaceRenderingBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
335
this->SetSizeHints( wxSize( 640,500 ), wxDefaultSize );
337
wxBoxSizer* m_pMainSizer;
338
m_pMainSizer = new wxBoxSizer( wxVERTICAL );
340
m_pBarSizer = new wxBoxSizer( wxVERTICAL );
342
m_pMainSizer->Add( m_pBarSizer, 0, wxEXPAND, 5 );
344
wxBoxSizer* m_pSurfaceSizer;
345
m_pSurfaceSizer = new wxBoxSizer( wxHORIZONTAL );
347
ViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
350
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
353
ViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
355
m_pSurfaceSizer->Add( ViewInteractor, 1, wxEXPAND, 5 );
357
m_pToolTitlePanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 26,-1 ), wxTAB_TRAVERSAL );
358
m_pToolTitlePanel->SetBackgroundColour( wxColour( 155, 155, 155 ) );
359
m_pToolTitlePanel->Hide();
360
m_pToolTitlePanel->SetMinSize( wxSize( 20,-1 ) );
362
wxBoxSizer* m_pToolTitleSizer;
363
m_pToolTitleSizer = new wxBoxSizer( wxVERTICAL );
365
m_panel26 = new VerticalHeader( m_pToolTitlePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
366
m_panel26->SetToolTip( _("Surface settings") );
368
m_pToolTitleSizer->Add( m_panel26, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
370
m_pToolTitlePanel->SetSizer( m_pToolTitleSizer );
371
m_pToolTitlePanel->Layout();
372
m_pSurfaceSizer->Add( m_pToolTitlePanel, 0, wxEXPAND, 5 );
374
m_pToolPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
375
wxBoxSizer* m_pToolPanelSizer;
376
m_pToolPanelSizer = new wxBoxSizer( wxVERTICAL );
378
m_pHeaderPanel = new HeaderPanelWithButton( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
379
m_pHeaderPanel->SetToolTip( _("Surface settings") );
381
m_pToolPanelSizer->Add( m_pHeaderPanel, 0, wxEXPAND, 5 );
383
m_pBody = new BodyPanelSinScroll( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
384
wxBoxSizer* m_pBodySizer;
385
m_pBodySizer = new wxBoxSizer( wxVERTICAL );
387
m_pQualityPanel = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
388
m_pQualityPanel->SetToolTip( _("Quality") );
390
wxBoxSizer* m_pQualitySizer;
391
m_pQualitySizer = new wxBoxSizer( wxVERTICAL );
393
wxBoxSizer* m_pQualityMSizer;
394
m_pQualityMSizer = new wxBoxSizer( wxHORIZONTAL );
396
m_pPreSmoothCheck = new wxCheckBox( m_pQualityPanel, wxID_ANY, _("Pre-Smooth"), wxDefaultPosition, wxDefaultSize, 0 );
397
m_pPreSmoothCheck->SetValue(true);
398
m_pPreSmoothCheck->SetToolTip( _("Enable/Disable Smoothing the high resolution input volume data.") );
400
m_pQualityMSizer->Add( m_pPreSmoothCheck, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 2 );
402
m_pPostSmoothCheck = new wxCheckBox( m_pQualityPanel, wxID_ANY, _("Post-Smooth"), wxDefaultPosition, wxDefaultSize, 0 );
403
m_pPostSmoothCheck->SetToolTip( _("Enable/Disable Smoothing the low resolution resampled volume data.") );
405
m_pQualityMSizer->Add( m_pPostSmoothCheck, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
407
m_pQualitySizer->Add( m_pQualityMSizer, 1, wxEXPAND, 5 );
409
wxBoxSizer* m_pQualityGroupSizer;
410
m_pQualityGroupSizer = new wxBoxSizer( wxHORIZONTAL );
412
m_pstResolution = new wxStaticText( m_pQualityPanel, wxID_ANY, _("Resolution"), wxDefaultPosition, wxDefaultSize, 0 );
413
m_pstResolution->Wrap( -1 );
414
m_pstResolution->SetToolTip( _("Sets the resampling resolution") );
416
m_pQualityGroupSizer->Add( m_pstResolution, 0, wxALIGN_CENTER_VERTICAL, 18 );
418
m_pResolutionSlider = new wxSlider( m_pQualityPanel, wxID_ANY, 2, 0, 3, wxDefaultPosition, wxDefaultSize, wxSL_BOTH|wxSL_HORIZONTAL );
419
m_pResolutionSlider->SetToolTip( _("Resampled resolution: 32x32x32, 64x64x64, 128x128x128, 256x256x256") );
421
m_pQualityGroupSizer->Add( m_pResolutionSlider, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
423
m_pQualitySizer->Add( m_pQualityGroupSizer, 0, wxEXPAND, 5 );
425
m_pQualityPanel->SetSizer( m_pQualitySizer );
426
m_pQualityPanel->Layout();
427
m_pQualitySizer->Fit( m_pQualityPanel );
428
m_pBodySizer->Add( m_pQualityPanel, 0, wxEXPAND, 5 );
430
m_pSep = new SubTitledPanelSeparator( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
431
m_pBodySizer->Add( m_pSep, 0, wxEXPAND, 5 );
433
m_pSurfacesPanel = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
434
m_pSurfacesPanel->SetToolTip( _("Surfaces") );
436
wxBoxSizer* m_pSurfacesPanelSizer;
437
m_pSurfacesPanelSizer = new wxBoxSizer( wxVERTICAL );
439
wxStaticBoxSizer* m_pSurf1Sizer;
440
m_pSurf1Sizer = new wxStaticBoxSizer( new wxStaticBox( m_pSurfacesPanel, wxID_ANY, _("First surface") ), wxVERTICAL );
442
wxFlexGridSizer* m_pSuf1MSizer;
443
m_pSuf1MSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
444
m_pSuf1MSizer->SetFlexibleDirection( wxBOTH );
445
m_pSuf1MSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
447
m_pSurf1Sizer->Add( m_pSuf1MSizer, 1, wxEXPAND, 5 );
449
m_pPanelSurface1 = new wxPanel( m_pSurfacesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
450
wxFlexGridSizer* fgSizer1;
451
fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
452
fgSizer1->SetFlexibleDirection( wxBOTH );
453
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
455
m_pstSurf1Value = new wxStaticText( m_pPanelSurface1, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
456
m_pstSurf1Value->Wrap( -1 );
457
m_pstSurf1Value->SetToolTip( _("IsoSurface pixel value") );
459
fgSizer1->Add( m_pstSurf1Value, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
461
wxBoxSizer* m_pSuf1GroupSizer;
462
m_pSuf1GroupSizer = new wxBoxSizer( wxHORIZONTAL );
464
m_pSurface1ValueEdit = new wxTextCtrl( m_pPanelSurface1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 30,-1 ), 0 );
465
m_pSurface1ValueEdit->SetToolTip( _("IsoSurface pixel value") );
467
m_pSuf1GroupSizer->Add( m_pSurface1ValueEdit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
469
m_pComboDefalut1 = new wxComboBox( m_pPanelSurface1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
470
m_pComboDefalut1->Append( _("CT - Bone") );
471
m_pComboDefalut1->Append( _("CT - Muscle") );
472
m_pComboDefalut1->Append( _("CT - Skin") );
473
m_pComboDefalut1->SetToolTip( _("CT Pressets") );
475
m_pSuf1GroupSizer->Add( m_pComboDefalut1, 1, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
477
fgSizer1->Add( m_pSuf1GroupSizer, 1, wxEXPAND, 5 );
479
m_pstSurf1Color = new wxStaticText( m_pPanelSurface1, wxID_ANY, _("Color"), wxDefaultPosition, wxDefaultSize, 0 );
480
m_pstSurf1Color->Wrap( -1 );
481
m_pstSurf1Color->SetToolTip( _("Rendering color") );
483
fgSizer1->Add( m_pstSurf1Color, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
485
m_pSurface1CPicker = new wxColourPickerCtrl( m_pPanelSurface1, wxID_ANY, wxColour( 247, 247, 247 ), wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
486
m_pSurface1CPicker->SetToolTip( _("Rendering color") );
488
fgSizer1->Add( m_pSurface1CPicker, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
490
m_pPanelSurface1->SetSizer( fgSizer1 );
491
m_pPanelSurface1->Layout();
492
fgSizer1->Fit( m_pPanelSurface1 );
493
m_pSurf1Sizer->Add( m_pPanelSurface1, 0, wxEXPAND, 25 );
495
m_pSurfacesPanelSizer->Add( m_pSurf1Sizer, 0, wxEXPAND, 5 );
497
wxStaticBoxSizer* m_pSurf2Sizer;
498
m_pSurf2Sizer = new wxStaticBoxSizer( new wxStaticBox( m_pSurfacesPanel, wxID_ANY, _("Second surface") ), wxVERTICAL );
500
wxFlexGridSizer* m_pSurf2MSizer;
501
m_pSurf2MSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
502
m_pSurf2MSizer->SetFlexibleDirection( wxBOTH );
503
m_pSurf2MSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
505
m_pEnableSurface2 = new wxCheckBox( m_pSurfacesPanel, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, 0 );
506
m_pEnableSurface2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) );
507
m_pEnableSurface2->SetToolTip( _("Enable/Disable second surface") );
509
m_pSurf2MSizer->Add( m_pEnableSurface2, 0, wxALIGN_CENTER_VERTICAL, 5 );
511
m_pSurf2Sizer->Add( m_pSurf2MSizer, 0, wxEXPAND|wxTOP, 8 );
513
m_pPanelSurface2 = new wxPanel( m_pSurfacesPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
514
wxFlexGridSizer* m_pSuf2OrgSizer;
515
m_pSuf2OrgSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
516
m_pSuf2OrgSizer->SetFlexibleDirection( wxBOTH );
517
m_pSuf2OrgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
519
m_pstSurf2Value = new wxStaticText( m_pPanelSurface2, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
520
m_pstSurf2Value->Wrap( -1 );
521
m_pstSurf2Value->SetToolTip( _("IsoSurface pixel value") );
523
m_pSuf2OrgSizer->Add( m_pstSurf2Value, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
525
wxBoxSizer* m_pSurf2SepSizer;
526
m_pSurf2SepSizer = new wxBoxSizer( wxHORIZONTAL );
528
m_pSurface2ValueEdit = new wxTextCtrl( m_pPanelSurface2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 30,-1 ), 0 );
529
m_pSurface2ValueEdit->SetToolTip( _("IsoSurface pixel value") );
531
m_pSurf2SepSizer->Add( m_pSurface2ValueEdit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
533
m_pComboDefault2 = new wxComboBox( m_pPanelSurface2, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
534
m_pComboDefault2->Append( _("CT - Bone") );
535
m_pComboDefault2->Append( _("CT - Muscle") );
536
m_pComboDefault2->Append( _("CT - Skin") );
537
m_pComboDefault2->SetToolTip( _("CT Pressets") );
539
m_pSurf2SepSizer->Add( m_pComboDefault2, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
541
m_pSuf2OrgSizer->Add( m_pSurf2SepSizer, 1, wxEXPAND, 5 );
543
m_pstSurf2ColorAlpha = new wxStaticText( m_pPanelSurface2, wxID_ANY, _("Color / alpha"), wxDefaultPosition, wxDefaultSize, 0 );
544
m_pstSurf2ColorAlpha->Wrap( -1 );
545
m_pstSurf2ColorAlpha->SetToolTip( _("Surface rendering color and transparency") );
547
m_pSuf2OrgSizer->Add( m_pstSurf2ColorAlpha, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
549
wxBoxSizer* m_pSurf2GroupSizer;
550
m_pSurf2GroupSizer = new wxBoxSizer( wxHORIZONTAL );
552
m_pSurface2CPicker = new wxColourPickerCtrl( m_pPanelSurface2, wxID_ANY, wxColour( 255, 32, 32 ), wxDefaultPosition, wxDefaultSize, wxCLRP_DEFAULT_STYLE );
553
m_pSurface2CPicker->SetToolTip( _("Surface rendering color and transparency") );
555
m_pSurf2GroupSizer->Add( m_pSurface2CPicker, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
557
m_pstSep = new wxStaticText( m_pPanelSurface2, wxID_ANY, _("/"), wxDefaultPosition, wxDefaultSize, 0 );
558
m_pstSep->Wrap( -1 );
559
m_pSurf2GroupSizer->Add( m_pstSep, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
561
m_pSurface2Alpha = new wxSlider( m_pPanelSurface2, wxID_ANY, 100, 50, 100, wxDefaultPosition, wxDefaultSize, wxSL_BOTH|wxSL_HORIZONTAL );
562
m_pSurface2Alpha->SetToolTip( _("Transparency level") );
564
m_pSurf2GroupSizer->Add( m_pSurface2Alpha, 1, wxEXPAND|wxTOP|wxALIGN_CENTER_VERTICAL, 5 );
566
m_pSuf2OrgSizer->Add( m_pSurf2GroupSizer, 1, wxEXPAND, 5 );
568
m_pPanelSurface2->SetSizer( m_pSuf2OrgSizer );
569
m_pPanelSurface2->Layout();
570
m_pSuf2OrgSizer->Fit( m_pPanelSurface2 );
571
m_pSurf2Sizer->Add( m_pPanelSurface2, 0, wxEXPAND, 25 );
573
m_pSurfacesPanelSizer->Add( m_pSurf2Sizer, 0, wxEXPAND|wxTOP, 5 );
575
m_pSurfacesPanel->SetSizer( m_pSurfacesPanelSizer );
576
m_pSurfacesPanel->Layout();
577
m_pSurfacesPanelSizer->Fit( m_pSurfacesPanel );
578
m_pBodySizer->Add( m_pSurfacesPanel, 0, wxEXPAND, 5 );
581
m_pBodySizer->Add( 0, 0, 1, wxEXPAND, 5 );
583
m_pBody->SetSizer( m_pBodySizer );
585
m_pBodySizer->Fit( m_pBody );
586
m_pToolPanelSizer->Add( m_pBody, 1, wxEXPAND, 5 );
588
m_pButtonPanel = new wxPanel( m_pToolPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
589
wxBoxSizer* m_pButtonsSizer;
590
m_pButtonsSizer = new wxBoxSizer( wxVERTICAL );
592
m_pApplyButton = new wxButton( m_pButtonPanel, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
593
m_pApplyButton->SetDefault();
594
m_pApplyButton->SetToolTip( _("Apply reconstruction") );
596
m_pButtonsSizer->Add( m_pApplyButton, 0, wxALL|wxALIGN_RIGHT, 5 );
598
m_pButtonPanel->SetSizer( m_pButtonsSizer );
599
m_pButtonPanel->Layout();
600
m_pButtonsSizer->Fit( m_pButtonPanel );
601
m_pToolPanelSizer->Add( m_pButtonPanel, 0, wxEXPAND, 5 );
603
m_pToolPanel->SetSizer( m_pToolPanelSizer );
604
m_pToolPanel->Layout();
605
m_pToolPanelSizer->Fit( m_pToolPanel );
606
m_pSurfaceSizer->Add( m_pToolPanel, 0, wxEXPAND, 5 );
608
m_pMainSizer->Add( m_pSurfaceSizer, 1, wxEXPAND, 5 );
610
m_pDataSetSelector = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
611
m_pDataSetSelector->Hide();
613
wxBoxSizer* m_pDataSetSizer;
614
m_pDataSetSizer = new wxBoxSizer( wxHORIZONTAL );
616
m_pstDataSet = new wxStaticText( m_pDataSetSelector, wxID_ANY, _("DataSet 0000/0000"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
617
m_pstDataSet->Wrap( -1 );
618
m_pDataSetSizer->Add( m_pstDataSet, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
620
m_pDataSetSlider = new wxSlider( m_pDataSetSelector, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
621
m_pDataSetSlider->SetForegroundColour( wxColour( 64, 64, 64 ) );
623
m_pDataSetSizer->Add( m_pDataSetSlider, 1, wxALIGN_CENTER_VERTICAL, 1 );
625
m_pDataSetSelector->SetSizer( m_pDataSetSizer );
626
m_pDataSetSelector->Layout();
627
m_pDataSetSizer->Fit( m_pDataSetSelector );
628
m_pMainSizer->Add( m_pDataSetSelector, 0, wxEXPAND, 5 );
630
this->SetSizer( m_pMainSizer );
633
this->Centre( wxBOTH );
636
this->Connect( wxEVT_SIZE, wxSizeEventHandler( wxSurfaceRenderingBase::OnWindowSize ) );
637
m_panel26->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( wxSurfaceRenderingBase::OnTitleLeftUp ), NULL, this );
638
m_pSurface1ValueEdit->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxSurfaceRenderingBase::OnToolSurface1TextChanged ), NULL, this );
639
m_pComboDefalut1->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxSurfaceRenderingBase::OnComboFirstValue ), NULL, this );
640
m_pSurface1CPicker->Connect( wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEventHandler( wxSurfaceRenderingBase::OnToolSurface1ColourChanged ), NULL, this );
641
m_pEnableSurface2->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxSurfaceRenderingBase::OnCheckEnable2 ), NULL, this );
642
m_pSurface2ValueEdit->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxSurfaceRenderingBase::OnToolSurface2TextChanged ), NULL, this );
643
m_pComboDefault2->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxSurfaceRenderingBase::OnComboSecondValue ), NULL, this );
644
m_pSurface2CPicker->Connect( wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEventHandler( wxSurfaceRenderingBase::OnToolSurface1ColourChanged ), NULL, this );
645
m_pApplyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxSurfaceRenderingBase::OnApplyClick ), NULL, this );
646
m_pDataSetSlider->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxSurfaceRenderingBase::OnEraseBackground ), NULL, this );
647
m_pDataSetSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
648
m_pDataSetSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
649
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
650
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
651
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
652
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
653
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
654
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
655
m_pDataSetSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
658
wxSurfaceRenderingBase::~wxSurfaceRenderingBase()
661
this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( wxSurfaceRenderingBase::OnWindowSize ) );
662
m_panel26->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( wxSurfaceRenderingBase::OnTitleLeftUp ), NULL, this );
663
m_pSurface1ValueEdit->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxSurfaceRenderingBase::OnToolSurface1TextChanged ), NULL, this );
664
m_pComboDefalut1->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxSurfaceRenderingBase::OnComboFirstValue ), NULL, this );
665
m_pSurface1CPicker->Disconnect( wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEventHandler( wxSurfaceRenderingBase::OnToolSurface1ColourChanged ), NULL, this );
666
m_pEnableSurface2->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( wxSurfaceRenderingBase::OnCheckEnable2 ), NULL, this );
667
m_pSurface2ValueEdit->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( wxSurfaceRenderingBase::OnToolSurface2TextChanged ), NULL, this );
668
m_pComboDefault2->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( wxSurfaceRenderingBase::OnComboSecondValue ), NULL, this );
669
m_pSurface2CPicker->Disconnect( wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEventHandler( wxSurfaceRenderingBase::OnToolSurface1ColourChanged ), NULL, this );
670
m_pApplyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxSurfaceRenderingBase::OnApplyClick ), NULL, this );
671
m_pDataSetSlider->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxSurfaceRenderingBase::OnEraseBackground ), NULL, this );
672
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
673
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
674
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
675
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
676
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
677
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
678
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
679
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
680
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxSurfaceRenderingBase::OnDataSetSliderChanged ), NULL, this );
684
wxMPRRenderingBase::wxMPRRenderingBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
686
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
688
wxBoxSizer* m_pMainSizer;
689
m_pMainSizer = new wxBoxSizer( wxVERTICAL );
691
m_pLeftCenterSplitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
692
m_pLeftCenterSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( wxMPRRenderingBase::m_pLeftCenterSplitterOnIdle ), NULL, this );
694
m_pLeftPanel = new wxPanel( m_pLeftCenterSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
696
m_p = new wxBoxSizer( wxVERTICAL );
698
SagittalViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
701
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
704
SagittalImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
707
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
709
SagittalImageViewer->SetRenderWindow ( this->SagittalViewInteractor->GetRenderWindow() );
710
SagittalImageViewer->SetRenderer (rend1);
712
SagittalViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
714
m_p->Add( SagittalViewInteractor, 1, wxEXPAND, 5 );
716
m_pLeftPanel->SetSizer( m_p );
717
m_pLeftPanel->Layout();
718
m_p->Fit( m_pLeftPanel );
719
m_pCenterRightPanel = new wxPanel( m_pLeftCenterSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
720
wxBoxSizer* m_pCenterRightSizer;
721
m_pCenterRightSizer = new wxBoxSizer( wxVERTICAL );
723
m_pCenterRightSplitter = new wxSplitterWindow( m_pCenterRightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
724
m_pCenterRightSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( wxMPRRenderingBase::m_pCenterRightSplitterOnIdle ), NULL, this );
726
m_pTopLeftPanel1 = new wxPanel( m_pCenterRightSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
727
wxBoxSizer* m_pAxialSizer1;
728
m_pAxialSizer1 = new wxBoxSizer( wxVERTICAL );
730
AxialViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
733
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
736
AxialImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
739
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
741
AxialImageViewer->SetRenderWindow ( this->AxialViewInteractor->GetRenderWindow() );
742
AxialImageViewer->SetRenderer (rend1);
744
AxialViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
746
m_pAxialSizer1->Add( AxialViewInteractor, 1, wxEXPAND, 5 );
748
m_pTopLeftPanel1->SetSizer( m_pAxialSizer1 );
749
m_pTopLeftPanel1->Layout();
750
m_pAxialSizer1->Fit( m_pTopLeftPanel1 );
751
m_pBottomLeftPanel1 = new wxPanel( m_pCenterRightSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
752
wxBoxSizer* m_pSagittalSizer;
753
m_pSagittalSizer = new wxBoxSizer( wxVERTICAL );
755
CoronalViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
758
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
761
CoronalImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
764
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
766
CoronalImageViewer->SetRenderWindow ( this->CoronalViewInteractor->GetRenderWindow() );
767
CoronalImageViewer->SetRenderer (rend1);
769
CoronalViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
771
m_pSagittalSizer->Add( CoronalViewInteractor, 1, wxEXPAND, 5 );
773
m_pBottomLeftPanel1->SetSizer( m_pSagittalSizer );
774
m_pBottomLeftPanel1->Layout();
775
m_pSagittalSizer->Fit( m_pBottomLeftPanel1 );
776
m_pCenterRightSplitter->SplitVertically( m_pTopLeftPanel1, m_pBottomLeftPanel1, 224 );
777
m_pCenterRightSizer->Add( m_pCenterRightSplitter, 1, wxEXPAND, 5 );
779
m_pCenterRightPanel->SetSizer( m_pCenterRightSizer );
780
m_pCenterRightPanel->Layout();
781
m_pCenterRightSizer->Fit( m_pCenterRightPanel );
782
m_pLeftCenterSplitter->SplitVertically( m_pLeftPanel, m_pCenterRightPanel, 203 );
783
m_pMainSizer->Add( m_pLeftCenterSplitter, 1, wxEXPAND, 5 );
785
m_pDataSetSelector = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
786
wxBoxSizer* m_pDataSetSizer;
787
m_pDataSetSizer = new wxBoxSizer( wxHORIZONTAL );
789
m_pstDataSet = new wxStaticText( m_pDataSetSelector, wxID_ANY, _("DataSet 0000/0000"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
790
m_pstDataSet->Wrap( -1 );
791
m_pDataSetSizer->Add( m_pstDataSet, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
793
m_pDataSetSlider = new wxSlider( m_pDataSetSelector, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
794
m_pDataSetSlider->SetForegroundColour( wxColour( 64, 64, 64 ) );
796
m_pDataSetSizer->Add( m_pDataSetSlider, 1, wxALIGN_CENTER_VERTICAL, 1 );
798
m_pDataSetSelector->SetSizer( m_pDataSetSizer );
799
m_pDataSetSelector->Layout();
800
m_pDataSetSizer->Fit( m_pDataSetSelector );
801
m_pMainSizer->Add( m_pDataSetSelector, 0, wxEXPAND, 5 );
803
this->SetSizer( m_pMainSizer );
806
this->Centre( wxBOTH );
809
m_pDataSetSlider->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxMPRRenderingBase::OnEraseBackground ), NULL, this );
810
m_pDataSetSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
811
m_pDataSetSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
812
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
813
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
814
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
815
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
816
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
817
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
818
m_pDataSetSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
821
wxMPRRenderingBase::~wxMPRRenderingBase()
824
m_pDataSetSlider->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxMPRRenderingBase::OnEraseBackground ), NULL, this );
825
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
826
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
827
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
828
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
829
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
830
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
831
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
832
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
833
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxMPRRenderingBase::OnDataSetSliderChanged ), NULL, this );
837
wxEndoscopyRenderingBase::wxEndoscopyRenderingBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
839
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
841
wxBoxSizer* m_pMainSizer;
842
m_pMainSizer = new wxBoxSizer( wxVERTICAL );
844
m_pSpliter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D|wxSP_LIVE_UPDATE );
845
m_pSpliter->Connect( wxEVT_IDLE, wxIdleEventHandler( wxEndoscopyRenderingBase::m_pSpliterOnIdle ), NULL, this );
847
m_pLeftPanel = new wxPanel( m_pSpliter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
848
wxBoxSizer* m_pLeftPanelSizer;
849
m_pLeftPanelSizer = new wxBoxSizer( wxVERTICAL );
851
m_pLeftPanelSplitter = new wxSplitterWindow( m_pLeftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
852
m_pLeftPanelSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( wxEndoscopyRenderingBase::m_pLeftPanelSplitterOnIdle ), NULL, this );
854
m_pTopLeftPanel = new wxPanel( m_pLeftPanelSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
855
wxBoxSizer* m_pAxialSizer;
856
m_pAxialSizer = new wxBoxSizer( wxVERTICAL );
858
AxialViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
861
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
864
AxialImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
866
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
868
AxialImageViewer->SetRenderWindow ( this->AxialViewInteractor->GetRenderWindow() );
869
AxialImageViewer->SetRenderer (rend1);
871
AxialViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
873
m_pAxialSizer->Add( AxialViewInteractor, 1, wxEXPAND, 5 );
875
m_pTopLeftPanel->SetSizer( m_pAxialSizer );
876
m_pTopLeftPanel->Layout();
877
m_pAxialSizer->Fit( m_pTopLeftPanel );
878
m_pBottomLeftPanel = new wxPanel( m_pLeftPanelSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
879
wxBoxSizer* m_pSagittalSizer;
880
m_pSagittalSizer = new wxBoxSizer( wxVERTICAL );
882
SagittalViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
885
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
888
SagittalImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
891
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
893
SagittalImageViewer->SetRenderWindow ( this->SagittalViewInteractor->GetRenderWindow() );
894
SagittalImageViewer->SetRenderer (rend1);
896
SagittalViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
898
m_pSagittalSizer->Add( SagittalViewInteractor, 1, wxEXPAND, 5 );
900
m_pBottomLeftPanel->SetSizer( m_pSagittalSizer );
901
m_pBottomLeftPanel->Layout();
902
m_pSagittalSizer->Fit( m_pBottomLeftPanel );
903
m_pLeftPanelSplitter->SplitHorizontally( m_pTopLeftPanel, m_pBottomLeftPanel, 0 );
904
m_pLeftPanelSizer->Add( m_pLeftPanelSplitter, 1, wxEXPAND, 5 );
906
m_pLeftPanel->SetSizer( m_pLeftPanelSizer );
907
m_pLeftPanel->Layout();
908
m_pLeftPanelSizer->Fit( m_pLeftPanel );
909
m_pRightPanel = new wxPanel( m_pSpliter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
910
wxBoxSizer* m_pRightPanelSizer;
911
m_pRightPanelSizer = new wxBoxSizer( wxVERTICAL );
913
m_pRightPanelSplitter = new wxSplitterWindow( m_pRightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
914
m_pRightPanelSplitter->Connect( wxEVT_IDLE, wxIdleEventHandler( wxEndoscopyRenderingBase::m_pRightPanelSplitterOnIdle ), NULL, this );
916
m_pTopRightPanel = new wxPanel( m_pRightPanelSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
917
wxBoxSizer* m_pCononalSizer;
918
m_pCononalSizer = new wxBoxSizer( wxVERTICAL );
920
CoronalViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
923
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
926
CoronalImageViewer = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
929
vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
931
CoronalImageViewer->SetRenderWindow ( this->CoronalViewInteractor->GetRenderWindow() );
932
CoronalImageViewer->SetRenderer (rend1);
934
CoronalViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
936
m_pCononalSizer->Add( CoronalViewInteractor, 1, wxEXPAND, 5 );
938
m_pTopRightPanel->SetSizer( m_pCononalSizer );
939
m_pTopRightPanel->Layout();
940
m_pCononalSizer->Fit( m_pTopRightPanel );
941
m_pBottomRightPanel = new wxPanel( m_pRightPanelSplitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
942
wxBoxSizer* m_pEndoscopySizer;
943
m_pEndoscopySizer = new wxBoxSizer( wxVERTICAL );
945
EndoscopyViewInteractor = new wxVTKRenderWindowInteractor (this, wxID_ANY,
948
wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
951
EndoscopyViewInteractor->SetBackgroundColour( wxColour( 0, 0, 0 ) );
953
m_pEndoscopySizer->Add( EndoscopyViewInteractor, 1, wxEXPAND, 5 );
955
m_pBottomRightPanel->SetSizer( m_pEndoscopySizer );
956
m_pBottomRightPanel->Layout();
957
m_pEndoscopySizer->Fit( m_pBottomRightPanel );
958
m_pRightPanelSplitter->SplitHorizontally( m_pTopRightPanel, m_pBottomRightPanel, 0 );
959
m_pRightPanelSizer->Add( m_pRightPanelSplitter, 1, wxEXPAND, 5 );
961
m_pRightPanel->SetSizer( m_pRightPanelSizer );
962
m_pRightPanel->Layout();
963
m_pRightPanelSizer->Fit( m_pRightPanel );
964
m_pSpliter->SplitVertically( m_pLeftPanel, m_pRightPanel, 0 );
965
m_pMainSizer->Add( m_pSpliter, 1, wxEXPAND, 5 );
967
m_pDataSetSelector = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
968
wxBoxSizer* m_pDataSetSizer;
969
m_pDataSetSizer = new wxBoxSizer( wxHORIZONTAL );
971
m_pstDataSet = new wxStaticText( m_pDataSetSelector, wxID_ANY, _("DataSet 0000/0000"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
972
m_pstDataSet->Wrap( -1 );
973
m_pDataSetSizer->Add( m_pstDataSet, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
975
m_pDataSetSlider = new wxSlider( m_pDataSetSelector, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_TOP );
976
m_pDataSetSlider->SetForegroundColour( wxColour( 64, 64, 64 ) );
978
m_pDataSetSizer->Add( m_pDataSetSlider, 1, wxALIGN_CENTER_VERTICAL, 1 );
980
m_pDataSetSelector->SetSizer( m_pDataSetSizer );
981
m_pDataSetSelector->Layout();
982
m_pDataSetSizer->Fit( m_pDataSetSelector );
983
m_pMainSizer->Add( m_pDataSetSelector, 0, wxEXPAND, 5 );
985
this->SetSizer( m_pMainSizer );
988
this->Centre( wxBOTH );
991
m_pDataSetSlider->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxEndoscopyRenderingBase::OnEraseBackground ), NULL, this );
992
m_pDataSetSlider->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
993
m_pDataSetSlider->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
994
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
995
m_pDataSetSlider->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
996
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
997
m_pDataSetSlider->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
998
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
999
m_pDataSetSlider->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1000
m_pDataSetSlider->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1003
wxEndoscopyRenderingBase::~wxEndoscopyRenderingBase()
1005
// Disconnect Events
1006
m_pDataSetSlider->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxEndoscopyRenderingBase::OnEraseBackground ), NULL, this );
1007
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1008
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1009
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1010
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1011
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1012
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1013
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1014
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );
1015
m_pDataSetSlider->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( wxEndoscopyRenderingBase::OnDataSetSliderChanged ), NULL, this );