X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicer.h;h=6af3773adf26ebdb7096208b224cf7b9e318d49a;hb=ef03fc34db849c864b1ae7f50c8442e125834f84;hp=43e08541386109a9f0e0b0b520dae4b51f337ced;hpb=c86c03213cb8bb9f5c4830d1f96e792a13a34efe;p=clitk.git diff --git a/vv/vvSlicer.h b/vv/vvSlicer.h index 43e0854..6af3773 100644 --- a/vv/vvSlicer.h +++ b/vv/vvSlicer.h @@ -20,6 +20,7 @@ #include #include +#include #include //TODO delete #include @@ -34,6 +35,7 @@ #include #include #include +#include class vtkActor; class vtkActor2D; @@ -58,8 +60,10 @@ class vtkScalarBarActor; class vtkTransform; class vtkImageReslice; -class vvSlicer: public vtkImageViewer2 -{ +class vvSlicer: public QObject, public vtkImageViewer2 { + +Q_OBJECT + public: static vvSlicer *New(); vtkTypeMacro(vvSlicer,vtkImageViewer2); @@ -119,7 +123,7 @@ public: void SetDisplayMode(bool i); void FlipHorizontalView(); void FlipVerticalView(); - static double GetScalarComponentAsDouble(vtkImageData *image, double X, double Y, double Z, int &ix, int &iy, int &iz, int component=0); + double GetScalarComponentAsDouble(vtkImageData *image, double X, double Y, double Z, int &ix, int &iy, int &iz, int component=0); void Render(); ///Sets the camera to fit the image in the window void ResetCamera(); @@ -160,14 +164,15 @@ public: void SetCursorVisibility(bool s); bool GetCursorVisibility(); - void SetCursorColor(int r,int g, int b); + void SetCursorColor(double r,double g, double b); void SetCornerAnnotationVisibility(bool s); bool GetCornerAnnotationVisibility(); void GetExtremasAroundMousePointer(double & min, double & max, vtkImageData *image, vtkTransform *transform); - void UpdateLandmarks(); + void RemoveLandmarks(); + void DisplayLandmarks(); void ForceUpdateDisplayExtent(); int* GetDisplayExtent(); @@ -176,6 +181,7 @@ public: void AddContour(vvMesh::Pointer contours,bool propagate); ///Toggle temporal superposition of contours void ToggleContourSuperposition(); + void SetInterpolationImageReslice(int interpolation); virtual void SetColorWindow(double s); virtual void SetColorLevel(double s); @@ -210,6 +216,13 @@ public: void SetRegisterExtent(int [6]); void GetRegisterExtent(int [6]); + void SetSlicerNumber(const int nbSlicer) {mSlicerNumber = nbSlicer;} + int GetSlicerNumber() const {return mSlicerNumber;} + +signals: + void UpdateDisplayExtentBegin(int); + void UpdateDisplayExtentEnd(int); + protected: vvSlicer(); ~vvSlicer(); @@ -235,6 +248,7 @@ protected: // ___|__|___ VTK world coordinates (mm) (never displayed) mCurrent vtkSmartPointer mSlicingTransform; + vtkSmartPointer mLandmarkTransform; vtkSmartPointer mImageReslice; vtkSmartPointer mConcatenatedTransform; vtkSmartPointer mOverlayReslice; @@ -256,6 +270,8 @@ protected: vtkSmartPointer mVFMapper; vtkSmartPointer mVFColorLUT; vtkSmartPointer mVFActor; + vtkSmartPointer mVFReslice; + vtkSmartPointer mConcatenatedVFTransform; vtkSmartPointer mLandGlyph; vtkSmartPointer mCross; vtkSmartPointer mLandClipper; @@ -266,6 +282,7 @@ protected: vtkSmartPointer legend; std::vector mSurfaceCutActors; + int mSlicerNumber; int mCurrentTSlice; int mCurrentFusionTSlice; int mCurrentOverlayTSlice; @@ -288,6 +305,8 @@ private: void UpdateDisplayExtent(); void ConvertImageToImageDisplayExtent(vtkInformation *sourceImage, const int sourceExtent[6], vtkImageData *targetImage, int targetExtent[6]); + void ConvertImageToImageDisplayExtent(vtkImageData *sourceImage, const int sourceExtent[6], + vtkImageData *targetImage, int targetExtent[6]); ///Sets the surfaces to be cut on the image slice: update the vtkCutter void SetContourSlice();