]> Creatis software - creaMaracasVisu.git/blob - lib/Kernel/ITKVTK/itkvtkcolortransferfunction.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / Kernel / ITKVTK / itkvtkcolortransferfunction.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifndef ITKVTKCOLORTRANSFERFUNCTION_H
27 #define ITKVTKCOLORTRANSFERFUNCTION_H
28
29
30 #include <itkProcessObject.h>
31
32 #include <vtkColorTransferFunction.h>
33
34 #include <itkRGBToLuminanceImageFilter.h>
35 #include <itkImageRegionConstIterator.h>
36
37 namespace itk{
38
39 template< class TypeImage>
40 class VTKColorTransferFunction :
41 public ProcessObject
42 {
43
44     public:
45
46         /** Standard class typedefs. */
47         typedef VTKColorTransferFunction           Self;
48
49         /** Standard "Superclass" typedef */
50         typedef ProcessObject Superclass;
51
52         /** Smart pointer typedef support. */
53         typedef SmartPointer<Self>            Pointer;
54         typedef SmartPointer<const Self>      ConstPointer;
55
56         /** Method for creation through the object factory. */
57         itkNewMacro(Self);
58
59         /** Run-time type information (and related methods). */
60         itkTypeMacro( VTKColorTransferFunction, ProcessObject );
61
62         /** InputImageType typedef support. */
63         typedef TypeImage                                   InputImageType;
64         typedef typename InputImageType::Pointer            InputImagePointerType;
65         typedef typename InputImageType::PixelType          PixelType;
66         typedef typename InputImageType::IndexType          IndexType;
67
68
69         /**
70           * set the rgb image to create the transfer function
71          */
72         itkSetMacro(Input, InputImagePointerType)
73         /**
74           * set the rgb image to create the transfer function
75          */
76         itkGetConstMacro(Input, InputImagePointerType)
77
78         /**
79           get the color transfer created from the image
80          */
81         itkGetMacro(Output, vtkColorTransferFunction*)
82
83         virtual void Update();
84
85 protected:
86     VTKColorTransferFunction();
87     ~VTKColorTransferFunction();
88
89     virtual void GenerateData ();
90
91     virtual void GenerateOutputInformation();
92
93 private:
94     vtkColorTransferFunction* m_Output;
95     InputImagePointerType m_Input;
96 };
97
98 }
99
100 #ifndef ITK_MANUAL_INSTANTIATION
101 #include "itkvtkcolortransferfunction.txx"
102 #endif
103
104 #endif // ITKVTKCOLORTRANSFERFUNCTION_H