wxSphereView.h
Go to the documentation of this file.00001 #ifndef WXSPHEREVIEW_H_
00002 #define WXSPHEREVIEW_H_
00003
00004 #include "wxVtk2DBaseView.h"
00005 #include "idAlBeRa.h"
00006 #include "vtkInteractorStyleSphere.h"
00007 #include "vtkTransform.h"
00008
00009 class wxMPRBaseData;
00010
00011 class wxSphereView : public wxVtk2DBaseView
00012 {
00013 public:
00014 wxSphereView( wxWindow *parent, vtkMPRBaseData *vtkmprbasedata, vtkImageData *imageData);
00015 ~wxSphereView();
00016 virtual void Configure();
00017 void RotationEnd();
00018 void RotationStart(double vx, double vy, bool ok_v, bool ok_ang);
00019 virtual void RefreshView();
00020 virtual void SetVoxel(double i, double j, int delta, double id, unsigned short gris);
00021 void SetDeltaVoxel(int delta);
00022 double GetRadio();
00023 void SetRadio(double radio);
00024 int GetIdOfImage(double radio);
00025 void SetXYZtoParent(double i, double j);
00026 void RefreshPoint();
00027
00028 private:
00029 std::vector<idAlBeRa*> _lstId;
00030
00031 int _centerX;
00032 int _centerY;
00033 int _centerZ;
00034 double _radio;
00035
00036 double _ang;
00037 double _vxb;
00038 double _vyb;
00039
00040 int _delta;
00041
00042 vtkImageData *_imageDataOriginal;
00043 vtkImageData *_imageSphere;
00044
00045 vtkMPRBaseData *_vtkmprbasedata;
00046 vtkInteractorStyleSphere *_vtkinteractorstylesphere;
00047
00048 vtkTransform *_transform;
00049 vtkTransform *_transform1;
00050 vtkTransform *_transform2;
00051
00052 void FiltreImage(int id, double radio);
00053 void FiltreImageB(int id, double radio, bool ok,int deltaTMP);
00054 void DefineImageSphere();
00055 void ResetlstId();
00056
00057 void InitSphere(double points[4][3]);
00058 double SphereFindCenter(double P[4][3], double cc[3]);
00059 double determinant(double a[4][4], int n);
00060
00061 void GetPointSphere(double p[3],double r1,double angA,double angB);
00062 void RotatePointOverTheSphere( double pp[3], double p[3],double cc[3]);
00063 void TransferePoints(double pp1[3],double pp2[3],double AngX,double AngY,vtkImageData *image);
00064 };
00065
00066 #endif