X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxMPRWidget.h;h=88cf9a52eaeb4b238847dfd0a76feb811e161ee5;hb=b90d2dce776b27c95bd59251ee83d10a42b0cae5;hp=c98583a5eda18aa2a2cf7b95515957113b15f8d9;hpb=e6b030ceb3ee4eea1f012e7d5c47503cf6322c61;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h index c98583a..88cf9a5 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMPRWidget.h @@ -1,10 +1,35 @@ +/*# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sant�) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ */ + /*========================================================================= Program: wxMaracas Module: $RCSfile: wxMPRWidget.h,v $ Language: C++ - Date: $Date: 2009/03/24 10:49:21 $ - Version: $Revision: 1.7 $ + Date: $Date: 2012/11/15 14:14:35 $ + Version: $Revision: 1.13 $ Copyright: (c) 2002, 2003 License: @@ -44,10 +69,6 @@ #include #include - -//#include "kernel/marInterface.h" -#include "manualContour.h" - #include "wxMPRBaseData.h" #include "wxVtkBaseView.h" @@ -56,888 +77,25 @@ #include #include #include "marTypes.h" - -class wxMPRWidget; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class vtkInteractorStyleSphere : public InteractorStyleMaracas -{ -public: - vtkInteractorStyleSphere(); - ~vtkInteractorStyleSphere(); - virtual bool OnLeftButtonUp(); - virtual bool OnLeftButtonDown(); - virtual bool OnMouseMove(); - virtual bool OnRightButtonUp(); - virtual bool OnRightButtonDown(); - -private: - bool _stateRotate; - bool _stateRadio; - int _fordwareX; - int _fordwareY; - - double _radio; -}; - - - - - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ -class idAlBeRa -{ -public: - int _id; - double _radio; - int _deltavoxel; - idAlBeRa(int id, double radio,int deltavoxel); -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class wxSphereView : public wxVtk2DBaseView -{ -public: - wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData); - ~wxSphereView(); - virtual void Configure(); - void RotationEnd(); - void RotationStart(double vx, double vy, bool ok_v, bool ok_ang); - virtual void RefreshView(); - virtual void SetVoxel(double i, double j, int delta, double id, unsigned short gris); - void SetDeltaVoxel(int delta); - double GetRadio(); - void SetRadio(double radio); - int GetIdOfImage(double radio); - void SetXYZtoParent(double i, double j); - void RefreshPoint(); - -private: - std::vector _lstId; - - int _centerX; - int _centerY; - int _centerZ; - double _radio; - - double _ang; - double _vxb; - double _vyb; - - int _delta; - - vtkImageData *_imageDataOriginal; - vtkImageData *_imageSphere; - - vtkMPRBaseData *_vtkmprbasedata; - vtkInteractorStyleSphere *_vtkinteractorstylesphere; - - vtkTransform *_transform; - vtkTransform *_transform1; - vtkTransform *_transform2; - - void FiltreImage(int id, double radio); - void FiltreImageB(int id, double radio, bool ok,int deltaTMP); - void DefineImageSphere(); - void ResetlstId(); - - void InitSphere(double points[4][3]); - double SphereFindCenter(double P[4][3], double cc[3]); - double determinant(double a[4][4], int n); - - void GetPointSphere(double p[3],double r1,double angA,double angB); - void RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]); - void TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image); -}; - -//------------------------------------------------------------------- -//------------------------------------------------------------------- -//------------------------------------------------------------------- - -class vtkInteractorStylePlane2D; -class vtkInfoTextImageInteractorPlane2D; - -class vtkPlane2DView : public wxVtk2DBaseView -{ -public: - vtkPlane2DView(wxWindow *parent); - ~vtkPlane2DView(); - void Configure(); - void ExtractPlane(); - int GetImgSize(); - void SetImgSize( int imgSize ); - - void RotationStart(); - void RotationDrag(double vx, double vy, bool ok_v, bool ok_ang); - - virtual int GetActualSlice(); - virtual void SetActualSlice(int slice); - - virtual void Refresh( ); - - vtkMPRBaseData *GetVtkmprbasedata(); - vtkInteractorStylePlane2D *GetInteractorstyleplane2D(); - - void SetActive(bool active); - void SetVisibleLine(bool ok); - - void TransfromeCoordViewWorld2(double &X, double &Y, double &Z); - - int GetMipWidth(); - void SetMipWidth(int value); - bool GetMipVisualization(); - void SetMipVisualization(bool ok); - - void ResetBack(); - -private: - bool _active; - int _mip_width; - bool _mip_visualization; - - double _backX; - double _backY; - double _backZ; - double _backOrient[4]; - - double _ang; - double _vxb; - double _vyb; - double _n[3]; // Normal - - double _cx; - double _cy; - double _cz; - - int _sizeIma; - - vtkImageData * _imageResult; - - // Horizontal line - vtkPoints *_pts; - vtkActor *_lineActor; - vtkPolyDataMapper *_lineMapper; - vtkPolyData *_pd; - - vtkProbeFilter *_3Dslices; - vtkPlaneSource *_pSource; - vtkStructuredPoints *_stPoints; - vtkImageChangeInformation *_change; - vtkTransform *_transform1; - vtkTransform *_transform2; - - vtkInteractorStylePlane2D *_interactorstyleplane2D; - - vtkInfoTextImage *_vtkInfoTextImage; - vtkInfoTextImageInteractorPlane2D *_vtkInfoTextImageInteractorPlane2D; - - - void SetPSource(int sizeIma); - void HorizontalLine(); - void ResetPlane(); - void Extract_One_PlaneVTK(); - void Extract_MIP_PlaneVTK(); - -protected: -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class vtkInfoTextImageInteractorPlane2D : public vtkInfoTextImageInteractor{ -public: - vtkInfoTextImageInteractorPlane2D(); - ~vtkInfoTextImageInteractorPlane2D(); - -protected: - - virtual bool OnMouseMove(); - -private: -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class vtkInteractorStylePlane2D : public InteractorStyleMaracas -{ -public: - vtkInteractorStylePlane2D(); - ~vtkInteractorStylePlane2D(); - virtual bool OnLeftButtonDown(); - virtual bool OnLeftButtonUp(); - virtual bool OnMouseMove(); - virtual bool OnRightButtonUp(); - virtual bool OnLeftDClick(); - bool GetStateRotate(); - -private: - bool _stateRotate; - - int _fordwareX; - int _fordwareY; -}; - - - -// ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- - -class manualViewPerpPlaneContour : public manualViewContour -{ -public: - manualViewPerpPlaneContour(); - ~manualViewPerpPlaneContour(); - virtual manualViewPerpPlaneContour * Clone(); - void CopyAttributesTo( manualViewPerpPlaneContour *cloneObject ); - - virtual void UpdateViewPoint(int id); - virtual void RefreshContour(); - virtual void TransfromeCoordViewWorld( double &X,double &Y,double &Z,int type ); - virtual bool ifTouchContour( int x, int y, int z); - -protected: -private: - void FilterCordinateXYZ (double &x, double &y, double &z); -}; - - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class vtkInteractorStyleMPRView; - -class creaMaracasVisu_EXPORT wxVtkMPR2DView : public wxVtk2DBaseView -{ -public: - wxVtkMPR2DView( wxWindow *parent, int direction ); - ~wxVtkMPR2DView(); - void Configure(); - virtual void Refresh(); - vtkMPRBaseData *GetVtkmprbasedata(); - virtual int GetActualSlice(); - virtual void SetActualSlice(int slice); - - bool IfMouseTouchX(double x, double y, double z); - bool IfMouseTouchY(double x, double y, double z); - bool IfMouseTouchZ(double x, double y, double z); - void MoveX(double x, double y, double z); - void MoveY(double x, double y, double z); - void MoveZ(double x, double y, double z); - void ChangeAxisColor(double x, double y, double z); - virtual void TransfromeCoordViewWorld(double &X, double &Y, double &Z, int type); - void SetVisibleAxis(bool ok); - - -private: - - int _backX; - int _backY; - int _backZ; - - bool _visibleAxis; - - int _direction; - vtkPoints *_ptsA; - vtkActor *_lineAActor; - vtkPolyDataMapper *_lineAMapper; - vtkPolyData *_pdA; - vtkPoints *_ptsB; - vtkActor *_lineBActor; - vtkPolyDataMapper *_lineBMapper; - vtkPolyData *_pdB; -// vtkInteractorStyle2DMaracas *_interactorStyle2DMaracas; - vtkInteractorStyleMPRView *_interactorstylemprview; -}; - - - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - -class vtkInteractorStyleMPRView : public InteractorStyleMaracas -{ -public: - vtkInteractorStyleMPRView(); - ~vtkInteractorStyleMPRView(); - - virtual bool OnMouseMove(); - virtual bool OnLeftButtonDown(); - virtual bool OnLeftButtonUp(); - virtual bool OnLeftDClick(); - -protected: -/*EED Borrame - double _xBack; - double _yBack; -*/ - bool _stateMoveAxisX; - bool _stateMoveAxisY; - bool _stateMoveAxisZ; -}; - - - - - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ -class wxVtkMPR3DView; - -class wxVtkMPR3DViewCntrlPanel: public wxPanel -{ -public: - wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DView *wxvtkmpr3Dview); - ~wxVtkMPR3DViewCntrlPanel(); - void OnVisibleAxisX(wxCommandEvent& event); - void OnVisibleAxisY(wxCommandEvent& event); - void OnVisibleAxisZ(wxCommandEvent& event); - void OnPositionX(wxScrollEvent& event); - void OnPositionY(wxScrollEvent& event); - void OnPositionZ(wxScrollEvent& event); - void OnVisibleAxisXYZ(wxCommandEvent& event); - void OnVisiblePlane(wxCommandEvent& event); - void OnEditColorTable(wxCommandEvent& event); - virtual void Refresh(); - -private: - wxVtkMPR3DView *_wxvtkmpr3Dview; - - wxSlider *_opacity; - wxSlider *_isoValue; - wxSlider *_isoValueSpin; - wxStaticText *_isoValueText; - wxRadioButton *_surfA; - wxRadioButton *_surfB; - wxRadioButton *_surfC; - wxRadioButton *_surfD; - wxCheckBox *_visible; - wxButton *_color; - wxSlider *_positionX; - wxSlider *_positionY; - wxSlider *_positionZ; - - wxCheckBox *_ckBoxXYZ; - wxCheckBox *_ckBoxPlane; - - -protected: - -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ -class wxVtkClipping3DView; - - - -class wxVtkClipping3DViewCntrlPanel: public wxPanel -{ -public: - wxVtkClipping3DViewCntrlPanel(wxWindow *parent, wxVtkClipping3DView *_wxvtkclipping3Dview); - ~wxVtkClipping3DViewCntrlPanel(); - void OnSurface(wxCommandEvent& event); - void OnRepresentationSurfaceWireFrame(wxCommandEvent& event); - void OnVisibleVolume(wxCommandEvent& event); - void OnVisibleBoxSurface(wxCommandEvent& event); - void OnVisibleBoxVolume(wxCommandEvent& event); - void OnColor(wxCommandEvent& event); - void OnVisibleSurface(wxCommandEvent& event); - void OnOpacity(wxScrollEvent& event); - void OnIsoValue(wxScrollEvent& event); - void OnIsoValueSpin(wxScrollEvent& event); - virtual void Refresh(); - void OnBtnCreateFileSTL(wxCommandEvent& event); - void OnBtnSaveRawVolume(wxCommandEvent& event); - void OnBtnVolumeFunctions(wxCommandEvent& event); - void OnBtnMeshVTKLoad(wxCommandEvent& event); - - -private: - wxVtkClipping3DView *_wxvtkclipping3Dview; - wxSlider *_opacity; - wxSlider *_isoValue; - wxSlider *_isoValueSpin; - wxRadioButton *_surfA; - wxRadioButton *_surfB; - wxRadioButton *_surfC; - wxRadioButton *_surfD; - wxCheckBox *_visible; - wxButton *_color; - - wxRadioButton *_wireFrameRep; - wxRadioButton *_surfaceRep; - - int GetIdTissue(); -protected: - -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - - -class vtkmyPWCallback_3DPointWidget : public vtkCommand -{ -public: - 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 creaMaracasVisu_EXPORT wxVtkMPR3DView -{ -public: - wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview ); - virtual ~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 ); - virtual ~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; -}; - - -//------------------------------------------------------------------ -//------------------------------------------------------------------ -//------------------------------------------------------------------ - - +#include "vtkInteractorStyleSphere.h" +#include "idAlBeRa.h" + +#include "wxVtkMPR3DView.h" +#include "wxVtkMPR2DView.h" +#include "vtkPlane2DView.h" +#include "wxSphereView.h" +#include "wxVtkClipping3DView.h" +#include "wxPanelCuttingImageData.h" +#include "wxWidgetMesure2D_Plane_in_MPR.h" + +#include "wxVtk3DBaseView.h" + +//class wxMPRWidget; +//class vtkInteractorStylePlane2D; +//class vtkInfoTextImageInteractorPlane2D; +//class vtkInteractorStyleMPRView; +//class wxVtkMPR3DView; +//class wxVtkClipping3DView; class creaMaracasVisu_EXPORT wxMPRWidget : public wxPanel { @@ -965,7 +123,7 @@ public: //returns the 2d view of the specific direction (0|1|2) wxVtkMPR2DView *GetWxvtkMPR2Dview(int direction); - void setMarImage(marImageData *marimageData, double voxelsize); + void setImageData(vtkImageData * img, double voxelsize); private: double _voxelSize; @@ -1010,20 +168,6 @@ private: DECLARE_EVENT_TABLE( ); }; - -class creaMaracasVisu_EXPORT wxMPRWidget2 : public wxMPRWidget -{ -public: - wxMPRWidget2(wxWindow* parent,marImageData *marimagedata,double voxelSize); - ~wxMPRWidget2(); - virtual void OnRefreshView(wxCommandEvent & event); -private: -protected: -}; - - - - #endif // __WX__MPR__WIDGET__HXX__