fw4spl
SrcLib/io/fwVtkIO/include/fwVtkIO/helper/TransferFunction.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWVTKIO_HELPER_TRANSFERFUNCTION_HPP__
8 #define __FWVTKIO_HELPER_TRANSFERFUNCTION_HPP__
9 
10 #include "fwVtkIO/config.hpp"
11 
12 #include <fwData/TransferFunction.hpp>
13 
14 #include <vtkLogLookupTable.h>
15 #include <vtkSmartPointer.h>
16 
17 namespace fwVtkIO
18 {
19 
20 namespace helper
21 {
22 
26 class FWVTKIO_CLASS_API TransferFunction
27 {
28 
29 public:
30 
39  FWVTKIO_API static void toVtkLookupTable(fwData::TransferFunction::csptr tf,
40  vtkSmartPointer<vtkLookupTable> lt,
41  bool allowTransparency = false,
42  unsigned int size = 256 );
43 
53  FWVTKIO_API static void toBWVtkLookupTable( double rangeMin, double rangeMax,
54  vtkSmartPointer<vtkLookupTable> lt,
55  unsigned int size = 256 );
56 
57 };
58 
59 } // namespace helper
60 } // namespace fwVtkIO
61 
62 #endif // __FWVTKIO_HELPER_TRANSFERFUNCTION_HPP__
Helper to manage vtk data from fwData::TransferFunction.