#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 | 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 |
Definition at line 41 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 }
wxVtkBaseView::~wxVtkBaseView | ( | ) | [virtual] |
Definition at line 30 of file wxVtkBaseView.cxx.
References _iren.
00031 { 00032 _iren -> Delete(); 00033 //_iren=NULL; 00034 }
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().
vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView | ( | ) |
Definition at line 166 of file wxVtkBaseView.cxx.
References _interactorStyle.
Referenced by wxWidgetMesure2D::ActiveMessureTool(), wxQuantificationWidgetCT::addManualContours(), wxMaracasRenderTabbedPanel::addMPROptions(), ManualPaintControler::Config(), 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().
00167 { 00168 return _interactorStyle; 00169 }
vtkRenderer * wxVtkBaseView::GetRenderer | ( | ) | [virtual] |
Reimplemented in wxVtk2DView_TMP, wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 80 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(), LayerImageBase::onThreshold(), LayerImageBase::onThresholdRemove(), manualViewPoints::RefreshContour(), manualViewBaseContour::RemoveCompleteContourActor(), manualViewBaseContour::RemoveControlPoints(), manualViewPoints::RemoveSplineActor(), manualViewBaseContour::RemoveSplineActor(), manualViewBaseContour::RemoveTextActor(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), TransCoordScreenToWorld(), and wxMaracasCoutourTool::wxMaracasCoutourTool().
vtkRenderWindow * wxVtkBaseView::GetRenWin | ( | ) | [virtual] |
Reimplemented in wxVtk2DView_TMP, wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 85 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().
00086 { 00087 return _iren->GetRenderWindow(); 00088 }
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().
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().
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 }
void wxVtkBaseView::RefreshView | ( | ) | [virtual] |
Reimplemented in wxSphereView.
Definition at line 68 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().
00069 { 00070 // EED 10 Oct 2007 00071 00072 #if defined(WIN32) 00073 GetRenWin()->Render(); 00074 #else 00075 //GetRenWin()->Render(); 00076 #endif 00077 00078 }
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 }
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 }
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 }
vtkInteractorStyleImage* wxVtkBaseView::_interactorStyle [private] |
JCP 04/05/09 vtkInteractorStyleImage *_interactorStyle;
Definition at line 75 of file wxVtkBaseView.h.
Referenced by GetInteractorStyleBaseView(), SetInteractorStyleBaseView(), and wxVtkBaseView().
wxVTKRenderWindowInteractor* wxVtkBaseView::_iren [private] |
Definition at line 70 of file wxVtkBaseView.h.
Referenced by GetRenWin(), GetWxVTKRenderWindowInteractor(), Refresh(), wxVtkBaseView(), and ~wxVtkBaseView().
wxWindow* wxVtkBaseView::_parent [private] |
Definition at line 69 of file wxVtkBaseView.h.
Referenced by wxVtkBaseView().