]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxSphereView.h
049f417e70153c233df53061bb2b3a8cb2562df8
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxSphereView.h
1 #ifndef WXSPHEREVIEW_H_
2 #define WXSPHEREVIEW_H_
3
4 #include "wxVtk2DBaseView.h"
5 #include "idAlBeRa.h"
6 #include "vtkInteractorStyleSphere.h"
7 #include "vtkTransform.h"
8
9 class wxMPRBaseData;
10
11 class wxSphereView : public wxVtk2DBaseView
12 {
13 public:
14         wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData);
15         ~wxSphereView();
16         virtual void Configure();
17         void RotationEnd();
18         void RotationStart(double vx, double vy, bool ok_v, bool ok_ang);
19         virtual void    RefreshView();
20         virtual void    SetVoxel(double i, double j, int delta, double id, unsigned short gris);
21                         void    SetDeltaVoxel(int delta);
22                         double  GetRadio();
23                         void    SetRadio(double radio);
24                         int             GetIdOfImage(double radio);
25                         void    SetXYZtoParent(double i, double j);
26                         void    RefreshPoint();
27
28 private:        
29         std::vector<idAlBeRa*> _lstId;
30
31         int                                                     _centerX;
32         int                                                     _centerY;
33         int                                                     _centerZ;
34         double                                          _radio;
35
36         double                                          _ang;
37         double                                          _vxb;
38         double                                          _vyb;
39
40         int                                                     _delta;
41
42         vtkImageData                            *_imageDataOriginal;
43         vtkImageData                            *_imageSphere;
44
45         vtkMPRBaseData                          *_vtkmprbasedata;
46         vtkInteractorStyleSphere        *_vtkinteractorstylesphere;
47
48         vtkTransform                            *_transform; 
49         vtkTransform                            *_transform1; 
50         vtkTransform                            *_transform2; 
51
52         void    FiltreImage(int id, double radio);
53         void    FiltreImageB(int id, double radio, bool ok,int deltaTMP);
54         void    DefineImageSphere();
55         void    ResetlstId();
56
57         void    InitSphere(double points[4][3]);
58         double  SphereFindCenter(double P[4][3], double cc[3]);
59         double  determinant(double a[4][4], int n);
60
61         void    GetPointSphere(double p[3],double r1,double angA,double angB);
62         void    RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]);
63         void    TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image);
64 };
65
66 #endif /*WXSPHEREVIEW_H_*/