-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<idAlBeRa*> _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 MARACASVISULIB_EXPORTS 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:
-
-};
-
-
-//------------------------------------------------------------------
-//------------------------------------------------------------------
-//------------------------------------------------------------------