30 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
37 int min = (int)floor (range[0]);
38 int max = (int)ceil (range[1]);
40 wxButton *segmentationOneSliceBtn =
new wxButton(
this,-1,_T(
"Current slice"), wxDefaultPosition, wxSize(200,35) );
41 wxButton *segmentationAllSliceBtn =
new wxButton(
this,-1,_T(
"All slices") ,wxDefaultPosition, wxSize(200,35) );
42 _isovalue =
new wxSlider(
this, -1, 40 , min, max, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
43 _sampling =
new wxSlider(
this, -1, 20 , 4, 50, wxDefaultPosition, wxSize(200,35), wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
44 wxString lstOptions[3];
45 lstOptions[0]=_T(
"A");
46 lstOptions[1]=_T(
"B");
47 lstOptions[2]=_T(
"C");
48 methodRadiobox =
new wxRadioBox(
this, -1, _T(
"Method (find ctrl. Points)"), wxDefaultPosition, wxSize(200,45), 3 , lstOptions, 3, wxRA_SPECIFY_COLS);
66 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1);
67 sizer->Add(
new wxStaticText(
this, -1, _T(
"Isovalue (Gray level)")), 1, wxGROW );
70 sizer->Add(
new wxStaticText(
this, -1 ,_T(
"Sampling (%)")), 1, wxGROW );
72 sizer->Add( segmentationOneSliceBtn, 1, wxGROW );
73 sizer->Add(
new wxStaticText(
this, -1, _T(
" ")), 1, wxGROW );
75 sizer->Add( segmentationAllSliceBtn, 1, wxGROW );
78 this->SetSizer( sizer );
80 this->SetSize( wxDefaultSize );
81 this->SetAutoLayout(
true );
108 wxFlexGridSizer* flexsizer =
new wxFlexGridSizer(1);
112 wxPanel* panel =
new wxPanel(
this, -1);
114 wxStaticText* stattext =
new wxStaticText(
segmentPanelITK, -1, wxString(_T(
" Automatic ITK Segmentation ")), wxDefaultPosition,
115 wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T(
"")));
117 flexsizer->Add(stattext, wxALIGN_CENTER | wxALIGN_CENTRE);
118 flexsizer->Add(panel, wxEXPAND);
154 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
164 new wxStaticText(
this, wxID_ANY, wxT(
"Initial Distance"), wxPoint(5, 5));
166 new wxStaticText(
this, wxID_ANY, wxT(
"Sigma"), wxPoint(5, 30));
168 new wxStaticText(
this, wxID_ANY, wxT(
"Sigmoid Alfa"), wxPoint(5, 55));
170 new wxStaticText(
this, wxID_ANY, wxT(
"Sigmoid Beta"), wxPoint(5, 80));
172 new wxStaticText(
this, wxID_ANY, wxT(
"Propagation Scaling"),wxPoint(5, 105));
174 new wxStaticText(
this, wxID_ANY, wxT(
"Iterations"), wxPoint(5, 130));
176 new wxStaticText(
this, wxID_ANY, wxT(
"Inflation Strength"), wxPoint(5, 155));
180 _distance =
new wxTextCtrl(
this, wxID_ANY, wxT(
"5.0"), wxPoint(98,5), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
181 _sigma =
new wxTextCtrl(
this, wxID_ANY, wxT(
"1.2"), wxPoint(98,30), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
182 _alfa =
new wxTextCtrl(
this, wxID_ANY, wxT(
"-1.0"), wxPoint(98,55), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
183 _beta =
new wxTextCtrl(
this, wxID_ANY, wxT(
"5.0"), wxPoint(98,80), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
184 _propagation =
new wxTextCtrl(
this, wxID_ANY, wxT(
"6.0"), wxPoint(98,105), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
185 _iterations =
new wxTextCtrl(
this, wxID_ANY, wxT(
"800"), wxPoint(98,130), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
186 _infStrength =
new wxTextCtrl(
this, wxID_ANY, wxT(
"3.0"), wxPoint(98,155), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
190 new wxButton(
this, 6, wxT(
"One Slice"), wxPoint(98, 180), wxSize(70, 25), 0, wxDefaultValidator, wxT(
"button"));
204 wxString sigm=
_sigma->GetValue();
205 wxString alf=
_alfa->GetValue();
206 wxString bet=
_beta->GetValue();
237 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
241 wxButton *axisShowBtn =
new wxButton(
this,wxID_ANY,_T(
"Show/Hide Axis"), wxDefaultPosition, wxSize(200,35) );
242 wxButton *mirrorGoBtn =
new wxButton(
this,wxID_ANY,_T(
"Mirror Contour"), wxDefaultPosition, wxSize(200,35) );
243 _thickness =
new wxSlider(
this, -1, 4, 1, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS, wxDefaultValidator);
248 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1);
249 sizer -> Add( axisShowBtn, 1, wxGROW );
250 sizer -> Add(
new wxStaticText(
this,-1,_T(
" ")) , 1, wxGROW );
251 sizer -> Add(
new wxStaticText(
this,-1,_T(
"Thickness")) , 1, wxGROW );
253 sizer -> Add( mirrorGoBtn, 1, wxGROW );
255 this->SetSizer( sizer );
256 this->SetAutoLayout(
true );
305 : wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
307 wxButton *button1 =
new wxButton(
this,wxID_ANY,_T(
"Button 1"), wxDefaultPosition, wxSize(200,35) );
308 wxButton *button2 =
new wxButton(
this,wxID_ANY,_T(
"Button 2"), wxDefaultPosition, wxSize(200,35) );
313 wxFlexGridSizer * sizer =
new wxFlexGridSizer(1);
314 sizer -> Add( button1, 1, wxGROW );
315 sizer -> Add( button2, 1, wxGROW );
317 this->SetSizer( sizer );
318 this->SetAutoLayout(
true );
327 std::cout <<
"Button 1 has been pressed" << std::endl;
332 std::cout <<
"Button 2 has been pressed" << std::endl;