vtkInteractorStyle3DView Class Reference

#include <vtkInteractorStyle3DView.h>

Inheritance diagram for vtkInteractorStyle3DView:
Inheritance graph
[legend]
Collaboration diagram for vtkInteractorStyle3DView:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkInteractorStyle3DView ()
 ~vtkInteractorStyle3DView ()
virtual bool OnLeftDClick ()
bool SelectMarchibCubePoint ()
wxVtkMPR3DViewGetWxVtkMPR3DView ()
void SetWxVtkMPR3DView (wxVtkMPR3DView *wxvtkmpr3Dview)
wxVtkClipping3DViewGetWxVtkClipping3DView ()
void SetWxVtkClipping3DView (wxVtkClipping3DView *wxvtkclipping3Dview)
virtual InteractorStyleMaracasClone ()
void CopyAttributesTo (InteractorStyleMaracas *cloneObject)
virtual bool OnChar ()
virtual bool OnMouseMove ()
virtual bool OnLeftButtonDown ()
virtual bool OnLeftButtonUp ()
virtual bool OnMiddleButtonDown ()
virtual bool OnMiddleButtonUp ()
virtual bool OnRightButtonDown ()
virtual bool OnRightButtonUp ()
virtual bool OnRightDClick ()
virtual bool OnMiddleDClick ()
virtual bool OnMouseWheel ()
void SetVtkInteractorStyleBaseView (vtkInteractorStyleBaseView *_vtkInteractorStyleBaseView)
void RemoveVtkInteractorStyleBaseView ()
void SetActive (bool active)
bool GetActive ()

Protected Attributes

vtkInteractorStyleBaseView_vtkInteractorStyleBaseView

Private Attributes

wxVtkMPR3DView_wxvtkmpr3Dview
wxVtkClipping3DView_wxvtkclipping3Dview

Detailed Description

Definition at line 8 of file vtkInteractorStyle3DView.h.


Constructor & Destructor Documentation

vtkInteractorStyle3DView::vtkInteractorStyle3DView (  ) 

Definition at line 6 of file vtkInteractorStyle3DView.cxx.

00007 {
00008 }

vtkInteractorStyle3DView::~vtkInteractorStyle3DView (  ) 

Definition at line 10 of file vtkInteractorStyle3DView.cxx.

00011 {
00012 }


Member Function Documentation

InteractorStyleMaracas * InteractorStyleMaracas::Clone (  )  [virtual, inherited]
void InteractorStyleMaracas::CopyAttributesTo ( InteractorStyleMaracas cloneObject  )  [inherited]

Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, manualRoiControler, and manualRotationToolControler.

Definition at line 27 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::GetActive(), and InteractorStyleMaracas::SetActive().

Referenced by InteractorStyleMaracas::Clone().

00028 {
00029         // Fathers object
00030         //<FATHERCLASS>::CopyAttributesTo(cloneObject);
00031 
00032         cloneObject->SetActive(  this->GetActive() );
00033 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool InteractorStyleMaracas::GetActive (  )  [inherited]

Definition at line 116 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_active.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(), and InteractorStyleMaracas::CopyAttributesTo().

00117 {
00118         return _active;
00119 }

Here is the caller graph for this function:

wxVtkClipping3DView * vtkInteractorStyle3DView::GetWxVtkClipping3DView (  ) 

Definition at line 107 of file vtkInteractorStyle3DView.cxx.

References _wxvtkclipping3Dview.

00108 {
00109         return _wxvtkclipping3Dview;
00110 }

wxVtkMPR3DView * vtkInteractorStyle3DView::GetWxVtkMPR3DView (  ) 

Definition at line 102 of file vtkInteractorStyle3DView.cxx.

References _wxvtkmpr3Dview.

Referenced by SelectMarchibCubePoint().

00103 {
00104         return _wxvtkmpr3Dview;
00105 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnChar (  )  [virtual, inherited]

Reimplemented in manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, and manualContourPerpPlaneControler.

Definition at line 37 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00038 {
00039         return true;
00040 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnLeftButtonDown (  )  [virtual, inherited]

Reimplemented in manualContour3DControler, manualContourBaseControler, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 47 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00048 {
00049         return true;
00050 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnLeftButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 52 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00053 {
00054         return true;
00055 }

Here is the caller graph for this function:

bool vtkInteractorStyle3DView::OnLeftDClick (  )  [virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 14 of file vtkInteractorStyle3DView.cxx.

References SelectMarchibCubePoint().

00015 {
00016         SelectMarchibCubePoint();
00017         return true;
00018 }

Here is the call graph for this function:

bool InteractorStyleMaracas::OnMiddleButtonDown (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.

Definition at line 62 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00063 {
00064         return true;
00065 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnMiddleButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.

Definition at line 67 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00068 {
00069         return true;
00070 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnMiddleDClick (  )  [virtual, inherited]

Definition at line 72 of file InteractorStyleMaracas.cxx.

00073 {
00074         return true;
00075 }

bool InteractorStyleMaracas::OnMouseMove (  )  [virtual, inherited]
bool InteractorStyleMaracas::OnMouseWheel (  )  [virtual, inherited]

Definition at line 92 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00093 {
00094         return true;
00095 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightButtonDown (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, and vtkInteractorStyleSphere.

Definition at line 77 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00078 {
00079         return true;
00080 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 82 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00083 {
00084         return true;
00085 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightDClick (  )  [virtual, inherited]

Definition at line 87 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00088 {
00089         return true;
00090 }

Here is the caller graph for this function:

void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView (  )  [inherited]

Definition at line 106 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView.

Referenced by vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas().

00107 {
00108         _vtkInteractorStyleBaseView = NULL;
00109 }

Here is the caller graph for this function:

bool vtkInteractorStyle3DView::SelectMarchibCubePoint (  ) 

Definition at line 20 of file vtkInteractorStyle3DView.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView, _wxvtkclipping3Dview, _wxvtkmpr3Dview, UtilVtk3DGeometriSelection::FindCubePointsFromPoints(), gtm::TVector< T >::GetAnsiRef(), vtkBaseData::GetImageData(), vtkClipping3DDataViewer::GetMCubes(), UtilVtk3DGeometriSelection::GetPointAndNormalIntersection(), wxVtkBaseView::GetRenderer(), wxVtkClipping3DView::GetVtkClipping3DDataViewer(), wxVtkMPR3DView::GetVtkMPR3DDataViewer(), vtkMPR3DDataViewer::GetVtkMPRBaseData(), wxVtkMPR3DView::GetWxvtk3Dbaseview(), vtkInteractorStyleBaseView::GetWxVtk3DBaseView(), GetWxVtkMPR3DView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), GTM_MAX, UtilVtk3DGeometriSelection::SetDimentions(), UtilVtk3DGeometriSelection::SetMarchingCube(), vtkMPRBaseData::SetX(), vtkMPRBaseData::SetY(), and vtkBaseData::SetZ().

Referenced by OnLeftDClick().

00021 {
00022         bool ok=false;
00023     gtm::TVector< double > pO( 3 ), pF( 3 ), pp( 3 ), cp( 3 );
00024     gtm::TVector< double > xc( 3 );
00025     gtm::TVector< double > x1( 3 ), n1( 3 );
00026     gtm::TVector< double > x2( 3 ), n2( 3 );
00027 
00028         double pickPoint[ 3 ], cameraPos[ 3 ];
00029         int eventrwi[2];
00030         vtkPointPicker* picker = vtkPointPicker::New( );        
00031         eventrwi[0]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0];
00032         eventrwi[1]= _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1];
00033         vtkRenderer *pRenderer = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetRenderer();
00034         picker->Pick( eventrwi[0], eventrwi[1], 0.0, pRenderer );
00035         pRenderer->GetActiveCamera( )->GetPosition( cameraPos );
00036         picker->GetPickPosition( pickPoint );
00037         picker->Delete( );
00038 
00039         pp( 0 ) = pickPoint[ 0 ]; pp( 1 ) = pickPoint[ 1 ]; pp( 2 ) = pickPoint[ 2 ];
00040     cp( 0 ) = cameraPos[ 0 ]; cp( 1 ) = cameraPos[ 1 ]; cp( 2 ) = cameraPos[ 2 ];
00041 
00042 
00043 //EED 27 sep 2006  (1/2)
00044 //      wxVtkMPR3DView *wxvtkmpr3Dview = (wxVtkMPR3DView *)_vtkInteractorStyleBaseView->GetWxVtk3DBaseView();
00045 //      double spc[3];
00046 //      wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetSpacing(spc);
00047 
00048 
00049         vtkImageData *imageData = GetWxVtkMPR3DView()->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
00050         int dim[3];
00051         double spc[3];
00052         imageData->GetDimensions(dim);
00053         imageData->GetSpacing(spc);
00054 
00055 
00056         vtkMarchingCubes *mcubes = _wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetMCubes(0);
00057         
00058 
00059         UtilVtk3DGeometriSelection utilVtk3DGeometriSelection;
00060         utilVtk3DGeometriSelection.SetDimentions(dim[0],dim[1],dim[2]);
00061 
00062         utilVtk3DGeometriSelection.SetMarchingCube(mcubes);
00063 
00064     double fac;
00065     fac = GTM_MAX( dim[0], dim[2] );
00066 
00067 
00068     if( utilVtk3DGeometriSelection.FindCubePointsFromPoints(
00069       pO.GetAnsiRef( ), pF.GetAnsiRef( ),
00070       pp.GetAnsiRef( ), cp.GetAnsiRef( ) )  ) 
00071         {
00072 
00073                 if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
00074                             x1.GetAnsiRef( ), n1.GetAnsiRef( ),
00075                                 pO.GetAnsiRef( ), pF.GetAnsiRef( ) ) ) 
00076                 {
00077                     if( utilVtk3DGeometriSelection.GetPointAndNormalIntersection(
00078                               x2.GetAnsiRef( ), n2.GetAnsiRef( ),
00079                                  ( x1 - n1 ).GetAnsiRef( ), ( x1 - ( n1 * fac ) ).GetAnsiRef( )   ) ) 
00080                         {
00081                                 xc = ( x2 + x1 ) * 0.5;
00082 //EED 27 sep 2006  (2/2)
00083                                 this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetX(xc(0)/spc[0]);
00084                                 this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xc(1)/spc[1]);
00085                                 this->_wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xc(2)/spc[2]);
00086                                 wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
00087                                 this->_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
00088                                 ok=true;
00089                         }
00090                 }
00091         }
00092 
00093 
00094         return ok;
00095 }

Here is the call graph for this function:

Here is the caller graph for this function:

void InteractorStyleMaracas::SetActive ( bool  active  )  [inherited]
void InteractorStyleMaracas::SetVtkInteractorStyleBaseView ( vtkInteractorStyleBaseView _vtkInteractorStyleBaseView  )  [inherited]

Definition at line 99 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView.

Referenced by vtkInteractorStyleBaseView::AddInteractorStyleMaracas(), and vtkInteractorStyleBaseView::InsertInteractorStyleMaracas().

00100 {
00101         _vtkInteractorStyleBaseView = vtkInteractorStyleBaseView;
00102 }

Here is the caller graph for this function:

void vtkInteractorStyle3DView::SetWxVtkClipping3DView ( wxVtkClipping3DView wxvtkclipping3Dview  ) 
void vtkInteractorStyle3DView::SetWxVtkMPR3DView ( wxVtkMPR3DView wxvtkmpr3Dview  ) 

Member Data Documentation

Definition at line 45 of file InteractorStyleMaracas.h.

Referenced by manualContour3VControler::AddPoint_Others(), manualContour3VControler::DeleteActualMousePoint_Others(), manualContour3VControler::InsertPoint_Others(), InteractorStyleMaracas::InteractorStyleMaracas(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseDLeft(), manualContourControler::MouseDLeft(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualContour3VControler::MouseMove_Others(), manualContourBaseControler::OnChar(), manualContour3DControler::OnChar(), manualContour3VControler::OnChar_Others(), vtkInteractorStyleSphere::OnLeftButtonDown(), vtkInteractorStylePlane2D::OnLeftButtonDown(), vtkInteractorStyleMPRView::OnLeftButtonDown(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftDClick(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), vtkInteractorStyleSphere::OnMouseMove(), vtkInteractorStylePlane2D::OnMouseMove(), vtkInteractorStyleMPRView::OnMouseMove(), vtkInteractorScrollZ::OnMouseMove(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), manualContourBaseControler::OnRightButtonDown(), vtkInteractorStyleSphere::OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1