From 76820b27f1b2256fc0b6849ee77181d46891baa6 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Tue, 27 Sep 2016 15:12:50 +0200 Subject: [PATCH] #3020 creaMaracasVisu Bug New Normal - ViewerNV opacity, isovalue slice (size) --- .../widgets/vtkInteractorStyleBaseView.cxx | 4 ---- .../widgets/wxMaracas_ViewerWidget.cxx | 2 +- .../widgets/wxVtkClipping3DViewCntrlPanel.cxx | 20 +++++++++---------- .../wxWindows/widgets/wxVtkMPR2DView.cxx | 8 ++++---- 4 files changed, 15 insertions(+), 19 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx index 21f3233..7de9472 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx @@ -114,10 +114,6 @@ void vtkInteractorStyleBaseView::OnMouseWheelBackward() // virtual { CallLstInteractorStyleMaracas( 16 ); } - - - - //--------------------------------------------------------------------------- void vtkInteractorStyleBaseView::AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas) { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx index 9fee226..258bf30 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx @@ -66,7 +66,7 @@ //RaC 03-2010 Adding a tab wxPanel *controlPanelClippingVol3D = NULL; - wxBoxSizer *sizer = 0; + wxBoxSizer *sizer = 0; mType = type; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx index 7fe9af3..da8764c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx @@ -48,7 +48,6 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w _surfC = new wxRadioButton(panel,-1,_T("C")); _surfD = new wxRadioButton(panel,-1,_T("D")); - //RaC 03-2010 Divides in two panels thje last tab Surface/Volume //wxCheckBox *ckVolum = new wxCheckBox(panel,-1,_T("Vol")); wxCheckBox *ckBoxSurface = new wxCheckBox(panel,-1,_T("Surface Box")); @@ -58,23 +57,20 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w _color = new wxButton(panel,-1,_T("")); _visible = new wxCheckBox(panel,-1,_T("Vis")); - _opacity = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL | wxSL_LABELS); + _opacity = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS); wxStaticText *isoValueTitle = new wxStaticText(panel,-1,_T("isoValue")); - _isoValue = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(800,40), wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS); - + _isoValue = new wxSlider(panel,-1,2000,110,2000, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS); _wireFrameRep = new wxRadioButton(panel,-1,_T("WireFrame"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); _surfaceRep = new wxRadioButton(panel,-1,_T("Surface")); - double range[2]; vtkImageData *vtkimagedata = wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData(); vtkimagedata->GetScalarRange( range ); _isoValue->SetRange( (int)(range[1]*0.1) , (int)(range[1]) ); _isoValue->SetValue( (int)(wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetIsovalue(0)) ); - _isoValue->SetTickFreq(25,0); _isoValueSpin = new wxSlider(panel , -1,5,1,10,wxDefaultPosition , wxSize(25,45), wxSL_VERTICAL | wxSL_AUTOTICKS |wxSL_LEFT ); @@ -182,11 +178,11 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w sizerH1->Add( _surfA , 1, wxALL|wxEXPAND, 0); - sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); sizerH1->Add( _surfB , 1, wxALL|wxEXPAND, 0); - sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); sizerH1->Add( _surfC , 1, wxALL|wxEXPAND, 0); - sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); sizerH1->Add( _surfD , 1, wxALL|wxEXPAND, 0); sizerH1->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); sizerH1->Add( ckBoxSurface , 1, wxALL|wxEXPAND, 0); @@ -208,13 +204,17 @@ wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel(wxWindow *parent, w sizerH2->Add( _surfaceRep , 1,wxSHAPED | wxALIGN_CENTER_VERTICAL , 0); sizerH2->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); - sizerH2->Add( _opacity , 1, wxALL|wxEXPAND, 0); sizerH3->Add( isoValueTitle , 1, wxALL|wxEXPAND, 0); sizerH3->Add( _isoValueSpin , 1, wxALL|wxEXPAND, 0); sizerH3->Add( _isoValue , 1, wxALL|wxEXPAND, 0); + sizerH3->Add( new wxStaticText(panel, -1,_T(" ")) , 1, wxALL|wxEXPAND, 0); + sizerH3->Add( new wxStaticText(panel, -1,_T("Opacity:")) , 1, wxALL|wxEXPAND, 0); + sizerH3->Add( _opacity , 1, wxALL|wxEXPAND, 0); + + /* sizerH4->Add( ckBoxX , 1, wxALL|wxEXPAND, 0); sizerH4->Add( text2 , 1, wxALL|wxEXPAND, 0); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx index bee80ab..35cf7c7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx @@ -248,7 +248,8 @@ void wxVtkMPR2DView::Refresh() double xx1,yy1,zz1,xx2,yy2,zz2; vtkImageData* img = GetVtkmprbasedata()->GetImageData(); - if(img!=NULL){ + if(img!=NULL) + { origin = img->GetOrigin(); img->GetExtent(x1,x2,y1,y2,z1,z2); spc = img->GetSpacing(); @@ -288,7 +289,6 @@ void wxVtkMPR2DView::Refresh() y = yy*spc[1]; z = zz*spc[2]; - if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) { if (_direction==0) { // YZ @@ -344,11 +344,11 @@ void wxVtkMPR2DView::Refresh() _ptsB->SetPoint(1, x , yy2, z1 ); - } + } // if back _backX=xx; _backY=yy; _backZ=zz; - } + } // if image //EED 2016/02/19 -- 2.47.1