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 * CreateControlPanel (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


Detailed Description

Definition at line 11 of file wxVtkClipping3DView.h.


Constructor & Destructor Documentation

wxVtkClipping3DView::wxVtkClipping3DView ( wxVtk3DBaseView wxvtk3Dbaseview  ) 

Definition at line 5 of file wxVtkClipping3DView.cxx.

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

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

wxVtkClipping3DView::~wxVtkClipping3DView (  )  [virtual]

Definition at line 16 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1, _boxWidgetVolume, _vtkclipping3Ddataviewer, and _wxvtkclipping3DviewCntrlPanel.

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


Member Function Documentation

void wxVtkClipping3DView::Refresh (  )  [virtual]

Definition at line 43 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer, _wxvtkclipping3DviewCntrlPanel, and vtkClipping3DDataViewer::Refresh().

Referenced by wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), HistogramDialog::OnRefreshBtn(), wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(), wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface(), wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume(), wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(), and wxVtkClipping3DViewCntrlPanel::OnVisibleVolume().

00044 {
00045         _vtkclipping3Ddataviewer->Refresh();
00046         if (_wxvtkclipping3DviewCntrlPanel!=NULL)
00047         {
00048                 _wxvtkclipping3DviewCntrlPanel->Refresh();
00049         }
00050 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkClipping3DView::Configure (  )  [virtual]

Definition at line 114 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(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), VisibleActor(), and VTKMPRDATA_MAXTISSUE.

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

Here is the call graph for this function:

void wxVtkClipping3DView::SetVtkClipping3DDataViewer ( vtkClipping3DDataViewer vtkclipping3Ddataviewer  ) 

Definition at line 205 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer.

Referenced by wxManualRegistration3D::AddPanelControl_B(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxMPRWidget::CreateView(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

00206 {
00207         _vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
00208 }

Here is the caller graph for this function:

wxPanel * wxVtkClipping3DView::CreateControlPanel ( wxWindow *  parent  ) 

Definition at line 52 of file wxVtkClipping3DView.cxx.

References _wxvtkclipping3DviewCntrlPanel.

Referenced by wxManualRegistration3D::AddPanelControl_B(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxMPRWidget::CreateView(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

Here is the caller graph for this function:

vtkClipping3DDataViewer * wxVtkClipping3DView::GetVtkClipping3DDataViewer (  ) 

Definition at line 58 of file wxVtkClipping3DView.cxx.

References _vtkclipping3Ddataviewer.

Referenced by wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewCntrlPanel::OnBtnSaveRawVolume(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), wxVtkClipping3DViewCntrlPanel::OnSurface(), wxManualRegistration3D::RefreshView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), SetRepSurfaceWireFrame(), and wxVtkClipping3DViewCntrlPanel::wxVtkClipping3DViewCntrlPanel().

00059 {
00060         return _vtkclipping3Ddataviewer; 
00061 }

Here is the caller graph for this function:

void wxVtkClipping3DView::VisibleActor ( int  idTissue,
bool  visTissue 
)

Definition at line 63 of file wxVtkClipping3DView.cxx.

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

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

00063                                                                   {
00064         if (visTissue!=_vtkclipping3Ddataviewer->GetVisibleTissue(idTissue)){
00065                 if (visTissue==false){
00066                         _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );    
00067                 } else {
00068                         _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetTissueActor(idTissue)  );       
00069 //                      _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(idTissue) );
00070 //                      _actor->VisibilityOn();
00071                 }
00072                 _vtkclipping3Ddataviewer->SetVisibleTissue(idTissue,visTissue);
00073         }
00074 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkClipping3DView::VisibleVolumeActor ( bool  visVolume  ) 

Definition at line 91 of file wxVtkClipping3DView.cxx.

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

Referenced by wxVtkClipping3DViewCntrlPanel::OnVisibleVolume().

00091                                                            {
00092         if (visVolume!=_vtkclipping3Ddataviewer->GetVisibleVolume() ){
00093                 if (visVolume==false){
00094 //EED 31/03/2008                        
00095 //                      _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _vtkclipping3Ddataviewer->GetVolumeActor()  );    
00096                         _wxvtk3Dbaseview->GetRenderer()->RemoveVolume( _vtkclipping3Ddataviewer->GetVolumeActor()  );   
00097                 } else {
00098 //EED 31/03/2008                        
00099 //                      _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkclipping3Ddataviewer->GetVolumeActor() );        
00100                         _wxvtk3Dbaseview->GetRenderer()->AddVolume( _vtkclipping3Ddataviewer->GetVolumeActor() );       
00101                 }
00102                 _vtkclipping3Ddataviewer->SetVisibleVolume(visVolume);
00103         }
00104 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkClipping3DView::SetVisibleBoxSurface ( bool  visible  ) 

Definition at line 23 of file wxVtkClipping3DView.cxx.

References _boxWidgetS1.

Referenced by wxVtkClipping3DViewCntrlPanel::OnVisibleBoxSurface().

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

Here is the caller graph for this function:

void wxVtkClipping3DView::SetVisibleBoxVolume ( bool  visible  ) 

Definition at line 32 of file wxVtkClipping3DView.cxx.

References _boxWidgetVolume.

Referenced by wxVtkClipping3DViewCntrlPanel::OnVisibleBoxVolume().

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

Here is the caller graph for this function:

void wxVtkClipping3DView::SetRepSurfaceWireFrame ( int  idTissue,
bool  typeRepresentation 
)

Definition at line 76 of file wxVtkClipping3DView.cxx.

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

Referenced by wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame().

00077 {
00078         vtkActor *tmpActor;
00079         tmpActor = GetVtkClipping3DDataViewer()->GetTissueActor(idTissue);
00080 
00081         if (representationType==false){
00082                 tmpActor->GetProperty()->SetRepresentationToWireframe();
00083         } else {
00084                 tmpActor->GetProperty()->SetRepresentationToSurface();
00085         }
00086 
00087         _vtkclipping3Ddataviewer->SetRepresentationType(idTissue,representationType);
00088 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxVtk3DBaseView * wxVtkClipping3DView::GetWxvtk3Dbaseview (  )  throw (char*)

Definition at line 106 of file wxVtkClipping3DView.cxx.

References _wxvtk3Dbaseview.

Referenced by wxManualTree_MPRWidget::ConfigureContour(), wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(), wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(), and wxVtkClipping3DViewCntrlPanel::OnVisibleVolume().

00107 {
00108         if(_wxvtk3Dbaseview==NULL){
00109                 throw "wxVtk3DBaseView* wxVtkClipping3DView::GetWxvtk3Dbaseview() _wxvtk3Dbaseview=NULL";
00110         }
00111         return _wxvtk3Dbaseview;
00112 }

Here is the caller graph for this function:


Member Data Documentation

wxVtk3DBaseView* wxVtkClipping3DView::_wxvtk3Dbaseview [private]

Definition at line 31 of file wxVtkClipping3DView.h.

Referenced by Configure(), GetWxvtk3Dbaseview(), VisibleActor(), VisibleVolumeActor(), and wxVtkClipping3DView().

vtkClipping3DDataViewer* wxVtkClipping3DView::_vtkclipping3Ddataviewer [private]

Definition at line 32 of file wxVtkClipping3DView.h.

Referenced by Configure(), GetVtkClipping3DDataViewer(), Refresh(), SetRepSurfaceWireFrame(), SetVtkClipping3DDataViewer(), VisibleActor(), VisibleVolumeActor(), wxVtkClipping3DView(), and ~wxVtkClipping3DView().

vtkBoxWidget* wxVtkClipping3DView::_boxWidgetS1 [private]

Definition at line 33 of file wxVtkClipping3DView.h.

Referenced by Configure(), SetVisibleBoxSurface(), wxVtkClipping3DView(), and ~wxVtkClipping3DView().

vtkBoxWidget* wxVtkClipping3DView::_boxWidgetVolume [private]

Definition at line 34 of file wxVtkClipping3DView.h.

Referenced by Configure(), SetVisibleBoxVolume(), wxVtkClipping3DView(), and ~wxVtkClipping3DView().

wxPanel* wxVtkClipping3DView::_wxvtkclipping3DviewCntrlPanel [private]

Definition at line 35 of file wxVtkClipping3DView.h.

Referenced by CreateControlPanel(), Refresh(), wxVtkClipping3DView(), and ~wxVtkClipping3DView().


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:36:28 2009 for creaMaracasVisu_lib by  doxygen 1.5.3