]> Creatis software - clitk.git/blobdiff - vv/vvSlicer.h
Romulo: changed rounding of image resampling to floor() because, from a clinical...
[clitk.git] / vv / vvSlicer.h
index a2f77e955c3850f4c82bbdb8e12e104c528447dc..7a1ee02a5857b559cbef3fb30f831b17a8ac241b 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <vtkSmartPointer.h>
 #include <vtkImageViewer2.h>
+#include <vtkColor.h>
 
 class vtkActor;
 class vtkActor2D;
@@ -105,6 +106,7 @@ public:
   void SetDisplayMode(bool i);
   void FlipHorizontalView();
   void FlipVerticalView();
+  static double GetScalarComponentAsDouble(vtkImageData *image, int 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();
@@ -167,6 +169,11 @@ public:
   int GetOrientation();
   int * GetExtent();
 
+  double* GetVFColor() {
+    return mVFColor;
+  }
+  void SetVFColor(double r, double g, double b);
+
 protected:
   vvSlicer();
   ~vvSlicer();
@@ -192,6 +199,7 @@ protected:
   vtkSmartPointer<vtkExtractVOI> mVOIFilter;
   vtkSmartPointer<vvGlyph2D> mGlyphFilter;
   vtkSmartPointer<vtkPolyDataMapper> mVFMapper;
+  vtkSmartPointer<vtkLookupTable> mVFColorLUT;
   vtkSmartPointer<vtkActor> mVFActor;
   vtkSmartPointer<vtkGlyph3D> mLandGlyph;
   vtkSmartPointer<vtkCursor3D> mCross;
@@ -209,6 +217,7 @@ protected:
   int mScale;
   int mVFLog;
   int mVFWidth;
+  double mVFColor[3];
   bool mUseReducedExtent;
   int * mReducedExtent;
   int * mInitialExtent;