]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkClipping3DView.cxx
Diego Caceres: creaButtonContainer & creaPanelButtonContainer changes
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkClipping3DView.cxx
index 5408597346f24748df7880e91e616395f74bf095..db0a4698da361ab97bd7273ca366d691418df3aa 100644 (file)
@@ -68,15 +68,15 @@ wxPanel* wxVtkClipping3DView::CreateVolControlPanel(wxWindow *parent)
 //-------------------------------------------------------------------
 vtkClipping3DDataViewer* wxVtkClipping3DView::GetVtkClipping3DDataViewer()
 {
-       return _vtkclipping3Ddataviewer; 
+       return _vtkclipping3Ddataviewer;
 }
 //-------------------------------------------------------------------
 void wxVtkClipping3DView::VisibleActor(int idTissue, bool visTissue){
        if (visTissue!=_vtkclipping3Ddataviewer->GetVisibleTissue(idTissue)){
                if (visTissue==false){
-                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );    
+                       _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );
                } else {
-                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );       
+                       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );
 //                     _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(idTissue) );
 //                     _actor->VisibilityOn();
                }
@@ -102,13 +102,13 @@ void wxVtkClipping3DView::SetRepSurfaceWireFrame(int idTissue , bool representat
 void wxVtkClipping3DView::VisibleVolumeActor( bool visVolume){
        if (visVolume!=_vtkclipping3Ddataviewer->GetVisibleVolume() ){
                if (visVolume==false){
-//EED 31/03/2008                       
-//                     _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );    
-                       _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );   
+//EED 31/03/2008
+//                     _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );
+                       _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );
                } else {
-//EED 31/03/2008                       
-//                     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );        
-                       _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );       
+//EED 31/03/2008
+//                     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );
+                       _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );
                }
                _vtkclipping3Ddataviewer->SetVisibleVolume(visVolume);
        }
@@ -125,8 +125,8 @@ wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview()throw(char*)
 void wxVtkClipping3DView::Configure(){
        _wxvtk3Dbaseview->Configure();
 
-       // Actors are added to the renderer. 
-       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );                       
+       // Actors are added to the renderer.
+       _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );
 
        _boxWidgetS1 = vtkBoxWidget::New();
        _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
@@ -136,7 +136,7 @@ void wxVtkClipping3DView::Configure(){
 
        vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
        vtkPolyData *polydata= stripper->GetOutput();
+
 
        _boxWidgetS1->SetInput( polydata );
        _boxWidgetS1->PlaceWidget();
@@ -150,8 +150,8 @@ void wxVtkClipping3DView::Configure(){
 
 
 
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(0) );                       
-//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(3));                        
+//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(0) );
+//     _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(3));
 
        VisibleActor(0, false );
        VisibleActor(1, false );
@@ -159,17 +159,17 @@ void wxVtkClipping3DView::Configure(){
        VisibleActor(3, false );
 
        _boxWidgetS1->HandlesOn ();
-       
-//EED 29Mars2009       
+
+//EED 29Mars2009
 //     _boxWidgetS1->On();
-       
+
        _boxWidgetS1->Off();
 
        _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
        _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(1) );
        _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(2) );
        _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(3) );
-       
+
 // EED 9 fev 2007
 // box Volume
        _boxWidgetVolume = vtkBoxWidget::New();
@@ -182,10 +182,10 @@ void wxVtkClipping3DView::Configure(){
        _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent              , _vtkclipping3Ddataviewer->GetObserverV() );
 
        _boxWidgetVolume->HandlesOn ();
-       
-//EED 29Mars2009       
+
+//EED 29Mars2009
 //     _boxWidgetVolume->On();
-       
+
        _boxWidgetVolume->Off();
 
 
@@ -193,7 +193,7 @@ void wxVtkClipping3DView::Configure(){
 //     _boxWidgetVolume->GetPlanes( vtkplanes );
 
 
-  // An initial camera view is created.  The Dolly() method moves 
+  // An initial camera view is created.  The Dolly() method moves
   // the camera towards the FocalPoint, thereby enlarging the image.
   _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
   _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
@@ -206,7 +206,7 @@ void wxVtkClipping3DView::Configure(){
 
   // Note that when camera movement occurs (as it does in the Dolly()
   // method), the clipping planes often need adjusting. Clipping planes
-  // consist of two planes: near and far along the view direction. The 
+  // consist of two planes: near and far along the view direction. The
   // near plane clips out objects in front of the plane; the far plane
   // clips out objects behind the plane. This way only what is drawn
   // between the planes is actually rendered.
@@ -217,3 +217,29 @@ void wxVtkClipping3DView::SetVtkClipping3DDataViewer(vtkClipping3DDataViewer *vt
 {
        _vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
 }
+
+void wxVtkClipping3DView::SetRayCasting(bool active)
+{
+    _vtkclipping3Ddataviewer->SetRayCasting(active);
+    _vtkclipping3Ddataviewer->updateVolume();
+}
+
+void wxVtkClipping3DView::SetMIPActive(bool active)
+{
+    _vtkclipping3Ddataviewer->SetMIPActive(active);
+    _vtkclipping3Ddataviewer->updateVolume();
+}
+
+void wxVtkClipping3DView::SetInterpolation(bool active)
+{
+    _vtkclipping3Ddataviewer->SetInterpolation(active);
+    _vtkclipping3Ddataviewer->updateVolume();
+}
+
+void wxVtkClipping3DView::SetShade(bool active)
+{
+    _vtkclipping3Ddataviewer->SetShade(active);
+    _vtkclipping3Ddataviewer->updateVolume();
+}
+
+