#include <wxImageViewerWidget.h>
Public Member Functions | |
wxVtk2DView_TMP (vtkImageViewer2 *imageviewer2) | |
~wxVtk2DView_TMP () | |
virtual vtkRenderer * | GetRenderer () |
virtual vtkRenderWindow * | GetRenWin () |
virtual void | Configure () |
void | SetWxVTKRenderWindowInteractor (wxVTKRenderWindowInteractor *wxVTKiren) |
virtual wxVTKRenderWindowInteractor * | GetWxVTKRenderWindowInteractor () |
virtual void | Refresh () |
virtual void | RefreshView () |
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 | |
wxVTKRenderWindowInteractor * | _wxVTKiren |
vtkImageViewer2 * | _imageviewer2 |
Definition at line 40 of file wxImageViewerWidget.h.
wxVtk2DView_TMP::wxVtk2DView_TMP | ( | vtkImageViewer2 * | imageviewer2 | ) |
Most of the class was done thanks to this mail, thank you James !! http://public.kitware.com/pipermail/vtkusers/2003-April/017063.html
Definition at line 66 of file wxImageViewerWidget.cxx.
References _imageviewer2.
00067 { 00068 _imageviewer2 = imageviewer2; 00069 }
wxVtk2DView_TMP::~wxVtk2DView_TMP | ( | ) |
Definition at line 71 of file wxImageViewerWidget.cxx.
void wxVtk2DView_TMP::Configure | ( | ) | [virtual] |
Reimplemented from wxVtkBaseView.
Definition at line 85 of file wxImageViewerWidget.cxx.
References GetWxVTKRenderWindowInteractor(), vtkInteractorStyleBaseView2D::New(), wxVtkBaseView::SetInteractorStyleBaseView(), and vtkInteractorStyleBaseView::SetwxVtkBaseView().
Referenced by wxImageViewerWidget::ConstructVTK().
00086 { 00087 vtkInteractorStyleBaseView *interactorstylebaseview; 00088 interactorstylebaseview = vtkInteractorStyleBaseView2D::New(); 00089 00090 SetInteractorStyleBaseView(interactorstylebaseview); 00091 wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor(); 00092 interactorstylebaseview->SetInteractor ( iren ); 00093 iren->SetInteractorStyle(interactorstylebaseview); 00094 interactorstylebaseview->SetwxVtkBaseView(this); 00095 }
vtkInteractorStyleImage * wxVtkBaseView::GetInteractorStyleBaseView | ( | ) | [inherited] |
Definition at line 134 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_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 wxVtkBaseView::TransFromCoordScreenToWorld().
00135 { 00136 return _interactorStyle; 00137 }
vtkRenderer * wxVtk2DView_TMP::GetRenderer | ( | ) | [virtual] |
Reimplemented from wxVtkBaseView.
Definition at line 75 of file wxImageViewerWidget.cxx.
References _imageviewer2.
00076 { 00077 return _imageviewer2->GetRenderer(); 00078 }
vtkRenderWindow * wxVtk2DView_TMP::GetRenWin | ( | ) | [virtual] |
Reimplemented from wxVtkBaseView.
Definition at line 80 of file wxImageViewerWidget.cxx.
References _imageviewer2.
00081 { 00082 return _imageviewer2->GetRenderWindow(); 00083 }
void wxVtkBaseView::GetSpacing | ( | double | spc[3] | ) | [virtual, inherited] |
Reimplemented in wxVtk2DBaseView, and wxVtk3DBaseView.
Definition at line 149 of file wxVtkBaseView.cxx.
Referenced by wxManualTree_MPRWidget::ConfigureContour(), and manualViewPerpPlaneContour::FilterCordinateXYZ().
wxVTKRenderWindowInteractor * wxVtk2DView_TMP::GetWxVTKRenderWindowInteractor | ( | ) | [virtual] |
Reimplemented from wxVtkBaseView.
Definition at line 102 of file wxImageViewerWidget.cxx.
References _wxVTKiren.
Referenced by Configure().
00103 { 00104 return _wxVTKiren; 00105 }
void wxVtkBaseView::Refresh | ( | ) | [virtual, inherited] |
Reimplemented in vtkPlane2DView, wxVtk2DBaseView, wxVtk3DBaseView, and wxVtkMPR2DView.
Definition at line 51 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_iren, and wxVtkBaseView::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, inherited] |
Reimplemented in wxSphereView.
Definition at line 70 of file wxVtkBaseView.cxx.
References wxVtkBaseView::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 | ) | [inherited] |
Definition at line 142 of file wxVtkBaseView.cxx.
References wxVtkBaseView::_interactorStyle.
Referenced by wxVtk3DBaseView::Configure(), Configure(), and wxVtk2DBaseView::SetInteractorStyleImage().
00143 { 00144 _interactorStyle = interactorStyle; 00145 }
void wxVtk2DView_TMP::SetWxVTKRenderWindowInteractor | ( | wxVTKRenderWindowInteractor * | wxVTKiren | ) |
Definition at line 97 of file wxImageViewerWidget.cxx.
References _wxVTKiren.
Referenced by wxImageViewerWidget::ConstructVTK().
00098 { 00099 _wxVTKiren = wxVTKiren; 00100 }
void wxVtkBaseView::TransFromCoordScreenToWorld | ( | double & | X, | |
double & | Y, | |||
double & | Z, | |||
bool | keepNormalDirection = false , |
|||
int | type = 2 | |||
) | [virtual, inherited] |
Reimplemented in wxVtkMPR2DView.
Definition at line 94 of file wxVtkBaseView.cxx.
References wxVtkBaseView::GetInteractorStyleBaseView(), wxVtkBaseView::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 }
vtkImageViewer2* wxVtk2DView_TMP::_imageviewer2 [private] |
Definition at line 52 of file wxImageViewerWidget.h.
Referenced by GetRenderer(), GetRenWin(), and wxVtk2DView_TMP().
Definition at line 51 of file wxImageViewerWidget.h.
Referenced by GetWxVTKRenderWindowInteractor(), and SetWxVTKRenderWindowInteractor().