wxVtkClipping3DView Class Reference

#include <wxVtkClipping3DView.h>

Collaboration diagram for wxVtkClipping3DView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxVtkClipping3DView (wxVtk3DBaseView *wxvtk3Dbaseview)
virtual ~wxVtkClipping3DView ()
virtual void Refresh ()
virtual void Configure ()
void SetVtkClipping3DDataViewer (vtkClipping3DDataViewer *vtkclipping3Ddataviewer)
wxPanel * CreateSurfControlPanel (wxWindow *parent)
wxPanel * CreateVolControlPanel (wxWindow *parent)
vtkClipping3DDataViewerGetVtkClipping3DDataViewer ()
void VisibleActor (int idTissue, bool visTissue)
void VisibleVolumeActor (bool visVolume)
void SetVisibleBoxSurface (bool visible)
void SetVisibleBoxVolume (bool visible)
void SetRepSurfaceWireFrame (int idTissue, bool typeRepresentation)
wxVtk3DBaseViewGetWxvtk3Dbaseview () throw (char*)

Private Attributes

wxVtk3DBaseView_wxvtk3Dbaseview
vtkClipping3DDataViewer_vtkclipping3Ddataviewer
vtkBoxWidget * _boxWidgetS1
vtkBoxWidget * _boxWidgetVolume
wxPanel * _wxvtkclipping3DviewCntrlPanel
wxPanel * _wxvtkclipping3DviewVolCntrlPanel

Detailed Description

Definition at line 11 of file wxVtkClipping3DView.h.


Constructor & Destructor Documentation

wxVtkClipping3DView::wxVtkClipping3DView ( wxVtk3DBaseView wxvtk3Dbaseview  ) 

Definition at line 6 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1, _boxWidgetVolume, _vtkclipping3Ddataviewer, _wxvtk3Dbaseview, and _wxvtkclipping3DviewCntrlPanel.

00007 {
00008         _wxvtk3Dbaseview                                =       wxvtk3Dbaseview;
00009         _vtkclipping3Ddataviewer                =       NULL;
00010         _wxvtkclipping3DviewCntrlPanel  =       NULL;
00011 
00012         _boxWidgetVolume                                =       NULL;
00013         _boxWidgetS1                                    =       NULL;
00014 }

wxVtkClipping3DView::~wxVtkClipping3DView (  )  [virtual]

Definition at line 17 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1, _boxWidgetVolume, _vtkclipping3Ddataviewer, and _wxvtkclipping3DviewCntrlPanel.

00017                                          {
00018         if (_boxWidgetVolume!=NULL)                              { _boxWidgetVolume     -> Delete();                                    }
00019         if (_boxWidgetS1!=NULL)                                  { _boxWidgetS1         -> Delete();                                    }
00020         if (_vtkclipping3Ddataviewer!=NULL)              { delete _vtkclipping3Ddataviewer;                     }
00021         if (_wxvtkclipping3DviewCntrlPanel!=NULL){ delete _wxvtkclipping3DviewCntrlPanel;       }
00022 }


Member Function Documentation

void wxVtkClipping3DView::Configure (  )  [virtual]

Definition at line 125 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1, _boxWidgetVolume, _vtkclipping3Ddataviewer, _wxvtk3Dbaseview, wxVtk3DBaseView::Configure(), wxVtk3DBaseView::GetCamera(), vtkClipping3DDataViewer::GetObserverS(), vtkClipping3DDataViewer::GetObserverV(), vtkClipping3DDataViewer::GetOutlineActor(), wxVtk3DBaseView::GetRenderer(), wxVtk3DBaseView::GetRenWin(), vtkClipping3DDataViewer::GetTissueStripper(), GetVtkClipping3DDataViewer(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), VisibleActor(), and VTKMPRDATA_MAXTISSUE.

00125                                    {
00126         _wxvtk3Dbaseview->Configure();
00127 
00128         // Actors are added to the renderer. 
00129         _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetOutlineActor() );                       
00130 
00131         _boxWidgetS1 = vtkBoxWidget::New();
00132         _boxWidgetS1->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
00133         _boxWidgetS1->SetPlaceFactor(1.25);
00134 
00135 
00136 
00137         vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
00138         vtkPolyData *polydata= stripper->GetOutput();
00139  
00140 
00141         _boxWidgetS1->SetInput( polydata );
00142         _boxWidgetS1->PlaceWidget();
00143 
00144         int i;
00145         for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
00146         {
00147                 _boxWidgetS1->AddObserver( vtkCommand::InteractionEvent          , _vtkclipping3Ddataviewer->GetObserverS(i) );
00148         }
00149 
00150 
00151 
00152 
00153 //      _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(0) );                       
00154 //      _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(3));                        
00155 
00156         VisibleActor(0, false );
00157         VisibleActor(1, false );
00158         VisibleActor(2, false );
00159         VisibleActor(3, false );
00160 
00161         _boxWidgetS1->HandlesOn ();
00162         
00163 //EED 29Mars2009        
00164 //      _boxWidgetS1->On();
00165         
00166         _boxWidgetS1->Off();
00167 
00168         _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
00169         _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(1) );
00170         _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(2) );
00171         _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(3) );
00172         
00173 // EED 9 fev 2007
00174 // box Volume
00175         _boxWidgetVolume = vtkBoxWidget::New();
00176         _boxWidgetVolume->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
00177         _boxWidgetVolume->SetPlaceFactor(1.25);
00178 
00179         _boxWidgetVolume->SetInput( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
00180         _boxWidgetVolume->PlaceWidget();
00181 
00182         _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent              , _vtkclipping3Ddataviewer->GetObserverV() );
00183 
00184         _boxWidgetVolume->HandlesOn ();
00185         
00186 //EED 29Mars2009        
00187 //      _boxWidgetVolume->On();
00188         
00189         _boxWidgetVolume->Off();
00190 
00191 
00192 //      vtkPlanes *vtkplanes=this->GetVtkClipping3DDataViewer()->GetVolumePlanes();
00193 //      _boxWidgetVolume->GetPlanes( vtkplanes );
00194 
00195 
00196   // An initial camera view is created.  The Dolly() method moves 
00197   // the camera towards the FocalPoint, thereby enlarging the image.
00198   _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
00199   _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
00200   _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);
00201 
00202   // Set a background color for the renderer and set the size of the
00203   // render window (expressed in pixels).
00204   _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
00205   _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
00206 
00207   // Note that when camera movement occurs (as it does in the Dolly()
00208   // method), the clipping planes often need adjusting. Clipping planes
00209   // consist of two planes: near and far along the view direction. The 
00210   // near plane clips out objects in front of the plane; the far plane
00211   // clips out objects behind the plane. This way only what is drawn
00212   // between the planes is actually rendered.
00213   _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
00214 }

Here is the call graph for this function:

wxPanel * wxVtkClipping3DView::CreateSurfControlPanel ( wxWindow *  parent  ) 
wxPanel * wxVtkClipping3DView::CreateVolControlPanel ( wxWindow *  parent  ) 

Definition at line 61 of file wxVtkClipping3DView.cxx.

References _wxvtkclipping3DviewVolCntrlPanel.

Referenced by wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

Here is the caller graph for this function:

vtkClipping3DDataViewer * wxVtkClipping3DView::GetVtkClipping3DDataViewer (  ) 
wxVtk3DBaseView * wxVtkClipping3DView::GetWxvtk3Dbaseview (  )  throw (char*)
void wxVtkClipping3DView::Refresh (  )  [virtual]
void wxVtkClipping3DView::SetRepSurfaceWireFrame ( int  idTissue,
bool  typeRepresentation 
)

Definition at line 87 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer, vtkClipping3DDataViewer::GetTissueActor(), GetVtkClipping3DDataViewer(), and vtkClipping3DDataViewer::SetRepresentationType().

Referenced by wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame().

00088 {
00089         vtkActor *tmpActor;
00090         tmpActor = GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
00091 
00092         if (representationType==false){
00093                 tmpActor->GetProperty()->SetRepresentationToWireframe();
00094         } else {
00095                 tmpActor->GetProperty()->SetRepresentationToSurface();
00096         }
00097 
00098         _vtkclipping3Ddataviewer->SetRepresentationType(idTissue,representationType);
00099 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkClipping3DView::SetVisibleBoxSurface ( bool  visible  ) 

Definition at line 24 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1.

Referenced by wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface().

00025 {
00026         if (visible==true){
00027                 _boxWidgetS1->On();
00028         } else {
00029                 _boxWidgetS1->Off();
00030         }
00031 }

Here is the caller graph for this function:

void wxVtkClipping3DView::SetVisibleBoxVolume ( bool  visible  ) 

Definition at line 33 of file wxVtkClipping3DView.cxx.

References _boxWidgetVolume.

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnVisibleBoxVolume(), and wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume().

00034 {
00035         if (_boxWidgetVolume!=NULL){
00036                 if (visible==true){
00037                         _boxWidgetVolume->On();
00038                 } else {
00039                         _boxWidgetVolume->Off();
00040                 }
00041         }
00042 }

Here is the caller graph for this function:

void wxVtkClipping3DView::SetVtkClipping3DDataViewer ( vtkClipping3DDataViewer vtkclipping3Ddataviewer  ) 
void wxVtkClipping3DView::VisibleActor ( int  idTissue,
bool  visTissue 
)

Definition at line 74 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer, _wxvtk3Dbaseview, wxVtk3DBaseView::GetRenderer(), vtkClipping3DDataViewer::GetTissueActor(), vtkClipping3DDataViewer::GetVisibleTissue(), and vtkClipping3DDataViewer::SetVisibleTissue().

Referenced by Configure(), and wxVtkClipping3DViewCntrlPanel::OnVisibleSurface().

00074                                                                   {
00075         if (visTissue!=_vtkclipping3Ddataviewer->GetVisibleTissue(idTissue)){
00076                 if (visTissue==false){
00077                         _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );    
00078                 } else {
00079                         _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );       
00080 //                      _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(idTissue) );
00081 //                      _actor->VisibilityOn();
00082                 }
00083                 _vtkclipping3Ddataviewer->SetVisibleTissue(idTissue,visTissue);
00084         }
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkClipping3DView::VisibleVolumeActor ( bool  visVolume  ) 

Definition at line 102 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer, _wxvtk3Dbaseview, wxVtk3DBaseView::GetRenderer(), vtkClipping3DDataViewer::GetVisibleVolume(), vtkClipping3DDataViewer::GetVolumeActor(), and vtkClipping3DDataViewer::SetVisibleVolume().

Referenced by wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(), and wxVtkClipping3DViewCntrlPanel::OnVisibleVolume().

00102                                                            {
00103         if (visVolume!=_vtkclipping3Ddataviewer->GetVisibleVolume() ){
00104                 if (visVolume==false){
00105 //EED 31/03/2008                        
00106 //                      _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );    
00107                         _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );   
00108                 } else {
00109 //EED 31/03/2008                        
00110 //                      _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );        
00111                         _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );       
00112                 }
00113                 _vtkclipping3Ddataviewer->SetVisibleVolume(visVolume);
00114         }
00115 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

vtkBoxWidget* wxVtkClipping3DView::_boxWidgetS1 [private]
vtkBoxWidget* wxVtkClipping3DView::_boxWidgetVolume [private]

Definition at line 39 of file wxVtkClipping3DView.h.

Referenced by CreateVolControlPanel().


The documentation for this class was generated from the following files:

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1