From ff4f9f157e88be5c8c7f39d619e09f961d4e2ac7 Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Mon, 3 Feb 2025 13:57:38 +0100 Subject: [PATCH] #3575 Clean Panel 3D interface --- .../manualContourBaseControler.cpp | 7 +- .../widgets/wxMaracas_N_ViewersWidget.cxx | 35 +++- .../widgets/wxMaracas_ViewerWidget.cxx | 83 +++++--- .../widgets/wxVtkMPR3DViewCntrlPanel.cxx | 181 ++++++++++-------- 4 files changed, 183 insertions(+), 123 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp index 237484c..834f59f 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourBaseControler.cpp @@ -94,11 +94,16 @@ bool manualContourBaseControler::OnChar() // Delete Point if ((keyCode==8) || (keyCode==127)) { - if (!GetManualViewBaseContour()->GetPosibleSelected()==true) + if ( (GetState()==0) && (!GetManualViewBaseContour()->GetPosibleSelected()==true)) { DeleteActualMousePoint(X,Y); + } + + if (GetState()==8) + { DeleteGroupSelectedPoints(); } + GetManualViewBaseContour()->Refresh(); this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); } else { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx index 52364c1..5a98917 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_N_ViewersWidget.cxx @@ -244,7 +244,10 @@ wxwindow1 = new wxMaracas_ViewerWidget(this, imagedata, (*nTypeView)[0], mvtkmprbasedata, nTDxWindow==0 ); wxwindow = wxwindow1; }else if (nTypeView->size()==2) { - wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); + wxSplitterWindow *spliter = new wxSplitterWindow( this , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); spliter->SetMinimumPaneSize(1); //RaC Nov2012 Correctly resize internal panels with the window resize event spliter->SetSashGravity(0.5); @@ -254,8 +257,16 @@ wxwindow = spliter; }else if (nTypeView->size()==3) { - wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); - wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1); + wxSplitterWindow *spliter = new wxSplitterWindow( this , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); + + wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); + spliter->SetMinimumPaneSize(1); spliterA->SetMinimumPaneSize(1); //RaC Nov2012 Correctly resize internal panels with the window resize event @@ -268,9 +279,21 @@ spliterA-> SplitHorizontally( wxwindow2 , wxwindow3 ); wxwindow = spliter; }else if (nTypeView->size()>=4){ - wxSplitterWindow *spliter = new wxSplitterWindow( this , -1); - wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1); - wxSplitterWindow *spliterB = new wxSplitterWindow( spliter , -1); + wxSplitterWindow *spliter = new wxSplitterWindow( this , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); + + wxSplitterWindow *spliterA = new wxSplitterWindow( spliter , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); + + wxSplitterWindow *spliterB = new wxSplitterWindow( spliter , -1, + wxDefaultPosition, + wxDefaultSize, + wxSP_3DSASH | wxSP_LIVE_UPDATE ); + spliter->SetMinimumPaneSize(1); spliterA->SetMinimumPaneSize(1); spliterB->SetMinimumPaneSize(1); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index eaf3975..4448880 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -53,10 +53,14 @@ //------------------------------------------------------------------------------------------------------------ wxMaracas_ViewerWidget::wxMaracas_ViewerWidget(wxWindow *parent, vtkImageData* imagedata, int type, vtkMPRBaseData *vtkmprbasedata,bool TDxWindow) - : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) +// : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL) +: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize) //EED 2023-10-10 : wxPanel( parent, -1, wxDefaultPosition, wxSize(10,10) , wxTAB_TRAVERSAL) { - wxPanel *panel = this; +// wxPanel *panel = this; + wxPanel *panel = new wxPanel(this,-1); + + wxWindow *wxwindow = NULL; wxWindow *window3D = NULL; wxSplitterWindow *panelClipping3D = NULL; @@ -128,7 +132,10 @@ wxwindow=mwxsphereview->GetWxVTKRenderWindowInteractor(); }else if (type==5) { - panelClipping3D = new wxSplitterWindow( panel , -1); + panelClipping3D = new wxSplitterWindow( panel , -1, + wxDefaultPosition, + wxSize(40,40), + wxSP_3DSASH | wxSP_LIVE_UPDATE ); mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata,TDxWindow); mwxvtkclipping3Dview = new wxVtkClipping3DView(mwxvtk3Dbaseview_Clipping3D); vtkClipping3DDataViewer *vtkclipping3Ddataviewer= new vtkClipping3DDataViewer(); @@ -161,9 +168,8 @@ controlPanelClippingVol3D = mwxvtkclipping3Dview->CreateVolControlPanel(notebook); notebook->AddPage(controlPanelClippingVol3D, _T("Volume") ); - panelClipping3D->SplitHorizontally( notebook , window3D , 10 ); - //panelClipping3D->SetMinimumPaneSize( 15 ); - panelClipping3D->SetMinimumPaneSize( 70 ); // JPR + panelClipping3D->SplitHorizontally( window3D ,notebook , 10 ); + panelClipping3D->SetMinimumPaneSize( 20 ); //RaC Nov2012 Correctly resize internal panels with the window resize event panelClipping3D->SetSashGravity(0.5); @@ -187,30 +193,39 @@ wxwindow=panelClipping3D; } else if (type==6) { - panelClipping3D = new wxSplitterWindow( panel , -1); - mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata,TDxWindow); - mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D ); - vtkmpr3Ddataviewer = new vtkMPR3DDataViewer(); - wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor(); - wxPanel *panelControl = new wxPanel(panelClipping3D,-1); - wxPanel *controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelControl, true); + panelClipping3D = new wxSplitterWindow( panel , -1, + wxDefaultPosition, + wxSize(40,40), + wxSP_3DSASH |wxSP_BORDER| wxSP_LIVE_UPDATE ); + mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D , vtkmprbasedata,TDxWindow); + mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D ); + vtkmpr3Ddataviewer = new vtkMPR3DDataViewer(); +// wxPanel *panelControl = new wxPanel(panelClipping3D,-1); +// wxPanel *controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelControl, true); + wxPanel *controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelClipping3D, true); + wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor(); + +// wxBoxSizer *sizerCtrol = new wxBoxSizer(wxHORIZONTAL); +// sizerCtrol->Add(controlPanelMPR3D, 1, wxGROW, 2); + +// panelControl->SetAutoLayout(true); +// panelControl->SetSizer(sizerCtrol); +// panelControl->SetSize(400,350); +// panelControl->Layout(); + + panelClipping3D->SetMinimumPaneSize( 20 ); +// panelClipping3D->SplitHorizontally( panelControl , window3D , 40 ); + panelClipping3D->SplitHorizontally( window3D, controlPanelMPR3D , -160 ); +// panelClipping3D->SplitHorizontally( controlPanelMPR3D , window3D , 0 ); + +// int width,height; +// panelClipping3D->GetClientSize(&width,&height); +// double hh = height; +// double pos = (int)(hh * 82 * 0.01); +// panelClipping3D->SetSashPosition(pos,true); -//2023/1010 wxFlexGridSizer *sizerCtrol = new wxFlexGridSizer(1); -// sizerCtrol->Add(controlPanelMPR3D, 1, wxALL|wxEXPAND, 2); - wxBoxSizer *sizerCtrol = new wxBoxSizer(wxHORIZONTAL); - sizerCtrol->Add(controlPanelMPR3D, 1, wxGROW, 2); - - panelControl->SetAutoLayout(true); - panelControl->SetSizer(sizerCtrol); - panelControl->SetSize(400,350); - panelControl->Layout(); - //panelClipping3D->SetMinimumPaneSize( 5 ); - panelClipping3D->SetMinimumPaneSize( 130 ); // FCY - panelClipping3D->SplitHorizontally( panelControl , window3D , 0 ); - //panelClipping3D->SetSashSize(10); - //RaC Nov2012 Correctly resize internal panels with the window resize event panelClipping3D->SetSashGravity(0.5); panelClipping3D->UpdateSize(); //FCY @@ -232,10 +247,16 @@ sizer->Add( wxwindow, 1, wxGROW); panel->SetSizer(sizer); - panel->SetAutoLayout(true); - sizer->Layout(); - panel->Layout(); - panel->Refresh(); +// panel->SetAutoLayout(true); +// sizer->Layout(); +// panel->Layout(); +// panel->Refresh(); + + wxBoxSizer* finalSizer = new wxBoxSizer(wxVERTICAL); + finalSizer->Add( panel, 1, wxGROW); + this->SetSizer(finalSizer); +// this->SetAutoLayout(true); + this->Layout(); // mbbtkViewerMaracas= NULL; } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx index 90b793d..ec5f412 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx @@ -27,13 +27,17 @@ #include "HistogramDialog.h" #include +#include wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview, bool align ) //: wxPanel(parent, -1,wxDefaultPosition,wxDefaultSize) -: wxPanel(parent, -1,wxDefaultPosition,wxSize(10,10) ) +: wxPanel(parent, -1,wxDefaultPosition,wxSize(20,20) ) { - wxPanel *panel = this; - _wxvtkmpr3Dview = wxvtkmpr3Dview; + wxPanel *panelParent = this; + wxNotebook *notebook = new wxNotebook(panelParent, -1, wxDefaultPosition, wxSize(400,400) ); + wxPanel *panelSlice = new wxPanel(notebook,-1,wxDefaultPosition,wxSize(400,400)); + wxPanel *panelConfig = new wxPanel(notebook,-1,wxDefaultPosition,wxSize(400,400)); + _wxvtkmpr3Dview = wxvtkmpr3Dview; /*int maxX = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionX(); int maxY = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetMaxPositionY(); @@ -54,46 +58,44 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV wxButton *btnColorTable = new wxButton (panel, -1, _T("Edit Color Table") ); */ - _ckBoxX = new wxCheckBox(panel,-1,_T("X ")); // X plano YZ - _positionX = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS); - _ckBoxY = new wxCheckBox(panel,-1,_T("Y ")); // Y plano XZ - _positionY = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS); - _ckBoxZ = new wxCheckBox(panel,-1,_T("Z ")); // Z plano XY - _positionZ = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS); - - _ckBoxXYZ = new wxCheckBox(panel,-1,_T("3D Axis ")); - _ckBoxFixAxis2D = new wxCheckBox(panel,-1,_T("2D Fix Axis")); - _opacityAxis = new wxSlider(panel,-1,99,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS); - - _ckBoxPlane = new wxCheckBox(panel,-1,_T("Plane")); + _ckFreePlaneX = new wxCheckBox(panelSlice,-1,_T("Sag.")); + _ckFreePlaneY = new wxCheckBox(panelSlice,-1,_T("Cor.")); + _ckFreePlaneZ = new wxCheckBox(panelSlice,-1,_T("Axi.")); + _ckFreePlaneX->SetValue(false); + _ckFreePlaneY->SetValue(false); + _ckFreePlaneZ->SetValue(false); + + _positionX = new wxSlider(panelSlice,-1,0,0,1, wxDefaultPosition, wxSize(2000,35), wxSL_HORIZONTAL | wxSL_LABELS); + _positionY = new wxSlider(panelSlice,-1,0,0,1, wxDefaultPosition, wxSize(2000,35), wxSL_HORIZONTAL | wxSL_LABELS); + _positionZ = new wxSlider(panelSlice,-1,0,0,1, wxDefaultPosition, wxSize(2000,35), wxSL_HORIZONTAL | wxSL_LABELS); + + _ckBoxX = new wxCheckBox(panelConfig,-1,_T("X CL ")); // X plano YZ + _ckBoxY = new wxCheckBox(panelConfig,-1,_T("Y CL ")); // Y plano XZ + _ckBoxZ = new wxCheckBox(panelConfig,-1,_T("Z CL ")); // Z plano XY + _ckBoxX->SetValue(false); + _ckBoxY->SetValue(false); + _ckBoxZ->SetValue(false); + + _ckBoxXYZ = new wxCheckBox(panelConfig,-1,_T("3D Axis ")); + _ckBoxFixAxis2D = new wxCheckBox(panelConfig,-1,_T("2D Fix Axis")); + _opacityAxis = new wxSlider(panelConfig,-1,99,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS); + _ckBoxPlane = new wxCheckBox(panelConfig,-1,_T("Plane")); ////EED 05Nov2012 _ckBox_BW_Color_Plane = new wxCheckBox(panel,-1,_T("GL/Color")); - wxButton *btnColorTable = new wxButton (panel, -1, _T("Color table") ); - wxButton *btnFreePlanesOrtho= new wxButton (panel, -1, _T("Orthogonal planes GL") ); + wxButton *btnColorTable = new wxButton (panelConfig, -1, _T("Color table") ); + wxButton *btnFreePlanesOrtho= new wxButton (panelConfig, -1, _T("Orthogonal planes GL") ); + _ckFreePlaneInteraction = new wxCheckBox(panelConfig,-1,_T("Interaction planes GL")); + _ckFreePlaneInteraction->SetValue(false); - _ckFreePlaneX= new wxCheckBox(panel,-1,_T("Sagittal ")); - _ckFreePlaneY= new wxCheckBox(panel,-1,_T("Coronal ")); - _ckFreePlaneZ= new wxCheckBox(panel,-1,_T("Axial ")); - _ckFreePlaneInteraction= new wxCheckBox(panel,-1,_T("Interaction planes GL")); - - //EED: If-else statements added 30 Nov 2009 - _ckFreePlaneX->SetValue(false); - _ckFreePlaneY->SetValue(false); - _ckFreePlaneZ->SetValue(false); - _ckFreePlaneInteraction->SetValue(true); - - _ckBoxX->SetValue(false); - _ckBoxY->SetValue(false); - _ckBoxZ->SetValue(false); _ckBoxXYZ->SetValue(false); ////EED 05Nov2012 _ckBox_BW_Color_Plane->SetValue(true); _ckBoxPlane->SetValue(false); - _ckBoxInterpolate= new wxCheckBox(panel,-1,_T("Interpolate")); + _ckBoxInterpolate= new wxCheckBox(panelConfig,-1,_T("Interpolate")); _ckBoxInterpolate->SetValue(true); - _ckBoxOutlineBox = new wxCheckBox(panel,-1,_T("Outline Box")); + _ckBoxOutlineBox = new wxCheckBox(panelConfig,-1,_T("Outline Box")); _ckBoxOutlineBox->SetValue(false); - _ckBoxOutlinePlane = new wxCheckBox(panel,-1,_T("Outline Plane")); + _ckBoxOutlinePlane = new wxCheckBox(panelConfig,-1,_T("Outline Plane")); _ckBoxOutlinePlane->SetValue(true); // _ckBoxBackGroundBlack= new wxCheckBox(panel,-1,_T("Background Black"));; @@ -102,7 +104,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV // _ckBoxBackGroundBlack= new wxCheckBox(panel,-1,_T("Background Black"));; // _ckBoxBackGroundBlack->SetValue(false); - wxPanel *panelH7 = new wxPanel(panel); + wxPanel *panelH7 = new wxPanel(panelConfig); _rdBackGroundGradient = new wxRadioButton( panelH7, -1, _T("Background Gradient"),wxDefaultPosition, wxDefaultSize, wxRB_GROUP); _rdBackGroundBlack = new wxRadioButton( panelH7, -1, _T("Background Black"),wxDefaultPosition, wxDefaultSize, 0); @@ -117,7 +119,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV // _positionZ->SetSize(400,20); // Stereo - _cbStereo = new wxComboBox(panel, -1, _T(""), wxDefaultPosition, wxDefaultSize, 0, NULL,wxCB_READONLY ); + _cbStereo = new wxComboBox(panelConfig, -1, _T(""), wxDefaultPosition, wxDefaultSize, 0, NULL,wxCB_READONLY ); _cbStereo->Append(_T(" * NO STEREO")); _cbStereo->Append(_T(" STEREO CRYSTAL EYES")); _cbStereo->Append(_T(" STEREO RED BLUE")); @@ -162,61 +164,52 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV Connect(_ckBoxFixAxis2D->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFixAxis2D ); Connect(_opacityAxis->GetId() , wxEVT_COMMAND_SLIDER_UPDATED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOpacityAxis ); - wxFlexGridSizer *sizer; - + wxFlexGridSizer *sizerSlice; + wxFlexGridSizer *sizerConfig; + // wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); // wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL); //CPR: If-else statements added 30 Nov 2009 wxFlexGridSizer *sizerV1; wxFlexGridSizer *sizerH4; - wxFlexGridSizer *sizerH4a; wxFlexGridSizer *sizerH5; + wxFlexGridSizer *sizerH5a; wxFlexGridSizer *sizerH6; wxFlexGridSizer *sizerH7; + wxFlexGridSizer *sizerH8; if(align) { - sizer = new wxFlexGridSizer(4); - sizerH4 = new wxFlexGridSizer(3); - sizerH4a = new wxFlexGridSizer(3); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T("GL")) ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T("Color ")),1, wxALL|wxEXPAND , 0); - sizerH4->Add( _positionX ,1, wxGROW , 0); - sizerH4->Add( _ckFreePlaneX ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( _ckBoxX ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); - sizerH4->Add( _positionY ,1, wxGROW , 0); - sizerH4->Add( _ckFreePlaneY ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( _ckBoxY ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); - sizerH4->Add( _positionZ ,1, wxGROW , 0); - sizerH4->Add( _ckFreePlaneZ ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( _ckBoxZ ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); -//EED 2016/02/19 - sizerH4->Add( _ckBoxInterpolate ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); -// sizerH4->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0); -// sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); -// sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); -// sizerH4a->Add( new wxStaticText(panel, -1,_T("Axis 2D:")),1, wxALL|wxEXPAND , 0); - sizerH4a->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0); - sizerH4a->Add( _ckBoxFixAxis2D ,1, wxALL|wxEXPAND , 0); - sizerH4a->Add( _opacityAxis ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( sizerH4a ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); - sizerH4->Add( new wxStaticText(panel, -1,_T(" ")) ,1, wxALL|wxEXPAND , 0); + sizerSlice = new wxFlexGridSizer(4); + sizerH4 = new wxFlexGridSizer(2); + sizerH4->Add( _ckFreePlaneX ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _positionX ,1, wxGROW , 0); + sizerH4->Add( _ckFreePlaneY ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _positionY ,1, wxGROW , 0); + sizerH4->Add( _ckFreePlaneZ ,1, wxALL|wxEXPAND , 0); + sizerH4->Add( _positionZ ,1, wxGROW , 0); + sizerSlice->Add( sizerH4, 1, wxGROW, 2); + + + sizerConfig = new wxFlexGridSizer(4); + sizerH8 = new wxFlexGridSizer(3); + sizerH8->Add( _ckBoxX ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH8->Add( _ckBoxZ ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH8->Add( _ckBoxY ,0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); + sizerH5a = new wxFlexGridSizer(3); + sizerH5a->Add( _ckBoxXYZ ,1, wxALL|wxEXPAND , 0); + sizerH5a->Add( _ckBoxFixAxis2D ,1, wxALL|wxEXPAND , 0); + sizerH5 = new wxFlexGridSizer(1); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); - sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND , 0); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( sizerH8 , 1, wxALL|wxEXPAND , 0); ////EED 05Nov2012 sizerH5->Add( _ckBox_BW_Color_Plane , 1, wxALL|wxEXPAND , 0); sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0); sizerH5->Add( btnFreePlanesOrtho , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); sizerH5->Add( btnColorTable , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED , 0); - sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); - sizerH5->Add( _cbStereo , 1, wxALL|wxEXPAND , 0); - sizerH6 = new wxFlexGridSizer(1); + sizerH5->Add( _cbStereo , 1, wxALL|wxEXPAND , 0); + sizerH5->Add( _opacityAxis ,1, wxALL|wxEXPAND , 0); + sizerH6 = new wxFlexGridSizer(1); sizerH6->Add( _ckBoxOutlineBox , 1, wxALL|wxEXPAND , 0); sizerH6->Add( _ckBoxOutlinePlane , 1, wxALL|wxEXPAND , 0); sizerH7 = new wxFlexGridSizer(1); @@ -224,12 +217,17 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV sizerH7->Add( _rdBackGroundGradient , 1, wxALL|wxEXPAND , 0); sizerH7->Add( _rdBackGroundBlack , 1, wxALL|wxEXPAND , 0); sizerH7->Add( _rdBackGroundWhite , 1, wxALL|wxEXPAND , 0); - sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH6->Add( new wxStaticText(panelConfig, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); sizerH6->Add( panelH7 , 1, wxALL|wxEXPAND , 0); - sizer->Add( sizerH4, 1, wxALL|wxGROW, 2); - sizer->Add( sizerH5, 1, wxALL|wxEXPAND,2); - sizer->Add( sizerH6, 1, wxALL|wxEXPAND,2); + sizerH6->Add( new wxStaticText(panelConfig, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0); + sizerH6->Add( _ckBoxInterpolate ,1, wxALL|wxEXPAND , 0); + sizerH6->Add( sizerH5a ,1, wxALL|wxEXPAND , 0); + + sizerConfig->Add( sizerH5, 1, wxALL|wxEXPAND,2); + sizerConfig->Add( sizerH6, 1, wxALL|wxEXPAND,2); } else { + printf("EED wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel (align==false) This Sizer have to be reorginized.....\n "); + /* sizer = new wxFlexGridSizer(1); sizerH4 = new wxFlexGridSizer(10); sizerH5 = new wxFlexGridSizer(10); @@ -260,6 +258,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV sizer->Add( sizerH4, 1, wxALL|wxGROW, 2); sizer->Add( sizerH5, 1, wxALL|wxEXPAND,2); sizer->Add( sizerH6, 1, wxALL|wxEXPAND,2); + */ } //EED 28 sep 2006 // wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10); @@ -282,16 +281,28 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV // sizerH5->Add( ckBoxX , 1, wxALL|wxEXPAND, 0); // sizerH5->Add( ckBoxY , 1, wxALL|wxEXPAND, 0); // sizerH5->Add( ckBoxZ , 1, wxALL|wxEXPAND, 0); + panelH7->SetAutoLayout(true); panelH7->Layout(); - panel->ClearBackground(); -// panel->SetSize(400,50); +// panel->ClearBackground(); + + // panel->SetSize(400,50); // sizer->FitInside(panel); - panel->SetSizer(sizer); - panel->SetAutoLayout(true); - panel->Layout(); - panel->SetEventHandler((wxEvtHandler*)this); + panelSlice->SetSizer(sizerSlice); + panelConfig->SetSizer(sizerConfig); +// panel->SetAutoLayout(true); +// panel->Layout(); +// panel->SetEventHandler((wxEvtHandler*)this); //this->UpdateControlPanel(); + + notebook->AddPage( panelSlice , _T("Slice") ); + notebook->AddPage( panelConfig , _T("Conf") ); + wxBoxSizer *sizerParent = new wxBoxSizer(wxHORIZONTAL); + sizerParent -> Add( notebook,1,wxGROW,0 ); + panelParent -> SetSizer(sizerParent); + panelParent -> SetAutoLayout(true); + panelParent -> Layout(); + SetAutoLayout(true); Layout(); } -- 2.49.0