]> Creatis software - creaMaracasVisu.git/blob - lib/Kernel/ITKVTK/itkvtkcolortransferfunction.h
aaba3b47caafa246a7dde00f0ae8e3933362ecc2
[creaMaracasVisu.git] / lib / Kernel / ITKVTK / itkvtkcolortransferfunction.h
1 #ifndef ITKVTKCOLORTRANSFERFUNCTION_H
2 #define ITKVTKCOLORTRANSFERFUNCTION_H
3
4
5 #include <itkProcessObject.h>
6
7 #include <vtkColorTransferFunction.h>
8
9 #include <itkRGBToLuminanceImageFilter.h>
10 #include <itkImageRegionConstIterator.h>
11
12 namespace itk{
13
14 template< class TypeImage>
15 class VTKColorTransferFunction :
16 public ProcessObject
17 {
18
19     public:
20
21         /** Standard class typedefs. */
22         typedef VTKColorTransferFunction           Self;
23
24         /** Standard "Superclass" typedef */
25         typedef ProcessObject Superclass;
26
27         /** Smart pointer typedef support. */
28         typedef SmartPointer<Self>            Pointer;
29         typedef SmartPointer<const Self>      ConstPointer;
30
31         /** Method for creation through the object factory. */
32         itkNewMacro(Self);
33
34         /** Run-time type information (and related methods). */
35         itkTypeMacro( VTKColorTransferFunction, ProcessObject );
36
37         /** InputImageType typedef support. */
38         typedef TypeImage                                   InputImageType;
39         typedef typename InputImageType::Pointer            InputImagePointerType;
40         typedef typename InputImageType::PixelType          PixelType;
41         typedef typename InputImageType::IndexType          IndexType;
42
43
44         /**
45           * set the rgb image to create the transfer function
46          */
47         itkSetMacro(Input, InputImagePointerType)
48         /**
49           * set the rgb image to create the transfer function
50          */
51         itkGetConstMacro(Input, InputImagePointerType)
52
53         /**
54           get the color transfer created from the image
55          */
56         itkGetMacro(Output, vtkColorTransferFunction*)
57
58         virtual void Update();
59
60 protected:
61     VTKColorTransferFunction();
62     ~VTKColorTransferFunction();
63
64     virtual void GenerateData ();
65
66     virtual void GenerateOutputInformation();
67
68 private:
69     vtkColorTransferFunction* m_Output;
70     InputImagePointerType m_Input;
71 };
72
73 }
74
75 #ifndef ITK_MANUAL_INSTANTIATION
76 #include "itkvtkcolortransferfunction.txx"
77 #endif
78
79 #endif // ITKVTKCOLORTRANSFERFUNCTION_H