wxVtkBaseView Class Reference

#include <wxVtkBaseView.h>

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

List of all members.

Public Member Functions

 wxVtkBaseView ()
 wxVtkBaseView (wxWindow *parent)
virtual ~wxVtkBaseView ()
wxVTKRenderWindowInteractorGetWxVTKRenderWindowInteractor () throw (char*)
virtual void Configure ()
virtual void Refresh ()
virtual void RefreshView ()
virtual vtkRenderer * GetRenderer ()
virtual vtkRenderWindow * GetRenWin ()
virtual void TransFromCoordScreenToWorld (double &X, double &Y, double &Z, bool keepNormalDirection=false, int type=2)
void TransCoordScreenToWorld (double &X, double &Y, double &Z, int type=2)
void SetInteractorStyleBaseView (vtkInteractorStyleImage *interactorStyle)
vtkInteractorStyleImage * GetInteractorStyleBaseView ()
virtual void GetSpacing (double spc[3])

Private Attributes

wxWindow * _parent
wxVTKRenderWindowInteractor_iren
vtkInteractorStyleImage * _interactorStyle

Detailed Description

Definition at line 41 of file wxVtkBaseView.h.


Constructor & Destructor Documentation

wxVtkBaseView::wxVtkBaseView (  ) 

Definition at line 11 of file wxVtkBaseView.cxx.

References _interactorStyle, _iren, and _parent.

00012 {
00013         _parent                         = NULL;
00014         _iren                           = NULL;
00015         _interactorStyle        = NULL;
00016 }

wxVtkBaseView::wxVtkBaseView ( wxWindow *  parent  ) 

Definition at line 20 of file wxVtkBaseView.cxx.

References _interactorStyle, _iren, and _parent.

00021 {
00022         _parent                         = parent;
00023         _iren                           = (wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
00024 //      _iren->UseCaptureMouseOn();
00025 //      _iren                           = new wxVTKRenderWindowInteractor(_parent,-1);
00026         _interactorStyle        = NULL;
00027 }

wxVtkBaseView::~wxVtkBaseView (  )  [virtual]

Definition at line 30 of file wxVtkBaseView.cxx.

References _iren.

00031 {
00032         _iren -> Delete();
00033         //_iren=NULL;
00034 }


Member Function Documentation

void wxVtkBaseView::Configure (  )  [virtual]

Reimplemented in wxVtk2DView_TMP, vtkPlane2DView, wxSphereView, wxVtk3DBaseView, and wxVtkMPR2DView.

Definition at line 45 of file wxVtkBaseView.cxx.

Referenced by wxVtk2DBaseView::Configure(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), and wxVtk2DBaseView::ResetView().

00046 {
00047 }

Here is the caller graph for this function:

vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView (  ) 
vtkRenderer * wxVtkBaseView::GetRenderer (  )  [virtual]
vtkRenderWindow * wxVtkBaseView::GetRenWin (  )  [virtual]
void wxVtkBaseView::GetSpacing ( double  spc[3]  )  [virtual]

Reimplemented in wxVtk2DBaseView, and wxVtk3DBaseView.

Definition at line 180 of file wxVtkBaseView.cxx.

Referenced by wxManualTree_MPRWidget::ConfigureContour(), and manualViewPerpPlaneContour::FilterCordinateXYZ().

00181 {
00182         spc[0]=1;
00183         spc[1]=1;
00184         spc[2]=1;
00185 }

Here is the caller graph for this function:

wxVTKRenderWindowInteractor * wxVtkBaseView::GetWxVTKRenderWindowInteractor (  )  throw (char*)

Reimplemented in wxVtk2DView_TMP.

Definition at line 36 of file wxVtkBaseView.cxx.

References _iren.

Referenced by wxMaracasRenderTabbedPanel::addRemoveActorMPR(), wxVtkClipping3DView::Configure(), wxVtk3DBaseView::Configure(), wxVtk2DBaseView::Configure(), vtkPlane2DView::Configure(), wxWidgetMesure2D::ConfigureA(), wxManualRegistration3D::Create3DView(), wxManualTree_MPRWidget::Create3DViewContour(), wxSegmentationFM3DWidget::Create3DViewContour(), wxManualSegmentation_MPRWidget::Create3DViewContour(), wxMPRWidget::CreateMPRPanel4View(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), wxMaracas_ManualContour_Panel::CreateSplitePanel(), wxMPRWidget::CreateView(), wxQuantificationWidgetCT::CreateView2DPanel(), wxProcessingCTWidget::CreateViewPanel(), wxEmptyPanelWidget::CreateViewPanel(), wxEmptyPanel_3_Widget::CreateViewPanel(), vtkInteractorStyleBaseView::EvaluateToRefresh(), wxMaracasImageBrowser02::LoadData(), wxVtkClipping3DViewCntrlPanel::OnBtnMeshVTKLoad(), wxVtkClipping3DViewVolCntrlPanel::OnBtnVolumeFunctions(), wxVtkClipping3DViewCntrlPanel::OnBtnVolumeFunctions(), manualContourBaseControler::OnChar(), wxVtkClipping3DViewCntrlPanel::OnColor(), wxPanelCuttingImageData::OnExtract(), wxVtkClipping3DViewCntrlPanel::OnIsoValue(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), vtkInteractorManualPaint::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), wxVtkClipping3DViewCntrlPanel::OnOpacity(), wxVtkMPR3DViewCntrlPanel::OnPositionX(), wxVtkMPR3DViewCntrlPanel::OnPositionY(), wxVtkMPR3DViewCntrlPanel::OnPositionZ(), wxMaracasRenderTabbedPanel::OnRefreshView(), wxVtkClipping3DViewCntrlPanel::OnRepresentationSurfaceWireFrame(), manualContourBaseControler::OnRightButtonDown(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY(), wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(), wxVtkClipping3DViewCntrlPanel::OnVisibleSurface(), wxVtkClipping3DViewVolCntrlPanel::OnVisibleVolume(), wxVtkClipping3DViewCntrlPanel::OnVisibleVolume(), Refresh(), wxVtk3DBaseView::Refresh(), manualViewBaseContour::Refresh(), wxVtk2DBaseView::ResetView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), wxVtk2DBaseView::SetInteractorStyleImage(), wxVtkMPR3DViewCntrlPanel::SetVisibleX(), wxVtkMPR3DViewCntrlPanel::SetVisibleY(), wxVtkMPR3DViewCntrlPanel::SetVisibleZ(), and wxMaracas_ViewerWidget::wxMaracas_ViewerWidget().

00037 {
00038 
00039         if(_iren==NULL){
00040                 throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren wxVTKRenderWindowInteractorPlus =NULL";
00041         }
00042    return _iren;
00043 }

void wxVtkBaseView::Refresh (  )  [virtual]

Reimplemented in vtkPlane2DView, wxVtk2DBaseView, wxVtk3DBaseView, and wxVtkMPR2DView.

Definition at line 49 of file wxVtkBaseView.cxx.

References _iren, and GetWxVTKRenderWindowInteractor().

Referenced by vtkInteractorStyleBaseView::EvaluateToRefresh(), ThresholdImageViewPanel::onChangeOpacity(), wxPanelCuttingImageData::OnExtract(), ThresholdImageViewPanel::onThresholdChange(), ThresholdImageViewPanel::onThresholdInterpolation(), ThresholdImageViewPanel::onThresholdShow(), LayerImageBase::Refresh(), and wxMaracasSuperpositionPanel::RefreshInterface().

00050 {
00051 // EED 10 Oct 2007
00052 
00053         #if defined(WIN32)
00054                 _iren->Refresh(false);
00055         #else
00056         
00057 //EED 01Avril2009
00058 //              _iren->Render();        
00059         vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor();
00060         vri->vtkRenderWindowInteractor::Render();
00061         
00062         
00063                 //_iren->Refresh();
00064         #endif
00065 
00066 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkBaseView::RefreshView (  )  [virtual]
void wxVtkBaseView::SetInteractorStyleBaseView ( vtkInteractorStyleImage *  interactorStyle  ) 

Definition at line 173 of file wxVtkBaseView.cxx.

References _interactorStyle.

Referenced by wxVtk3DBaseView::Configure(), wxVtk2DView_TMP::Configure(), and wxVtk2DBaseView::SetInteractorStyleImage().

00174 {
00175         _interactorStyle = interactorStyle;
00176 }

Here is the caller graph for this function:

void wxVtkBaseView::TransCoordScreenToWorld ( double &  X,
double &  Y,
double &  Z,
int  type = 2 
)

Definition at line 92 of file wxVtkBaseView.cxx.

References GetRenderer().

Referenced by TransFromCoordScreenToWorld().

00093 {
00094         GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z);
00095         GetRenderer()->DisplayToWorld();
00096         double fP[4];
00097         GetRenderer()->GetWorldPoint( fP );
00098         if ( fP[3] ){
00099                 fP[0] /= fP[3];
00100                 fP[1] /= fP[3];
00101                 fP[2] /= fP[3];
00102         }
00103 
00104         if (type!=0)
00105         {
00106                 X=fP[0];
00107         }
00108         if (type!=1)
00109         {
00110                 Y=fP[1];
00111         }
00112         if (type!=2)
00113         {
00114                 Z=fP[2];
00115         } 
00116 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxVtkBaseView::TransFromCoordScreenToWorld ( double &  X,
double &  Y,
double &  Z,
bool  keepNormalDirection = false,
int  type = 2 
) [virtual]

Reimplemented in wxVtkMPR2DView.

Definition at line 119 of file wxVtkBaseView.cxx.

References GetInteractorStyleBaseView(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), TransCoordScreenToWorld(), and wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel().

Referenced by manualViewPerpPlaneContour::ifTouchContour(), vtkInfoTextImageInteractor::OnMouseMove(), vtkInteractorManualPaint::OnMouseMove(), manualViewBaseContour::TransfromCoordViewWorld(), and vtkPlane2DView::TransfromCoordViewWorld2().

00120 {
00121         double xx = X;
00122         double yy = Y;
00123         double zz = Z;
00124 
00125         //RaC 03-2010
00126         TransCoordScreenToWorld(xx,yy,zz,type);
00127 
00128         X = xx;
00129         Y = yy;
00130         Z=zz;
00131 
00132 // EEDx5
00133         //JCP 13/05/2009
00134         vtkInteractorStyleBaseView* interactorstyle = (vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView();
00135     wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)interactorstyle->GetWxVtk2DBaseView();
00136 
00137         double fP[3];
00138         fP[0] = X;
00139         fP[1] = Y;
00140         fP[2] = Z;
00141 
00142         baseview->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] );
00143         //JCP 13/05/2009
00144 
00145         if (type!=0)
00146         {
00147                 X=fP[0];
00148         }
00149         if (type!=1)
00150         {
00151                 Y=fP[1];
00152         }
00153         if (type!=2)
00154         {
00155                 Z=fP[2];
00156         } 
00157 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

vtkInteractorStyleImage* wxVtkBaseView::_interactorStyle [private]

JCP 04/05/09 vtkInteractorStyleImage *_interactorStyle;

Definition at line 75 of file wxVtkBaseView.h.

Referenced by GetInteractorStyleBaseView(), SetInteractorStyleBaseView(), and wxVtkBaseView().

wxWindow* wxVtkBaseView::_parent [private]

Definition at line 69 of file wxVtkBaseView.h.

Referenced by wxVtkBaseView().


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

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1