#include <wxVtkBaseView.h>
Public Member Functions | |
wxVtkBaseView () | |
wxVtkBaseView (wxWindow *parent) | |
virtual | ~wxVtkBaseView () |
wxVTKRenderWindowInteractor * | GetWxVTKRenderWindowInteractor () 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 | SetInteractorStyleBaseView (vtkInteractorStyleImage *interactorStyle) |
vtkInteractorStyleImage * | GetInteractorStyleBaseView () |
virtual void | GetSpacing (double spc[3]) |
Private Attributes | |
wxWindow * | _parent |
wxVTKRenderWindowInteractor * | _iren |
vtkInteractorStyleImage * | _interactorStyle |
Definition at line 44 of file wxVtkBaseView.h.
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 00028 00029 }
wxVtkBaseView::~wxVtkBaseView | ( | ) | [virtual] |
Definition at line 32 of file wxVtkBaseView.cxx.
References _iren.
00033 { 00034 _iren -> Delete(); 00035 //_iren=NULL; 00036 }
void wxVtkBaseView::Configure | ( | ) | [virtual] |
Reimplemented in wxVtk2DView_TMP, vtkPlane2DView, wxSphereView, wxVtk3DBaseView, and wxVtkMPR2DView.
Definition at line 47 of file wxVtkBaseView.cxx.
Referenced by wxVtk2DBaseView::Configure(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), and wxVtk2DBaseView::ResetView().
vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView | ( | ) |
Definition at line 134 of file wxVtkBaseView.cxx.
References _interactorStyle.
Referenced by wxWidgetMesure2D::ActiveMessureTool(), wxQuantificationWidgetCT::addManualContours(), wxMaracasRenderTabbedPanel::addMPROptions(), wxVtkMPR2DView::Configure(), wxVtk2DBaseView::Configure(), wxSphereView::Configure(), vtkPlane2DView::Configure(), wxWidgetMesure2D::ConfigureA(), wxManualTree_MPRWidget::ConfigureContour(), wxMPRWidget::ConfigureVTK(), wxManualTree_MPRWidget::ConfigureVTK(), wxSegmentationFM3DWidget::ConfigureVTK(), wxManualSegmentation_MPRWidget::ConfigureVTK(), wxManualRegistration3D::ConfigureVTK(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxManualRegistration3D::ConfigureVTK_B(), wxImageViewerWidget::ConstructVTK(), vtkmyPWCallback_3DPointWidget::Execute(), wxMaracasImageBrowser02::LoadData(), wxQuantificationWidgetCT::OnContourLumen(), wxQuantificationWidgetCT::OnContourWall(), wxVTKRenderWindowInteractorPlus::OnLeftDClick(), wxVTKRenderWindowInteractorPlus::OnMiddleDClick(), wxVTKRenderWindowInteractorPlus::OnMouseWheel(), wxVTKRenderWindowInteractorPlus::OnRightDClick(), manualContourContainer::refreshCalc(), manualContourContainer::refreshHypo(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), and TransFromCoordScreenToWorld().
00135 { 00136 return _interactorStyle; 00137 }
vtkRenderer * wxVtkBaseView::GetRenderer | ( | ) | [virtual] |
Reimplemented in wxVtk2DView_TMP, wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 82 of file wxVtkBaseView.cxx.
Referenced by manualViewBaseContour::AddCompleteContourActor(), manualViewBaseContour::AddControlPoints(), manualViewBaseContour::AddPoint(), manualViewPoints::AddSplineActor(), manualViewBaseContour::AddSplineActor(), manualViewBaseContour::AddTextActor(), manualViewBaseContour::ClearContour(), ContourView::CreateNewContour(), LineView::CreateNewLine(), PointView::CreateNewPoint(), manualViewBaseContour::DeletePoint(), PointView::DeleteVtkObjects(), LineView::DeleteVtkObjects(), ContourView::DeleteVtkObjects(), manualView3DContour::GetIdPoint2(), manualViewBaseContour::InsertPoint(), ThresholdImageView::onThreshold(), ThresholdImageView::onThresholdRemove(), manualViewPoints::RefreshContour(), manualViewBaseContour::RemoveCompleteContourActor(), manualViewBaseContour::RemoveControlPoints(), manualViewPoints::RemoveSplineActor(), manualViewBaseContour::RemoveSplineActor(), manualViewBaseContour::RemoveTextActor(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), TransFromCoordScreenToWorld(), and wxMaracasCoutourTool::wxMaracasCoutourTool().
vtkRenderWindow * wxVtkBaseView::GetRenWin | ( | ) | [virtual] |
Reimplemented in wxVtk2DView_TMP, wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 87 of file wxVtkBaseView.cxx.
References _iren.
Referenced by ContourView::CreateNewContour(), LineView::CreateNewLine(), PointView::CreateNewPoint(), wxPanelCuttingImageData::CreatePlotHistogrammeInterface(), PointView::Refresh(), manualViewBaseContour::Refresh(), LineView::Refresh(), ContourView::Refresh(), and RefreshView().
00088 { 00089 return _iren->GetRenderWindow(); 00090 }
void wxVtkBaseView::GetSpacing | ( | double | spc[3] | ) | [virtual] |
Reimplemented in wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 149 of file wxVtkBaseView.cxx.
Referenced by wxManualTree_MPRWidget::ConfigureContour(), and manualViewPerpPlaneContour::FilterCordinateXYZ().
wxVTKRenderWindowInteractor * wxVtkBaseView::GetWxVTKRenderWindowInteractor | ( | ) | throw (char*) |
Reimplemented in wxVtk2DView_TMP.
Definition at line 38 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(), 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().
void wxVtkBaseView::Refresh | ( | ) | [virtual] |
Reimplemented in vtkPlane2DView, wxVtk2DBaseView, wxVtk3DBaseView, and wxVtkMPR2DView.
Definition at line 51 of file wxVtkBaseView.cxx.
References _iren, and GetWxVTKRenderWindowInteractor().
Referenced by vtkInteractorStyleBaseView::EvaluateToRefresh(), ThresholdImageViewPanel::onChangeOpacity(), wxPanelCuttingImageData::OnExtract(), ThresholdImageViewPanel::onThresholdChange(), ThresholdImageViewPanel::onThresholdInterpolation(), ThresholdImageViewPanel::onThresholdShow(), and wxMaracasSuperpositionPanel::RefreshInterface().
00052 { 00053 // EED 10 Oct 2007 00054 00055 #if defined(WIN32) 00056 _iren->Refresh(false); 00057 #else 00058 00059 //EED 01Avril2009 00060 // _iren->Render(); 00061 vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); 00062 vri->vtkRenderWindowInteractor::Render(); 00063 00064 00065 //_iren->Refresh(); 00066 #endif 00067 00068 }
void wxVtkBaseView::RefreshView | ( | ) | [virtual] |
Reimplemented in wxSphereView.
Definition at line 70 of file wxVtkBaseView.cxx.
References GetRenWin().
Referenced by wxQuantificationWidgetCT::CreateManualContours(), wxWidgetMesure2D_Plane::OnActiveCirlcle(), wxWidgetMesure2D_Plane::OnActiveLine(), wxWidgetMesure2D_Plane_in_MPR::OnActiveLink(), wxWidgetMesure2D::OnActiveMessureTool(), wxWidgetMesure2D::OnCloseContour(), wxMaracas_ManualContour_Panel::OnRefreshView(), wxQuantificationWidgetCT::OnShowCalc(), wxQuantificationWidgetCT::OnShowHypo(), wxQuantificationWidgetCT::OnShowLumen(), wxQuantificationWidgetCT::OnShowWall(), wxWidgetMesure2D::OnVisibleInformation(), wxWidgetMesure2D::OnVisibleMessureTool(), and wxProcessingCTWidget::Refresh().
00071 { 00072 // EED 10 Oct 2007 00073 00074 #if defined(WIN32) 00075 GetRenWin()->Render(); 00076 #else 00077 //GetRenWin()->Render(); 00078 #endif 00079 00080 }
void wxVtkBaseView::SetInteractorStyleBaseView | ( | vtkInteractorStyleImage * | interactorStyle | ) |
Definition at line 142 of file wxVtkBaseView.cxx.
References _interactorStyle.
Referenced by wxVtk3DBaseView::Configure(), wxVtk2DView_TMP::Configure(), and wxVtk2DBaseView::SetInteractorStyleImage().
00143 { 00144 _interactorStyle = interactorStyle; 00145 }
void wxVtkBaseView::TransFromCoordScreenToWorld | ( | double & | X, | |
double & | Y, | |||
double & | Z, | |||
bool | keepNormalDirection = false , |
|||
int | type = 2 | |||
) | [virtual] |
Reimplemented in wxVtkMPR2DView.
Definition at line 94 of file wxVtkBaseView.cxx.
References GetInteractorStyleBaseView(), GetRenderer(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtk2DBaseView::TransformCoordinate_spacing_ViewToModel().
Referenced by manualViewPerpPlaneContour::ifTouchContour(), vtkInfoTextImageInteractor::OnMouseMove(), manualViewBaseContour::TransfromCoordViewWorld(), and vtkPlane2DView::TransfromCoordViewWorld2().
00095 { 00096 GetRenderer()->SetDisplayPoint((int)X, (int)Y, (int)Z); 00097 GetRenderer()->DisplayToWorld(); 00098 double fP[4]; 00099 GetRenderer()->GetWorldPoint( fP ); 00100 if ( fP[3] ){ 00101 fP[0] /= fP[3]; 00102 fP[1] /= fP[3]; 00103 fP[2] /= fP[3]; 00104 } 00105 00106 // EEDx5 00107 //JCP 13/05/2009 00108 vtkInteractorStyleBaseView* interactorstyle = (vtkInteractorStyleBaseView*)this->GetInteractorStyleBaseView(); 00109 wxVtk2DBaseView* baseview = (wxVtk2DBaseView*)interactorstyle->GetWxVtk2DBaseView(); 00110 baseview->TransformCoordinate_spacing_ViewToModel( fP[0] , fP[1] , fP[2] ); 00111 //JCP 13/05/2009 00112 00113 if (type!=0) 00114 { 00115 X=fP[0]; 00116 } 00117 if (type!=1) 00118 { 00119 Y=fP[1]; 00120 } 00121 if (type!=2) 00122 { 00123 Z=fP[2]; 00124 } 00125 }
vtkInteractorStyleImage* wxVtkBaseView::_interactorStyle [private] |
JCP 04/05/09 vtkInteractorStyleImage *_interactorStyle;
Definition at line 74 of file wxVtkBaseView.h.
Referenced by GetInteractorStyleBaseView(), SetInteractorStyleBaseView(), and wxVtkBaseView().
wxVTKRenderWindowInteractor* wxVtkBaseView::_iren [private] |
Definition at line 69 of file wxVtkBaseView.h.
Referenced by GetRenWin(), GetWxVTKRenderWindowInteractor(), Refresh(), wxVtkBaseView(), and ~wxVtkBaseView().
wxWindow* wxVtkBaseView::_parent [private] |
Definition at line 68 of file wxVtkBaseView.h.
Referenced by wxVtkBaseView().