- static vtkmyPWCallback_3DPointWidget *New()
- { return new vtkmyPWCallback_3DPointWidget; }
- virtual void Execute(vtkObject *caller, unsigned long, void*);
- vtkmyPWCallback_3DPointWidget(){}
- void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
- void SetVtkPointWidget( vtkPointWidget *pointWidget );
- void SetVtkPlaneWidget( vtkPlaneWidget *planeWidget );
-private:
-
- double _backNormal[3];
- vtkPlaneWidget *_planeWidget;
- vtkPointWidget *_pointWidget;
- wxVtkMPR3DView *_wxvtkmpr3Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxVtkMPR3DView
-{
-public:
- wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview );
- ~wxVtkMPR3DView();
- void VisibleImageActor(int idPosition, bool visible);
- void VisiblePointWidget( bool visible );
- void VisiblePlaneWidget( bool visible );
-
- void SetVisibleTissue(int idTissue, bool visible);
- bool GetVisibleTissue(int idTissue);
- virtual void Refresh();
- virtual void RefreshView();
- virtual void Configure();
- void SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
- wxPanel* CreateControlPanel(wxWindow *parent);
-
- vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
- wxVtk3DBaseView* GetWxvtk3Dbaseview();
-
- void InitOrientationPointWidget();
-
- // EED 25 Janvier 2007 testLoic
- void TestLoic1();
- void TestLoic2();
-
-
-private:
- wxVtk3DBaseView *_wxvtk3Dbaseview;
- vtkMPR3DDataViewer *_vtkmpr3Ddataviewer;
- wxVtkMPR3DViewCntrlPanel *_wxvtkmpr3DviewCntrlPanel;
-
- // Plane Widget (3D)
- vtkPolyData *_vtkplane;
- vtkActor *_contourPlaneActor;
- vtkPlaneWidget *_planeWidget;
-
- // Point Widget (3D)
- vtkPointWidget *_pointWidget;
- vtkmyPWCallback_3DPointWidget *_myCallback;
-
-protected:
-};
-
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxVtkClipping3DView
-{
-public:
- wxVtkClipping3DView( wxVtk3DBaseView* wxvtk3Dbaseview );
- ~wxVtkClipping3DView();
- virtual void Refresh();
- virtual void Configure();
- void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
- wxPanel* CreateControlPanel(wxWindow *parent);
- vtkClipping3DDataViewer* GetVtkClipping3DDataViewer();
-
- void VisibleActor(int idTissue, bool visTissue);
- void VisibleVolumeActor( bool visVolume );
- void SetVisibleBoxSurface(bool visible);
- void SetVisibleBoxVolume(bool visible);
- void SetRepSurfaceWireFrame(int idTissue , bool typeRepresentation );
-
- wxVtk3DBaseView* GetWxvtk3Dbaseview();
-
-private:
- wxVtk3DBaseView *_wxvtk3Dbaseview;
- vtkClipping3DDataViewer *_vtkclipping3Ddataviewer;
- vtkBoxWidget *_boxWidgetS1;
- vtkBoxWidget *_boxWidgetVolume;
- wxVtkClipping3DViewCntrlPanel *_wxvtkclipping3DviewCntrlPanel;
-protected:
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class vtkInteractorStyle3DView : public InteractorStyleMaracas
-{
-public:
- vtkInteractorStyle3DView();
- ~vtkInteractorStyle3DView();
-
- virtual bool OnLeftDClick();
- bool SelectMarchibCubePoint();
-
-
- wxVtkMPR3DView *GetWxVtkMPR3DView();
- void SetWxVtkMPR3DView( wxVtkMPR3DView *wxvtkmpr3Dview );
-
- wxVtkClipping3DView *GetWxVtkClipping3DView();
- void SetWxVtkClipping3DView( wxVtkClipping3DView *wxvtkclipping3Dview);
-
-protected:
-private:
- wxVtkMPR3DView *_wxvtkmpr3Dview;
- wxVtkClipping3DView *_wxvtkclipping3Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingModel
-{
-public:
- figureCuttingModel();
- virtual ~figureCuttingModel();
-
- void SetPosition(double x,double y, double z);
- double GetPositionX();
- double GetPositionY();
- double GetPositionZ();
-
- void SetScale(double sx,double sy, double sz);
- double GetScaleX();
- double GetScaleY();
- double GetScaleZ();
-
- void SetRotation(double alfa,double beta, double teta);
- double GetAngleAlfa();
- double GetAngleBeta();
- double GetAngleTeta();
-
- void SetSpacing(double spcX,double spcY, double spcZ);
-
- void CalculeMatrix();
- void CalculeInversMatrix();
- virtual bool IfPointInside(double x, double y, double z);
- vtkTransform *GetVtkTransform();
-// void SetVtkTransform(vtkTransform *matrix);
- virtual double GetTheoricVolume();
- virtual char *GetName();
-
-private:
- double _px;
- double _py;
- double _pz;
- double _alfa;
- double _beta;
- double _teta;
- double _spcX;
- double _spcY;
- double _spcZ;
-protected:
- double _sx;
- double _sy;
- double _sz;
- vtkTransform *_inversModel;
- vtkTransform *_matrixModel;
- vtkTransform *_matrixVisual;
-
-};
-
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class figureCuttingSphereModel : public figureCuttingModel
-{
-public:
- figureCuttingSphereModel();
- virtual ~figureCuttingSphereModel();
- virtual bool IfPointInside(double x, double y, double z);
- virtual double GetTheoricVolume();
- virtual char *GetName();
-private:
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingCubeModel : public figureCuttingModel
-{
-public:
- figureCuttingCubeModel();
- virtual ~figureCuttingCubeModel();
- virtual bool IfPointInside(double x, double y, double z);
- virtual double GetTheoricVolume();
- virtual char *GetName();
-private:
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class figureCuttingCylinderModel : public figureCuttingModel
-{
-public:
- figureCuttingCylinderModel();
- virtual ~figureCuttingCylinderModel();
- virtual bool IfPointInside(double x, double y, double z);
- virtual double GetTheoricVolume();
- virtual char *GetName();
-private:
-protected:
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxPanelCuttingImageData : public wxPanel
-{
-public:
- wxPanelCuttingImageData (wxWindow *parent);
- ~wxPanelCuttingImageData ();
- void OnTransform(wxScrollEvent& event);
- void OnOpacityFig(wxScrollEvent& event);
- void OnTypeFig(wxCommandEvent& event);
- void OnExtract(wxCommandEvent& event);
- void SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata );
- void SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer );
- void SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview );
-
- void SetParamsOfTransformation( );
- void Configure();
- void Refresh();
- void RefreshView();
- void RemoveActors();
-
-
-private:
- wxSlider *_opacityFig;
- wxSlider *_scaleX;
- wxSlider *_scaleY;
- wxSlider *_scaleZ;
- wxSlider *_rotationX;
- wxSlider *_rotationY;
- wxSlider *_rotationZ;
-
- wxRadioButton *_volIntern;
- wxRadioButton *_volExtern;
- wxCheckBox *_histogrammeAccumulated;
- wxSlider *_isoValue;
- wxSlider *_valueBeforeIsoValue;
- wxSlider *_valueAfterIsoValue;
- wxChoice *_typeFig;
-
- wxStaticText *_infoToVo;
- wxStaticText *_infoSuVo;
- wxStaticText *_infoSuVoA;
- wxStaticText *_infoPixLe;
- wxStaticText *_infoPixHi;
-
- // Model
- figureCuttingCylinderModel *_modelCylinder;
- figureCuttingCubeModel *_modelCube;
- figureCuttingSphereModel *_modelSphere;
- figureCuttingModel *_actualCuttingModel;
-
- // view
- vtkCubeSource *_vtkcube;
- vtkSphereSource *_vtksphere;
- vtkCylinderSource *_vtkcylinder;
- vtkPolyDataMapper *_cubeMapper;
- vtkPolyDataMapper *_sphereMapper;
- vtkPolyDataMapper *_cylinderMapper;
- vtkActor *_cubeActor;
- vtkActor *_sphereActor;
- vtkActor *_cylinderActor;
- vtkActor *_actualActor;
-
-
- vtkMPRBaseData *_vtkmprbasedata;
- wxVtk3DBaseView *_wxvtk3Dbaseview;
- vtkImageData *_imageData;
- vtkClipping3DDataViewer *_vtkclipping3Ddataviewer;
-
- vtkImageData *_histogrammeVector;
- vtkXYPlotActor *_xyplot;
- wxVtkBaseView *_wxvtkbaseView;
-
- void CreateModel();
- void CreateInterface();
- void Create3DViewObjects();
- void RefreshOpacity();
- wxWindow *CreatePlotHistogrammeInterface();
- void InitHistogramme();
-
-
-protected:
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxWidgetMesure2D : public wxSplitterWindow
-{
-public:
- wxWidgetMesure2D( wxWindow *parent );
- ~wxWidgetMesure2D();
-
- void OnActiveMessureTool(wxCommandEvent& event);
- void OnVisibleMessureTool(wxCommandEvent& event);
- void OnCloseContour(wxCommandEvent& event);
- void OnVisibleInformation(wxCommandEvent& event);
-
- void SetMesureScale(double mesureScale);
-
- manualContourModel* GetManualContourModel();
- virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
-
-protected:
- wxVtk2DBaseView *_wxvtk2Dbaseview;
- virtual wxWindow *CreateWin1a(wxWindow *parent);
-private:
- wxCheckBox *_cb_messuretool;
- wxCheckBox *_cb_mt_visible;
- wxCheckBox *_cb_closeContour;
- wxCheckBox *_cb_visibleText;
-
- manualContourControler *_manContourControl_1;
- manualContourModel *_mContourModel_1;
- manualViewContour *_mViewContour_1;
-
- void ActiveMessureTool(bool ok);
-
-// DECLARE_EVENT_TABLE();
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-class wxWidgetMesure2D_Plane : public wxWidgetMesure2D
-{
-public:
- wxWidgetMesure2D_Plane(wxWindow *parent);
- ~wxWidgetMesure2D_Plane();
- void OnActiveLine(wxCommandEvent& event);
- void OnActiveCirlcle(wxCommandEvent& event);
- virtual void ConfigureA(wxVtk2DBaseView *wxvtk2Dbaseview);
- void ConfigureCircleLine();
- void CircleLine();
-
-protected:
- virtual wxWindow *CreateWin1a(wxWindow *parent);
-private:
- wxCheckBox *_cb_line;
- wxCheckBox *_cb_circle;
-
- // Circle 1
- vtkPoints *_ptsCircle1;
- vtkActor *_circle1Actor;
- vtkPolyDataMapper *_circle1Mapper;
- vtkPolyData *_pdCircle1;
- // Circle 2
- vtkPoints *_ptsCircle2;
- vtkActor *_circle2Actor;
- vtkPolyDataMapper *_circle2Mapper;
- vtkPolyData *_pdCircle2;
- // line reference 1
- vtkPoints *_ptsLineRef1;
- vtkActor *_lineRef1Actor;
- vtkPolyDataMapper *_lineRef1Mapper;
- vtkPolyData *_pdLineRef1;
- // line reference 2
- vtkPoints *_ptsLineRef2;
- vtkActor *_lineRef2Actor;
- vtkPolyDataMapper *_lineRef2Mapper;
- vtkPolyData *_pdLineRef2;
-
- void SetVisibleCircle( bool ok );
-
-};
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-class wxWidgetMesure2D_Plane_in_MPR : public wxWidgetMesure2D_Plane
-{
-public:
- wxWidgetMesure2D_Plane_in_MPR(wxWindow *parent);
- ~wxWidgetMesure2D_Plane_in_MPR();
- void OnActiveLink(wxCommandEvent& event);
- void SetVtkPlane2DView(vtkPlane2DView *vtkplane2Dview);
- void SetActiveLink(bool ok);
-
-protected:
- virtual wxWindow *CreateWin1a(wxWindow *parent);
-private:
- wxCheckBox *_cb_link;
- vtkPlane2DView *_vtkplane2Dview;
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-
-
-
-class wxMPRWidget : public wxPanel
-{
-public:
- wxMPRWidget(wxWindow* parent,marImageData *marimageData,double voxelSize);