]> Creatis software - clitk.git/blobdiff - vv/vvSlicer.h
Enable interactive display in tool binarize
[clitk.git] / vv / vvSlicer.h
index 4b7d1697d14c65d6cbd849ee4d5e4fb6d257e61a..8c79969fbc2ea4aabc7bfcfd47bb66606a45bca1 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <vtkSmartPointer.h>
 #include <vtkImageViewer2.h>
+#include <vtkImageReslice.h>
 
 class vtkActor;
 class vtkActor2D;
@@ -93,6 +94,7 @@ public:
   void SetLandmarks(vvLandmarks* landmarks);
   void SetTSlice(int t);
   void SetSliceOrientation(int orientation);
+  void AdjustResliceToSliceOrientation(vtkImageReslice *reslice);
   int GetTSlice();
   ///Reimplemented from vtkImageViewer2 to add polydata support
   void SetSlice(int s);
@@ -142,9 +144,13 @@ public:
 
   void UpdateCursorPosition();
   void SetCursorVisibility(bool s);
+
   bool GetCursorVisibility();
   void SetCursorColor(int r,int g, int b);
 
+  void SetCornerAnnotationVisibility(bool s);
+  bool GetCornerAnnotationVisibility();
+
   void GetExtremasAroundMousePointer(double & min, double & max);
 
   void UpdateLandmarks();
@@ -168,6 +174,11 @@ public:
   int GetOrientation();
   int * GetExtent();
 
+  double* GetVFColor() {
+    return mVFColor;
+  }
+  void SetVFColor(double r, double g, double b);
+
 protected:
   vvSlicer();
   ~vvSlicer();
@@ -180,8 +191,11 @@ protected:
 
   vvLandmarks* mLandmarks;
 
+  vtkSmartPointer<vtkImageReslice> mImageReslice;
+  vtkSmartPointer<vtkImageReslice> mOverlayReslice;
   vtkSmartPointer<vtkImageMapToWindowLevelColors> mOverlayMapper;
   vtkSmartPointer<vvBlendImageActor> mOverlayActor;
+  vtkSmartPointer<vtkImageReslice> mFusionReslice;
   vtkSmartPointer<vtkImageMapToWindowLevelColors> mFusionMapper;
   vtkSmartPointer<vtkImageActor> mFusionActor;
   vtkSmartPointer<vtkCornerAnnotation> ca;
@@ -193,6 +207,7 @@ protected:
   vtkSmartPointer<vtkExtractVOI> mVOIFilter;
   vtkSmartPointer<vvGlyph2D> mGlyphFilter;
   vtkSmartPointer<vtkPolyDataMapper> mVFMapper;
+  vtkSmartPointer<vtkLookupTable> mVFColorLUT;
   vtkSmartPointer<vtkActor> mVFActor;
   vtkSmartPointer<vtkGlyph3D> mLandGlyph;
   vtkSmartPointer<vtkCursor3D> mCross;
@@ -210,6 +225,7 @@ protected:
   int mScale;
   int mVFLog;
   int mVFWidth;
+  double mVFColor[3];
   bool mUseReducedExtent;
   int * mReducedExtent;
   int * mInitialExtent;
@@ -217,9 +233,8 @@ protected:
 private:
   void UpdateOrientation();
   void UpdateDisplayExtent();
-  void ComputeVFDisplayedExtent(int x1,int x2,int y1,int y2,int z1,int z2,int extent[6]);
-  void ComputeOverlayDisplayedExtent(int x1,int x2,int y1,int y2,int z1,int z2,int overExtent[6]);
-  void ComputeFusionDisplayedExtent(int x1,int x2,int y1,int y2,int z1,int z2,int overExtent[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();