1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef VVBINARYIMAGEOVERLAYACTOR_H
19 #define VVBINARYIMAGEOVERLAYACTOR_H
21 #include "clitkCommon.h"
25 class vtkMarchingSquares;
28 class vtkImageMapToRGBA;
30 class vtkImageReslice;
33 //------------------------------------------------------------------------------
34 class vvBinaryImageOverlayActor : public itk::LightObject
38 typedef vvBinaryImageOverlayActor Self;
39 typedef itk::SmartPointer<Self> Pointer;
42 void SetSlicer(vvSlicer * slicer);
43 void SetColor(double r, double g, double b);
44 void SetOpacity(double d);
45 void SetImage(vvImage::Pointer image, double bg, bool modeBG=true);
46 void SetDepth(double d) { mDepth = d; }
47 void Initialize(bool IsVisible=true);
49 void UpdateSlice(int slicer, int slice, bool force=false);
60 vvImage::Pointer mImage;
61 std::vector<double> mColor;
63 double mBackgroundValue;
64 double mForegroundValue;
66 vtkSmartPointer<vtkLookupTable> mColorLUT;
69 std::vector<vtkSmartPointer<vtkImageMapToRGBA> > mMapperList;
70 std::vector<vtkSmartPointer<vtkImageActor> > mImageActorList;
71 vtkSmartPointer<vtkImageReslice> mFusionReslice;
72 vtkSmartPointer<vtkTransform> mConcatenatedFusionTransform;
74 void ComputeExtent(int orientation,
78 void ComputeExtent(int * inExtent,
81 vtkImageData * overlay);
82 void SetDisplayExtentAndCameraPosition(int orientation,
85 vtkImageActor * actor,
89 vvBinaryImageOverlayActor();
90 ~vvBinaryImageOverlayActor();
92 }; // end class vvBinaryImageOverlayActor
93 //------------------------------------------------------------------------------