]> Creatis software - creaMaracasVisu.git/commitdiff
#3020 creaMaracasVisu Bug New Normal - ViewerNV opacity, isovalue slice (size)
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 27 Sep 2016 13:12:50 +0000 (15:12 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Tue, 27 Sep 2016 13:12:50 +0000 (15:12 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInteractorStyleBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracas_ViewerWidget.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DViewCntrlPanel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx

index 21f323355704a8f0f3dfa44691286b4d6c9ada41..7de94728684a266196798e1dec5366e55a94741b 100644 (file)
@@ -114,10 +114,6 @@ void vtkInteractorStyleBaseView::OnMouseWheelBackward() // virtual
 {
        CallLstInteractorStyleMaracas( 16 );
 }
-
-
-
-
 //---------------------------------------------------------------------------
 void vtkInteractorStyleBaseView::AddInteractorStyleMaracas(InteractorStyleMaracas* interactorStyleMaracas)
 {
index 9fee22620db3f2a3efdbf636276225a123a8e24b..258bf30de00b84989bb51c5e8d3c58fbbeac7947 100644 (file)
@@ -66,7 +66,7 @@
                //RaC 03-2010 Adding a tab
                wxPanel                         *controlPanelClippingVol3D      = NULL;
 
-               wxBoxSizer *sizer                       = 0;
+               wxBoxSizer *sizer                                                               = 0;
 
                mType = type;
 
index 7fe9af330ce8851026cd0c45860b392ff205fb44..da8764c2c9ff569dec6f1d5c16073b0b682015bd 100644 (file)
@@ -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);
index bee80ab5f755e8b6148bc42a8e5e2066f5f2f3bf..35cf7c7358fb1afb96be073af98215c91d0ff3d9 100644 (file)
@@ -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