Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkTransferFunctionInitializer.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED
18 #define MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED
19 
20 #include <vtkColorTransferFunction.h>
21 #include <vtkPiecewiseFunction.h>
22 #include <vtkSmartPointer.h>
23 
24 #include "mitkTransferFunction.h"
25 
26 #include <itkObject.h>
27 #include <itkObjectFactory.h>
28 
29 #include <MitkCoreExports.h>
30 
31 namespace mitk
32 {
46  class MITKCORE_EXPORT TransferFunctionInitializer : public itk::Object
47  {
48  public:
50 
51  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
53 
54  static void GetPresetNames(std::vector<std::string> &presetNames);
55 
56  void SetTransferFunction(TransferFunction::Pointer transferFunction);
57  mitk::TransferFunction::Pointer GetTransferFunction();
58  void SetTransferFunctionMode(int mode);
59 
60  void InitTransferFunctionMode();
61 
62  protected:
63  TransferFunctionInitializer(TransferFunction::Pointer transferFunction = nullptr);
64  virtual ~TransferFunctionInitializer();
65 
66  private:
67  int m_Mode;
68  mitk::TransferFunction::Pointer m_transferFunction;
69 
70  // Define Transfer Function
71  enum TransferFunctionMode
72  {
73  TF_CT_DEFAULT,
74  TF_CT_BLACK_WHITE,
75  TF_CT_THORAX_LARGE,
76  TF_CT_THORAX_SMALL,
77  TF_CT_BONE,
78  TF_CT_BONE_GRADIENT,
79  TF_CT_CARDIAC,
80  TF_MR_GENERIC
81  };
82 
83  // remove all old points
84  void RemoveAllPoints();
85  void SetModified();
86  void SetCtDefaultMode();
87  void SetCtBlackWhiteMode();
88  void SetCtThoraxLargeMode();
89  void SetCtThoraxSmallMode();
90  void SetCtBoneMode();
91  void SetCtBoneGradientMode();
92  void SetCtCardiacMode();
93  void SetMrGenericMode();
94  };
95 }
96 
97 #endif /* MITK_TRANSFER_FUNCTION_MODE_CREATOR_H_HEADER_INCLUDED */
#define MITKCORE_EXPORT
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
static const char * presetNames[]
STL namespace.
The TransferFunction class A wrapper class for VTK scalar opacity, gradient opacity, and color transfer functions.Holds a copy of each of the three standard VTK transfer functions (scalar opacity, gradient opacity, color) and provides an interface for manipulating their control points. Each original function can be retrieved by a Get() method.
DataCollection - Class to facilitate loading/accessing structured data.
Wrapper class for VTK scalar opacity, gradient opacity, and color transfer functions.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53