00001
00002
00003
00004
00005
00007
00008 #include "object_segmentation_frame.h"
00009
00011
00012 ObjectSegmentationFrame::ObjectSegmentationFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxFrame( parent, id, title, pos, size, style, name )
00013 {
00014 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
00015
00016 wxBoxSizer* bSizer1;
00017 bSizer1 = new wxBoxSizer( wxVERTICAL );
00018
00019 wxBoxSizer* bSizer3;
00020 bSizer3 = new wxBoxSizer( wxVERTICAL );
00021
00022 m_panel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 640,480 ), wxTAB_TRAVERSAL );
00023 bSizer3->Add( m_panel, 0, wxEXPAND | wxALL, 5 );
00024
00025 bSizer1->Add( bSizer3, 0, wxEXPAND, 5 );
00026
00027 wxBoxSizer* bSizer41;
00028 bSizer41 = new wxBoxSizer( wxHORIZONTAL );
00029
00030 bottom_label_ = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
00031 bottom_label_->Wrap( -1 );
00032 bSizer41->Add( bottom_label_, 0, wxALL, 5 );
00033
00034 bSizer1->Add( bSizer41, 1, wxEXPAND, 5 );
00035
00036 wxBoxSizer* bSizer4;
00037 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
00038
00039 accept_button_ = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 );
00040 bSizer4->Add( accept_button_, 0, wxALL, 5 );
00041
00042 cancel_button_ = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
00043 bSizer4->Add( cancel_button_, 0, wxALL, 5 );
00044
00045
00046 bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
00047
00048 segment_button_ = new wxButton( this, wxID_ANY, wxT("Segment"), wxDefaultPosition, wxDefaultSize, 0 );
00049 bSizer4->Add( segment_button_, 0, wxALL, 5 );
00050
00051 reset_button_ = new wxButton( this, wxID_ANY, wxT("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
00052 bSizer4->Add( reset_button_, 0, wxALL, 5 );
00053
00054 restart_button_ = new wxButton( this, wxID_ANY, wxT("Restart"), wxDefaultPosition, wxDefaultSize, 0 );
00055 bSizer4->Add( restart_button_, 0, wxALL, 5 );
00056
00057 bSizer1->Add( bSizer4, 0, wxEXPAND, 5 );
00058
00059 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
00060 bSizer1->Add( m_staticline2, 0, wxEXPAND | wxALL, 10 );
00061
00062 wxBoxSizer* bSizer6;
00063 bSizer6 = new wxBoxSizer( wxHORIZONTAL );
00064
00065 with_surface_ = new wxCheckBox( this, wxID_ANY, wxT("Surface"), wxDefaultPosition, wxDefaultSize, 0 );
00066 bSizer6->Add( with_surface_, 0, wxALL, 5 );
00067
00068 m_staticline21 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL|wxLI_VERTICAL );
00069 bSizer6->Add( m_staticline21, 0, wxEXPAND | wxALL, 5 );
00070
00071 with_disparity_ = new wxCheckBox( this, wxID_ANY, wxT("Disparity"), wxDefaultPosition, wxDefaultSize, 0 );
00072 bSizer6->Add( with_disparity_, 0, wxALL, 5 );
00073
00074 m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
00075 bSizer6->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 );
00076
00077 with_color_ = new wxCheckBox( this, wxID_ANY, wxT("Color"), wxDefaultPosition, wxDefaultSize, 0 );
00078 bSizer6->Add( with_color_, 0, wxALL, 5 );
00079
00080 with_holes_ = new wxCheckBox( this, wxID_ANY, wxT("Sparse"), wxDefaultPosition, wxDefaultSize, 0 );
00081 bSizer6->Add( with_holes_, 0, wxALL, 5 );
00082
00083 uniform_ = new wxCheckBox( this, wxID_ANY, wxT("Uniform"), wxDefaultPosition, wxDefaultSize, 0 );
00084 bSizer6->Add( uniform_, 0, wxALL, 5 );
00085
00086 m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
00087 bSizer6->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 );
00088
00089 grad_weight_label_ = new wxStaticText( this, wxID_ANY, wxT("GradWeight"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
00090 grad_weight_label_->Wrap( -1 );
00091 bSizer6->Add( grad_weight_label_, 0, wxALL, 5 );
00092
00093 grad_weight_slider_ = new wxSlider( this, wxID_ANY, 50, 1, 100, wxDefaultPosition, wxSize( -1,-1 ), wxSL_HORIZONTAL|wxSL_LABELS );
00094 bSizer6->Add( grad_weight_slider_, 1, wxALL, 5 );
00095
00096 bSizer1->Add( bSizer6, 0, wxEXPAND, 5 );
00097
00098 this->SetSizer( bSizer1 );
00099 this->Layout();
00100
00101
00102 accept_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::acceptButtonClicked ), NULL, this );
00103 cancel_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::cancelButtonClicked ), NULL, this );
00104 segment_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::segmentButtonClicked ), NULL, this );
00105 reset_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::resetButtonClicked ), NULL, this );
00106 restart_button_->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::restartButtonClicked ), NULL, this );
00107 with_surface_->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withSurfaceChecked ), NULL, this );
00108 with_disparity_->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withDisparityChecked ), NULL, this );
00109 with_color_->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withColorChecked ), NULL, this );
00110 with_holes_->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withHolesChecked ), NULL, this );
00111 uniform_->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::uniformChecked ), NULL, this );
00112 grad_weight_slider_->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ObjectSegmentationFrame::gradWeightChanged ), NULL, this );
00113 }
00114
00115 ObjectSegmentationFrame::~ObjectSegmentationFrame()
00116 {
00117
00118 accept_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::acceptButtonClicked ), NULL, this );
00119 cancel_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::cancelButtonClicked ), NULL, this );
00120 segment_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::segmentButtonClicked ), NULL, this );
00121 reset_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::resetButtonClicked ), NULL, this );
00122 restart_button_->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::restartButtonClicked ), NULL, this );
00123 with_surface_->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withSurfaceChecked ), NULL, this );
00124 with_disparity_->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withDisparityChecked ), NULL, this );
00125 with_color_->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withColorChecked ), NULL, this );
00126 with_holes_->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::withHolesChecked ), NULL, this );
00127 uniform_->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ObjectSegmentationFrame::uniformChecked ), NULL, this );
00128 grad_weight_slider_->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( ObjectSegmentationFrame::gradWeightChanged ), NULL, this );
00129 }