1 /*=========================================================================
4 Module: $RCSfile: wxMPRWidget.h,v $
6 Date: $Date: 2009/03/24 10:49:21 $
7 Version: $Revision: 1.7 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
18 #ifndef __WX__MPR__WIDGET__HXX__
19 #define __WX__MPR__WIDGET__HXX__
24 #include <vtkObjectBase.h>
25 #include <vtkCommand.h>
27 #include <vtkPoints.h>
28 #include <vtkPolyData.h>
29 #include <vtkPolyDataMapper.h>
30 #include <vtkProbeFilter.h>
31 #include <vtkPlaneSource.h>
32 #include <vtkImageChangeInformation.h>
33 #include <vtkStructuredPoints.h>
34 #include <vtkTransform.h>
35 #include <vtkImageViewer2.h>
36 #include <vtkBoxWidget.h>
37 #include <vtkPointWidget.h>
38 #include <vtkPlaneWidget.h>
40 #include <vtkCubeSource.h>
41 #include <vtkCylinderSource.h>
42 #include <vtkSphereSource.h>
43 #include <vtkProperty2D.h>
44 #include <vtkTextProperty.h>
45 #include <vtkXYPlotActor.h>
48 //#include "kernel/marInterface.h"
49 #include "manualContour.h"
51 #include "wxMPRBaseData.h"
52 #include "wxVtkBaseView.h"
54 #include <wx/notebook.h>
55 #include <wx/listbox.h>
56 #include <wx/tglbtn.h>
57 #include <wx/splitter.h>
63 //------------------------------------------------------------------
64 //------------------------------------------------------------------
65 //------------------------------------------------------------------
67 class vtkInteractorStyleSphere : public InteractorStyleMaracas
70 vtkInteractorStyleSphere();
71 ~vtkInteractorStyleSphere();
72 virtual bool OnLeftButtonUp();
73 virtual bool OnLeftButtonDown();
74 virtual bool OnMouseMove();
75 virtual bool OnRightButtonUp();
76 virtual bool OnRightButtonDown();
92 //------------------------------------------------------------------
93 //------------------------------------------------------------------
94 //------------------------------------------------------------------
101 idAlBeRa(int id, double radio,int deltavoxel);
105 //------------------------------------------------------------------
106 //------------------------------------------------------------------
107 //------------------------------------------------------------------
109 class wxSphereView : public wxVtk2DBaseView
112 wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData);
114 virtual void Configure();
116 void RotationStart(double vx, double vy, bool ok_v, bool ok_ang);
117 virtual void RefreshView();
118 virtual void SetVoxel(double i, double j, int delta, double id, unsigned short gris);
119 void SetDeltaVoxel(int delta);
121 void SetRadio(double radio);
122 int GetIdOfImage(double radio);
123 void SetXYZtoParent(double i, double j);
127 std::vector<idAlBeRa*> _lstId;
140 vtkImageData *_imageDataOriginal;
141 vtkImageData *_imageSphere;
143 vtkMPRBaseData *_vtkmprbasedata;
144 vtkInteractorStyleSphere *_vtkinteractorstylesphere;
146 vtkTransform *_transform;
147 vtkTransform *_transform1;
148 vtkTransform *_transform2;
150 void FiltreImage(int id, double radio);
151 void FiltreImageB(int id, double radio, bool ok,int deltaTMP);
152 void DefineImageSphere();
155 void InitSphere(double points[4][3]);
156 double SphereFindCenter(double P[4][3], double cc[3]);
157 double determinant(double a[4][4], int n);
159 void GetPointSphere(double p[3],double r1,double angA,double angB);
160 void RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]);
161 void TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image);
164 //-------------------------------------------------------------------
165 //-------------------------------------------------------------------
166 //-------------------------------------------------------------------
168 class vtkInteractorStylePlane2D;
169 class vtkInfoTextImageInteractorPlane2D;
171 class vtkPlane2DView : public wxVtk2DBaseView
174 vtkPlane2DView(wxWindow *parent);
179 void SetImgSize( int imgSize );
181 void RotationStart();
182 void RotationDrag(double vx, double vy, bool ok_v, bool ok_ang);
184 virtual int GetActualSlice();
185 virtual void SetActualSlice(int slice);
187 virtual void Refresh( );
189 vtkMPRBaseData *GetVtkmprbasedata();
190 vtkInteractorStylePlane2D *GetInteractorstyleplane2D();
192 void SetActive(bool active);
193 void SetVisibleLine(bool ok);
195 void TransfromeCoordViewWorld2(double &X, double &Y, double &Z);
198 void SetMipWidth(int value);
199 bool GetMipVisualization();
200 void SetMipVisualization(bool ok);
207 bool _mip_visualization;
212 double _backOrient[4];
217 double _n[3]; // Normal
225 vtkImageData * _imageResult;
229 vtkActor *_lineActor;
230 vtkPolyDataMapper *_lineMapper;
233 vtkProbeFilter *_3Dslices;
234 vtkPlaneSource *_pSource;
235 vtkStructuredPoints *_stPoints;
236 vtkImageChangeInformation *_change;
237 vtkTransform *_transform1;
238 vtkTransform *_transform2;
240 vtkInteractorStylePlane2D *_interactorstyleplane2D;
242 vtkInfoTextImage *_vtkInfoTextImage;
243 vtkInfoTextImageInteractorPlane2D *_vtkInfoTextImageInteractorPlane2D;
246 void SetPSource(int sizeIma);
247 void HorizontalLine();
249 void Extract_One_PlaneVTK();
250 void Extract_MIP_PlaneVTK();
256 //------------------------------------------------------------------
257 //------------------------------------------------------------------
258 //------------------------------------------------------------------
260 class vtkInfoTextImageInteractorPlane2D : public vtkInfoTextImageInteractor{
262 vtkInfoTextImageInteractorPlane2D();
263 ~vtkInfoTextImageInteractorPlane2D();
267 virtual bool OnMouseMove();
273 //------------------------------------------------------------------
274 //------------------------------------------------------------------
275 //------------------------------------------------------------------
277 class vtkInteractorStylePlane2D : public InteractorStyleMaracas
280 vtkInteractorStylePlane2D();
281 ~vtkInteractorStylePlane2D();
282 virtual bool OnLeftButtonDown();
283 virtual bool OnLeftButtonUp();
284 virtual bool OnMouseMove();
285 virtual bool OnRightButtonUp();
286 virtual bool OnLeftDClick();
287 bool GetStateRotate();
298 // ----------------------------------------------------------------------------
299 // ----------------------------------------------------------------------------
300 // ----------------------------------------------------------------------------
302 class manualViewPerpPlaneContour : public manualViewContour
305 manualViewPerpPlaneContour();
306 ~manualViewPerpPlaneContour();
307 virtual manualViewPerpPlaneContour * Clone();
308 void CopyAttributesTo( manualViewPerpPlaneContour *cloneObject );
310 virtual void UpdateViewPoint(int id);
311 virtual void RefreshContour();
312 virtual void TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type );
313 virtual bool ifTouchContour( int x, int y, int z);
317 void FilterCordinateXYZ (double &x, double &y, double &z);
322 //------------------------------------------------------------------
323 //------------------------------------------------------------------
324 //------------------------------------------------------------------
326 class vtkInteractorStyleMPRView;
328 class creaMaracasVisu_EXPORT wxVtkMPR2DView : public wxVtk2DBaseView
331 wxVtkMPR2DView( wxWindow *parent, int direction );
334 virtual void Refresh();
335 vtkMPRBaseData *GetVtkmprbasedata();
336 virtual int GetActualSlice();
337 virtual void SetActualSlice(int slice);
339 bool IfMouseTouchX(double x, double y, double z);
340 bool IfMouseTouchY(double x, double y, double z);
341 bool IfMouseTouchZ(double x, double y, double z);
342 void MoveX(double x, double y, double z);
343 void MoveY(double x, double y, double z);
344 void MoveZ(double x, double y, double z);
345 void ChangeAxisColor(double x, double y, double z);
346 virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type);
347 void SetVisibleAxis(bool ok);
360 vtkActor *_lineAActor;
361 vtkPolyDataMapper *_lineAMapper;
364 vtkActor *_lineBActor;
365 vtkPolyDataMapper *_lineBMapper;
367 // vtkInteractorStyle2DMaracas *_interactorStyle2DMaracas;
368 vtkInteractorStyleMPRView *_interactorstylemprview;
374 //------------------------------------------------------------------
375 //------------------------------------------------------------------
376 //------------------------------------------------------------------
378 class vtkInteractorStyleMPRView : public InteractorStyleMaracas
381 vtkInteractorStyleMPRView();
382 ~vtkInteractorStyleMPRView();
384 virtual bool OnMouseMove();
385 virtual bool OnLeftButtonDown();
386 virtual bool OnLeftButtonUp();
387 virtual bool OnLeftDClick();
394 bool _stateMoveAxisX;
395 bool _stateMoveAxisY;
396 bool _stateMoveAxisZ;
404 //------------------------------------------------------------------
405 //------------------------------------------------------------------
406 //------------------------------------------------------------------
407 class wxVtkMPR3DView;
409 class wxVtkMPR3DViewCntrlPanel: public wxPanel
412 wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview);
413 ~wxVtkMPR3DViewCntrlPanel();
414 void OnVisibleAxisX(wxCommandEvent& event);
415 void OnVisibleAxisY(wxCommandEvent& event);
416 void OnVisibleAxisZ(wxCommandEvent& event);
417 void OnPositionX(wxScrollEvent& event);
418 void OnPositionY(wxScrollEvent& event);
419 void OnPositionZ(wxScrollEvent& event);
420 void OnVisibleAxisXYZ(wxCommandEvent& event);
421 void OnVisiblePlane(wxCommandEvent& event);
422 void OnEditColorTable(wxCommandEvent& event);
423 virtual void Refresh();
426 wxVtkMPR3DView *_wxvtkmpr3Dview;
430 wxSlider *_isoValueSpin;
431 wxStaticText *_isoValueText;
432 wxRadioButton *_surfA;
433 wxRadioButton *_surfB;
434 wxRadioButton *_surfC;
435 wxRadioButton *_surfD;
436 wxCheckBox *_visible;
438 wxSlider *_positionX;
439 wxSlider *_positionY;
440 wxSlider *_positionZ;
442 wxCheckBox *_ckBoxXYZ;
443 wxCheckBox *_ckBoxPlane;
451 //------------------------------------------------------------------
452 //------------------------------------------------------------------
453 //------------------------------------------------------------------
454 class wxVtkClipping3DView;
458 class wxVtkClipping3DViewCntrlPanel: public wxPanel
461 wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *_wxvtkclipping3Dview);
462 ~wxVtkClipping3DViewCntrlPanel();
463 void OnSurface(wxCommandEvent& event);
464 void OnRepresentationSurfaceWireFrame(wxCommandEvent& event);
465 void OnVisibleVolume(wxCommandEvent& event);
466 void OnVisibleBoxSurface(wxCommandEvent& event);
467 void OnVisibleBoxVolume(wxCommandEvent& event);
468 void OnColor(wxCommandEvent& event);
469 void OnVisibleSurface(wxCommandEvent& event);
470 void OnOpacity(wxScrollEvent& event);
471 void OnIsoValue(wxScrollEvent& event);
472 void OnIsoValueSpin(wxScrollEvent& event);
473 virtual void Refresh();
474 void OnBtnCreateFileSTL(wxCommandEvent& event);
475 void OnBtnSaveRawVolume(wxCommandEvent& event);
476 void OnBtnVolumeFunctions(wxCommandEvent& event);
477 void OnBtnMeshVTKLoad(wxCommandEvent& event);
481 wxVtkClipping3DView *_wxvtkclipping3Dview;
484 wxSlider *_isoValueSpin;
485 wxRadioButton *_surfA;
486 wxRadioButton *_surfB;
487 wxRadioButton *_surfC;
488 wxRadioButton *_surfD;
489 wxCheckBox *_visible;
492 wxRadioButton *_wireFrameRep;
493 wxRadioButton *_surfaceRep;
501 //------------------------------------------------------------------
502 //------------------------------------------------------------------
503 //------------------------------------------------------------------
506 class vtkmyPWCallback_3DPointWidget : public vtkCommand
509 static vtkmyPWCallback_3DPointWidget *New()
510 { return new vtkmyPWCallback_3DPointWidget; }
511 virtual void Execute(vtkObject *caller, unsigned long, void*);
512 vtkmyPWCallback_3DPointWidget(){}
513 void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
514 void SetVtkPointWidget( vtkPointWidget *pointWidget );
515 void SetVtkPlaneWidget( vtkPlaneWidget *planeWidget );
518 double _backNormal[3];
519 vtkPlaneWidget *_planeWidget;
520 vtkPointWidget *_pointWidget;
521 wxVtkMPR3DView *_wxvtkmpr3Dview;
525 //------------------------------------------------------------------
526 //------------------------------------------------------------------
527 //------------------------------------------------------------------
529 class creaMaracasVisu_EXPORT wxVtkMPR3DView
532 wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview );
533 virtual ~wxVtkMPR3DView();
534 void VisibleImageActor(int idPosition, bool visible);
535 void VisiblePointWidget( bool visible );
536 void VisiblePlaneWidget( bool visible );
538 void SetVisibleTissue(int idTissue, bool visible);
539 bool GetVisibleTissue(int idTissue);
540 virtual void Refresh();
541 virtual void RefreshView();
542 virtual void Configure();
543 void SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
544 wxPanel* CreateControlPanel(wxWindow *parent);
546 vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
547 wxVtk3DBaseView* GetWxvtk3Dbaseview();
549 void InitOrientationPointWidget();
551 // EED 25 Janvier 2007 testLoic
557 wxVtk3DBaseView *_wxvtk3Dbaseview;
558 vtkMPR3DDataViewer *_vtkmpr3Ddataviewer;
559 wxVtkMPR3DViewCntrlPanel *_wxvtkmpr3DviewCntrlPanel;
562 vtkPolyData *_vtkplane;
563 vtkActor *_contourPlaneActor;
564 vtkPlaneWidget *_planeWidget;
567 vtkPointWidget *_pointWidget;
568 vtkmyPWCallback_3DPointWidget *_myCallback;
576 //------------------------------------------------------------------
577 //------------------------------------------------------------------
578 //------------------------------------------------------------------
580 class wxVtkClipping3DView
583 wxVtkClipping3DView( wxVtk3DBaseView* wxvtk3Dbaseview );
584 virtual ~wxVtkClipping3DView();
585 virtual void Refresh();
586 virtual void Configure();
587 void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
588 wxPanel* CreateControlPanel(wxWindow *parent);
589 vtkClipping3DDataViewer* GetVtkClipping3DDataViewer();
591 void VisibleActor(int idTissue, bool visTissue);
592 void VisibleVolumeActor( bool visVolume );
593 void SetVisibleBoxSurface(bool visible);
594 void SetVisibleBoxVolume(bool visible);
595 void SetRepSurfaceWireFrame(int idTissue , bool typeRepresentation );
597 wxVtk3DBaseView* GetWxvtk3Dbaseview();
600 wxVtk3DBaseView *_wxvtk3Dbaseview;
601 vtkClipping3DDataViewer *_vtkclipping3Ddataviewer;
602 vtkBoxWidget *_boxWidgetS1;
603 vtkBoxWidget *_boxWidgetVolume;
604 wxVtkClipping3DViewCntrlPanel *_wxvtkclipping3DviewCntrlPanel;
610 //------------------------------------------------------------------
611 //------------------------------------------------------------------
612 //------------------------------------------------------------------
614 class vtkInteractorStyle3DView : public InteractorStyleMaracas
617 vtkInteractorStyle3DView();
618 ~vtkInteractorStyle3DView();
620 virtual bool OnLeftDClick();
621 bool SelectMarchibCubePoint();
624 wxVtkMPR3DView *GetWxVtkMPR3DView();
625 void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
627 wxVtkClipping3DView *GetWxVtkClipping3DView();
628 void SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview);
632 wxVtkMPR3DView *_wxvtkmpr3Dview;
633 wxVtkClipping3DView *_wxvtkclipping3Dview;
637 //------------------------------------------------------------------
638 //------------------------------------------------------------------
639 //------------------------------------------------------------------
641 class figureCuttingModel
644 figureCuttingModel();
645 virtual ~figureCuttingModel();
647 void SetPosition(double x,double y, double z);
648 double GetPositionX();
649 double GetPositionY();
650 double GetPositionZ();
652 void SetScale(double sx,double sy, double sz);
657 void SetRotation(double alfa,double beta, double teta);
658 double GetAngleAlfa();
659 double GetAngleBeta();
660 double GetAngleTeta();
662 void SetSpacing(double spcX,double spcY, double spcZ);
664 void CalculeMatrix();
665 void CalculeInversMatrix();
666 virtual bool IfPointInside(double x, double y, double z);
667 vtkTransform *GetVtkTransform();
668 // void SetVtkTransform(vtkTransform *matrix);
669 virtual double GetTheoricVolume();
670 virtual char *GetName();
686 vtkTransform *_inversModel;
687 vtkTransform *_matrixModel;
688 vtkTransform *_matrixVisual;
694 //------------------------------------------------------------------
695 //------------------------------------------------------------------
696 //------------------------------------------------------------------
699 class figureCuttingSphereModel : public figureCuttingModel
702 figureCuttingSphereModel();
703 virtual ~figureCuttingSphereModel();
704 virtual bool IfPointInside(double x, double y, double z);
705 virtual double GetTheoricVolume();
706 virtual char *GetName();
711 //------------------------------------------------------------------
712 //------------------------------------------------------------------
713 //------------------------------------------------------------------
715 class figureCuttingCubeModel : public figureCuttingModel
718 figureCuttingCubeModel();
719 virtual ~figureCuttingCubeModel();
720 virtual bool IfPointInside(double x, double y, double z);
721 virtual double GetTheoricVolume();
722 virtual char *GetName();
727 //------------------------------------------------------------------
728 //------------------------------------------------------------------
729 //------------------------------------------------------------------
731 class figureCuttingCylinderModel : public figureCuttingModel
734 figureCuttingCylinderModel();
735 virtual ~figureCuttingCylinderModel();
736 virtual bool IfPointInside(double x, double y, double z);
737 virtual double GetTheoricVolume();
738 virtual char *GetName();
744 //------------------------------------------------------------------
745 //------------------------------------------------------------------
746 //------------------------------------------------------------------
748 class wxPanelCuttingImageData : public wxPanel
751 wxPanelCuttingImageData (wxWindow *parent);
752 ~wxPanelCuttingImageData ();
753 void OnTransform(wxScrollEvent& event);
754 void OnOpacityFig(wxScrollEvent& event);
755 void OnTypeFig(wxCommandEvent& event);
756 void OnExtract(wxCommandEvent& event);
757 void SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata );
758 void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
759 void SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview );
761 void SetParamsOfTransformation( );
769 wxSlider *_opacityFig;
773 wxSlider *_rotationX;
774 wxSlider *_rotationY;
775 wxSlider *_rotationZ;
777 wxRadioButton *_volIntern;
778 wxRadioButton *_volExtern;
779 wxCheckBox *_histogrammeAccumulated;
781 wxSlider *_valueBeforeIsoValue;
782 wxSlider *_valueAfterIsoValue;
785 wxStaticText *_infoToVo;
786 wxStaticText *_infoSuVo;
787 wxStaticText *_infoSuVoA;
788 wxStaticText *_infoPixLe;
789 wxStaticText *_infoPixHi;
792 figureCuttingCylinderModel *_modelCylinder;
793 figureCuttingCubeModel *_modelCube;
794 figureCuttingSphereModel *_modelSphere;
795 figureCuttingModel *_actualCuttingModel;
798 vtkCubeSource *_vtkcube;
799 vtkSphereSource *_vtksphere;
800 vtkCylinderSource *_vtkcylinder;
801 vtkPolyDataMapper *_cubeMapper;
802 vtkPolyDataMapper *_sphereMapper;
803 vtkPolyDataMapper *_cylinderMapper;
804 vtkActor *_cubeActor;
805 vtkActor *_sphereActor;
806 vtkActor *_cylinderActor;
807 vtkActor *_actualActor;
810 vtkMPRBaseData *_vtkmprbasedata;
811 wxVtk3DBaseView *_wxvtk3Dbaseview;
812 vtkImageData *_imageData;
813 vtkClipping3DDataViewer *_vtkclipping3Ddataviewer;
815 vtkImageData *_histogrammeVector;
816 vtkXYPlotActor *_xyplot;
817 wxVtkBaseView *_wxvtkbaseView;
820 void CreateInterface();
821 void Create3DViewObjects();
822 void RefreshOpacity();
823 wxWindow *CreatePlotHistogrammeInterface();
824 void InitHistogramme();
830 //------------------------------------------------------------------
831 //------------------------------------------------------------------
832 //------------------------------------------------------------------
834 class wxWidgetMesure2D : public wxSplitterWindow
837 wxWidgetMesure2D( wxWindow *parent );
840 void OnActiveMessureTool(wxCommandEvent& event);
841 void OnVisibleMessureTool(wxCommandEvent& event);
842 void OnCloseContour(wxCommandEvent& event);
843 void OnVisibleInformation(wxCommandEvent& event);
845 void SetMesureScale(double mesureScale);
847 manualContourModel* GetManualContourModel();
848 virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
851 wxVtk2DBaseView *_wxvtk2Dbaseview;
852 virtual wxWindow *CreateWin1a(wxWindow *parent);
854 wxCheckBox *_cb_messuretool;
855 wxCheckBox *_cb_mt_visible;
856 wxCheckBox *_cb_closeContour;
857 wxCheckBox *_cb_visibleText;
859 manualContourControler *_manContourControl_1;
860 manualContourModel *_mContourModel_1;
861 manualViewContour *_mViewContour_1;
863 void ActiveMessureTool(bool ok);
865 // DECLARE_EVENT_TABLE();
868 //------------------------------------------------------------------
869 //------------------------------------------------------------------
870 //------------------------------------------------------------------
872 class wxWidgetMesure2D_Plane : public wxWidgetMesure2D
875 wxWidgetMesure2D_Plane(wxWindow *parent);
876 ~wxWidgetMesure2D_Plane();
877 void OnActiveLine(wxCommandEvent& event);
878 void OnActiveCirlcle(wxCommandEvent& event);
879 virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
880 void ConfigureCircleLine();
884 virtual wxWindow *CreateWin1a(wxWindow *parent);
886 wxCheckBox *_cb_line;
887 wxCheckBox *_cb_circle;
890 vtkPoints *_ptsCircle1;
891 vtkActor *_circle1Actor;
892 vtkPolyDataMapper *_circle1Mapper;
893 vtkPolyData *_pdCircle1;
895 vtkPoints *_ptsCircle2;
896 vtkActor *_circle2Actor;
897 vtkPolyDataMapper *_circle2Mapper;
898 vtkPolyData *_pdCircle2;
900 vtkPoints *_ptsLineRef1;
901 vtkActor *_lineRef1Actor;
902 vtkPolyDataMapper *_lineRef1Mapper;
903 vtkPolyData *_pdLineRef1;
905 vtkPoints *_ptsLineRef2;
906 vtkActor *_lineRef2Actor;
907 vtkPolyDataMapper *_lineRef2Mapper;
908 vtkPolyData *_pdLineRef2;
910 void SetVisibleCircle( bool ok );
914 //------------------------------------------------------------------
915 //------------------------------------------------------------------
916 //------------------------------------------------------------------
919 class wxWidgetMesure2D_Plane_in_MPR : public wxWidgetMesure2D_Plane
922 wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent);
923 ~wxWidgetMesure2D_Plane_in_MPR();
924 void OnActiveLink(wxCommandEvent& event);
925 void SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview);
926 void SetActiveLink(bool ok);
929 virtual wxWindow *CreateWin1a(wxWindow *parent);
931 wxCheckBox *_cb_link;
932 vtkPlane2DView *_vtkplane2Dview;
936 //------------------------------------------------------------------
937 //------------------------------------------------------------------
938 //------------------------------------------------------------------
942 class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel
945 wxMPRWidget(wxWindow* parent,marImageData *marimageData = NULL,double voxelSize = -1);
949 virtual void OnRefreshView(wxCommandEvent & event);
950 void OnDClickLeft(wxCommandEvent & event);
952 void OnPageAChanged(wxNotebookEvent & event);
953 void OnPageBChanged(wxNotebookEvent & event);
955 vtkMPRBaseData *GetVtkMPRBaseData();
956 vtkPlane2DView *GetVtkPlane2DView();
958 //returns the 3d view of the widget
959 wxVtkMPR3DView *GetWxvtkmpr3Dview_BB();
961 void RefreshView(bool firsttime=false);
963 wxVtkBaseView *GetWxVtkBaseView(int page, int id);
965 //returns the 2d view of the specific direction (0|1|2)
966 wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction);
968 void setMarImage(marImageData *marimageData, double voxelsize);
972 marImageData *_marImageData;
973 vtkMPRBaseData *_vtkmprbasedata;
974 wxVtkMPR2DView *_vtkmpr2Dview[3];
975 vtkPlane2DView *_vtkplane2Dview;
976 wxSphereView *_wxsphereview;
977 wxVtkMPR2DView *_vtkmpr2Dview_B[3];
978 vtkPlane2DView *_vtkplane2Dview_B;
979 wxSphereView *_wxsphereview_B;
981 wxVtk3DBaseView *_wxvtk3Dbaseview_MPRClipping3D;
982 wxVtkMPR3DView *_wxvtkmpr3Dview;
983 wxVtkClipping3DView *_wxvtkclipping3Dview;
985 wxVtk3DBaseView *_wxvtk3Dbaseview_MPR3D_B;
986 wxVtkMPR3DView *_wxvtkmpr3Dview_B;
988 wxVtk3DBaseView *_wxvtk3Dbaseview_Clipping3D_BB;
989 wxVtkMPR3DView *_wxvtkmpr3Dview_BB;
990 wxVtkClipping3DView *_wxvtkclipping3Dview_BB;
996 wxFrame *_framePanelCutting;
997 wxCheckBox *_btnCutImageData;
998 wxPanelCuttingImageData *_panelCutting;
1000 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure;
1001 wxWidgetMesure2D_Plane_in_MPR *_widgetMesure_B;
1003 wxPanel *CreateControlPanel(wxWindow *parent);
1004 wxPanel *CreateMPRPanel(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
1005 wxPanel *CreateMPRPanel4View(wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
1006 wxPanel *CreateView(int type,wxWindow *parent, vtkMPRBaseData *vtkmprbasedata);
1008 void OnCutImagaData( wxCommandEvent &event);
1010 DECLARE_EVENT_TABLE( );
1014 class creaMaracasVisu_EXPORT wxMPRWidget2 : public wxMPRWidget
1017 wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize);
1019 virtual void OnRefreshView(wxCommandEvent & event);
1027 #endif // __WX__MPR__WIDGET__HXX__
1031 // EOF - wxMPRWidget.h