#ifndef VTKPLANE2DVIEW_H_ #define VTKPLANE2DVIEW_H_ #include "vtkInteractorStylePlane2D.h" #include "vtkInfoTextImageInteractorPlane2D.h" #include "vtkInfoTextImage.h" #include "wxVtk2DBaseView.h" #include "vtkTransform.h" #include "vtkImageChangeInformation.h" #include "vtkStructuredPoints.h" #include "vtkPlaneSource.h" #include "vtkProbeFilter.h" #include "vtkPolyDataMapper.h" 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: }; #endif /*VTKPLANE2DVIEW_H_*/