Program: wxMaracas
Module: $RCSfile: wxMaracas_ViewerWidget.cxx,v $
Language: C++
- Date: $Date: 2010/01/21 13:54:15 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2010/03/05 23:03:18 $
+ Version: $Revision: 1.23 $
Copyright: (c) 2002, 2003
License:
// Definition includes
//------------------------------------------------------------------------------------------------------------
#include "wxMaracas_ViewerWidget.h"
-
+#include <wx/notebook.h>
//------------------------------------------------------------------------------------------------------------
// Other includes
//------------------------------------------------------------------------------------------------------------
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
{
wxPanel *panel = this;
- wxWindow *wxwindow = NULL, *window3D = 0;
- double xSpacing, ySpacing, zSpacing;
- int xMin, xMax, yMin, yMax, zMin, zMax;
- wxSplitterWindow *panelClipping3D = 0;
- wxPanel *panelControl = 0, *controlPanelMPR3D = 0, *controlPanelClipping3D = 0;
- wxFlexGridSizer *sizerCtrol = 0;
- vtkCellPicker* picker = 0;
- wxBoxSizer *sizer = 0;
+ wxWindow *wxwindow = NULL, *window3D = 0;
+ wxSplitterWindow *panelClipping3D = 0;
+// wxPanel *panelControl = 0;
+// wxFlexGridSizer *sizerCtrol = 0;
+ wxPanel *controlPanelMPR3D = 0;
+ wxPanel *controlPanelClipping3D = 0;
+ wxBoxSizer *sizer = 0;
mType = type;
vtkmpr3Ddataviewer->Configure();
mwxvtkmpr3Dview->SetVtkMPR3DDataViewer(vtkmpr3Ddataviewer);
- window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
+ window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
+
+//--
+ wxNotebook *notebook = new wxNotebook(panelClipping3D, -1);
+ controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(notebook, true);
+ controlPanelClipping3D = mwxvtkclipping3Dview->CreateControlPanel(notebook);
+ notebook->AddPage(controlPanelMPR3D, _T("Planes") );
+ notebook->AddPage(controlPanelClipping3D, _T("Volume / Surface") );
+ panelClipping3D -> SplitHorizontally( notebook , window3D , 10 );
+ panelClipping3D -> SetMinimumPaneSize( 15 );
+
+ /* EED 04 / Febrary / 2010
panelControl = new wxPanel(panelClipping3D,-1);
controlPanelMPR3D = mwxvtkmpr3Dview->CreateControlPanel(panelControl, false);
controlPanelClipping3D = mwxvtkclipping3Dview->CreateControlPanel(panelControl);
// mbtnCutImageData = new wxCheckBox(panelControl,-1,_T("Cut Module"));
// Connect(_btnCutImageData->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED , (wxObjectEventFunction) &wxMPRWidget::OnCutImagaData );
-
sizerCtrol = new wxFlexGridSizer(1);
sizerCtrol->Add(controlPanelMPR3D , 1, wxALL|wxEXPAND, 2);
sizerCtrol->Add(controlPanelClipping3D , 1, wxALL|wxEXPAND, 2);
// sizerCtrol->Add( mbtnCutImageData , 1, wxALL, 2);
-
panelControl->SetAutoLayout(true);
panelControl->SetSizer(sizerCtrol);
panelControl->SetSize(400,350);
panelControl->Layout();
- panelClipping3D -> SetMinimumPaneSize( 5 );
panelClipping3D -> SplitHorizontally( panelControl , window3D , 10 );
+ panelClipping3D -> SetMinimumPaneSize( 5 );
+ */
wxwindow=panelClipping3D;
- }else if (type==6)
- {
+
+ } else if (type==6) {
panelClipping3D = new wxSplitterWindow( panel , -1);
mwxvtk3Dbaseview_Clipping3D = new wxVtk3DBaseView( panelClipping3D );
mwxvtkmpr3Dview = new wxVtkMPR3DView( mwxvtk3Dbaseview_Clipping3D );
-
vtkmpr3Ddataviewer = new vtkMPR3DDataViewer();
-
-
-
wxWindow *window3D = mwxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
wxPanel *panelControl = new wxPanel(panelClipping3D,-1);
*/
ckBoxX = new wxCheckBox(panel,-1,_T("X "));
- _positionX = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+ _positionX = new wxSlider(panel,-1,maxX/2,0,maxX, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
ckBoxY = new wxCheckBox(panel,-1,_T("Y "));
- _positionY = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
+ _positionY = new wxSlider(panel,-1,maxY/2,0,maxY, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
ckBoxZ = new wxCheckBox(panel,-1,_T("Z "));
- _positionZ = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxSize(150,40), wxSL_HORIZONTAL | wxSL_LABELS);
- wxButton *btnColorTable = new wxButton (panel, -1, _T("Edit Color Table") );
+ _positionZ = new wxSlider(panel,-1,maxZ/2,0,maxZ, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
+ wxButton *btnColorTable = new wxButton (panel, -1, _T("Color Table") );
_ckBoxXYZ = new wxCheckBox(panel,-1,_T("XYZ "));
_ckBoxPlane = new wxCheckBox(panel,-1,_T("Plane"));
- _ckFreePlaneX= new wxCheckBox(panel,-1,_T("Free plane X "));;
- _ckFreePlaneY= new wxCheckBox(panel,-1,_T("Free plane Y "));;
- _ckFreePlaneZ= new wxCheckBox(panel,-1,_T("Free plane Z "));;
- _ckFreePlaneInteraction= new wxCheckBox(panel,-1,_T("Free pnale interaction "));;
+ _ckFreePlaneX= new wxCheckBox(panel,-1,_T("free X"));;
+ _ckFreePlaneY= new wxCheckBox(panel,-1,_T("free Y"));;
+ _ckFreePlaneZ= new wxCheckBox(panel,-1,_T("free Z"));;
+ _ckFreePlaneInteraction= new wxCheckBox(panel,-1,_T("Interaction "));;
//EED: If-else statements added 30 Nov 2009
wxFlexGridSizer *sizerH6;
if(align)
{
- sizer = new wxFlexGridSizer(2);
+ sizer = new wxFlexGridSizer(3);
sizerH4 = new wxFlexGridSizer(2);
sizerH4->Add( _positionX ,1,wxGROW , 0 );
sizerH5->Add( btnColorTable , 0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
//sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
- }
- else
- {
+ sizerH6 = new wxFlexGridSizer(1);
+ sizerH6->Add( _ckFreePlaneX , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneY , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneZ , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0);
+
+ } else {
sizer = new wxFlexGridSizer(1);
sizerH4 = new wxFlexGridSizer(10);
sizerH5->Add( _ckBoxXYZ , 1, wxALL|wxEXPAND, 0);
sizerH5->Add( _ckBoxPlane , 1, wxALL|wxEXPAND, 0);
sizerH5->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0);
-
+
+ sizerH6 = new wxFlexGridSizer(10);
+ sizerH6->Add( _ckFreePlaneX , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneY , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneZ , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
+ sizerH6->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0);
}
+
+
- sizerH6 = new wxFlexGridSizer(10);
- sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( _ckFreePlaneX , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( _ckFreePlaneY , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( _ckFreePlaneZ , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND , 0);
- sizerH6->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND , 0);
//EED 28 sep 2006
// wxFlexGridSizer *sizerH6 = new wxFlexGridSizer(10);
void wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX(wxCommandEvent& event)
{
_wxvtkmpr3Dview->FreePlaneVisible( 1, event.IsChecked() );
+ _wxvtkmpr3Dview->FreePlaneInteraction( _ckFreePlaneInteraction->GetValue() );
}
//-------------------------------------------------------------------
void wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY(wxCommandEvent& event)
{
_wxvtkmpr3Dview->FreePlaneVisible( 2, event.IsChecked() );
+ _wxvtkmpr3Dview->FreePlaneInteraction( _ckFreePlaneInteraction->GetValue() );
}
void wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ(wxCommandEvent& event)
{
_wxvtkmpr3Dview->FreePlaneVisible( 3, event.IsChecked() );
+ _wxvtkmpr3Dview->FreePlaneInteraction( _ckFreePlaneInteraction->GetValue() );
}