]> Creatis software - clitk.git/blobdiff - vv/vvSlicer.h
Adapt vvSlicer to vvImage without vtkImageReslice. Now reslice according to the image...
[clitk.git] / vv / vvSlicer.h
index 021703f54fd35d20e5db67bbc1881fd0da636b86..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);
@@ -189,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;
@@ -228,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();