1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
26 #ifndef ITKVTKCOLORTRANSFERFUNCTION_H
27 #define ITKVTKCOLORTRANSFERFUNCTION_H
30 #include <itkProcessObject.h>
32 #include <vtkColorTransferFunction.h>
34 #include <itkRGBToLuminanceImageFilter.h>
35 #include <itkImageRegionConstIterator.h>
39 template< class TypeImage>
40 class VTKColorTransferFunction :
46 /** Standard class typedefs. */
47 typedef VTKColorTransferFunction Self;
49 /** Standard "Superclass" typedef */
50 typedef ProcessObject Superclass;
52 /** Smart pointer typedef support. */
53 typedef SmartPointer<Self> Pointer;
54 typedef SmartPointer<const Self> ConstPointer;
56 /** Method for creation through the object factory. */
59 /** Run-time type information (and related methods). */
60 itkTypeMacro( VTKColorTransferFunction, ProcessObject );
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;
70 * set the rgb image to create the transfer function
72 itkSetMacro(Input, InputImagePointerType)
74 * set the rgb image to create the transfer function
76 itkGetConstMacro(Input, InputImagePointerType)
79 get the color transfer created from the image
81 itkGetMacro(Output, vtkColorTransferFunction*)
83 virtual void Update();
86 VTKColorTransferFunction();
87 ~VTKColorTransferFunction();
89 virtual void GenerateData ();
91 virtual void GenerateOutputInformation();
94 vtkColorTransferFunction* m_Output;
95 InputImagePointerType m_Input;
100 #ifndef ITK_MANUAL_INSTANTIATION
101 #include "itkvtkcolortransferfunction.txx"
104 #endif // ITKVTKCOLORTRANSFERFUNCTION_H