]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/LUTImageActor.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / LUTImageActor.h
1 #ifndef __cpExtensions__Visualization__LUTImageActor__h__
2 #define __cpExtensions__Visualization__LUTImageActor__h__
3
4 #include <cpExtensions/Visualization/ImageActor.h>
5 #include <vector>
6
7 // -------------------------------------------------------------------------
8 class vtkImageMapToColors;
9 class vtkLookupTable;
10
11 // -------------------------------------------------------------------------
12 namespace cpExtensions
13 {
14   namespace Algorithms { class ImageBlender; }
15
16   namespace Visualization
17   {
18     /**
19      */
20     class cpExtensions_EXPORT LUTImageActor
21       : public ImageActor
22     {
23     public:
24       typedef LUTImageActor Self;
25
26     protected:
27       typedef cpExtensions::Algorithms::ImageBlender _TImageBlender;
28
29     public:
30       vtkTypeMacro( LUTImageActor, ImageActor );
31
32     public:
33       static Self* New( );
34
35       unsigned int GetNumberOfImages( ) const;
36       vtkImageData* GetImage( unsigned int id );
37       const vtkImageData* GetImage( unsigned int id ) const;
38       unsigned int GetImageId( vtkImageData* image ) const;
39       void GetLUTColor(
40         unsigned int id, double& r, double& g, double& b, double& a
41         ) const;
42       void GetLUTColor(
43         vtkImageData* image, double& r, double& g, double& b, double& a
44         ) const;
45       void SetLUTColor(
46         unsigned int id, double r, double g, double b, double a
47         );
48       void SetLUTColor(
49         vtkImageData* image, double r, double g, double b, double a
50         );
51       unsigned int AddImage(
52         vtkImageData* image,
53         double r = 1, double g = 0, double b = 0, double a = 1
54         );
55
56     protected:
57       LUTImageActor( );
58       virtual ~LUTImageActor( );
59
60     private:
61       // Purposely not implemented
62       LUTImageActor( const Self& );
63       Self& operator=( const Self& );
64
65     protected:
66       vtkSmartPointer< vtkLookupTable >              m_LUT;
67       vtkSmartPointer< _TImageBlender >              m_Blender;
68       vtkSmartPointer< vtkImageMapToColors >         m_ImageMap;
69       std::vector< vtkSmartPointer< vtkImageData > > m_Images;
70     };
71
72   } // ecapseman
73
74 } // ecapseman
75
76 #endif // __cpExtensions__Visualization__LUTImageActor__h__
77
78 // eof - $RCSfile$