17 #ifndef MITK_TRANSFER_FUNCTION_H_HEADER_INCLUDED
18 #define MITK_TRANSFER_FUNCTION_H_HEADER_INCLUDED
24 #include <itkHistogram.h>
25 #include <itkObject.h>
26 #include <itkRGBPixel.h>
28 #include <vtkColorTransferFunction.h>
29 #include <vtkPiecewiseFunction.h>
30 #include <vtkSmartPointer.h>
67 itkFactorylessNewMacro(
Self) itkCloneMacro(
Self)
70 itkSetMacro(
Min,
int);
73 itkSetMacro(
Max,
int);
76 itkGetMacro(Min,
int);
79 itkGetMacro(Max,
int);
82 itkGetMacro(ScalarOpacityFunction, vtkPiecewiseFunction *);
85 itkGetMacro(GradientOpacityFunction, vtkPiecewiseFunction *);
88 itkGetMacro(ColorTransferFunction, vtkColorTransferFunction *);
89 itkSetMacro(ColorTransferFunction, vtkSmartPointer<vtkColorTransferFunction>);
95 void InitializeByMitkImage(const
mitk::
Image *image);
98 void InitializeByItkHistogram(const
itk::Statistics::Histogram<
double> *histogram);
102 void InitializeHistogram(const
mitk::
Image *image);
117 void AddScalarOpacityPoint(
double x,
double value);
120 void AddGradientOpacityPoint(
double x,
double value);
123 void AddRGBPoint(
double x,
double r,
double g,
double b);
136 int RemoveScalarOpacityPoint(
double x);
140 int RemoveGradientOpacityPoint(
double x);
143 int RemoveRGBPoint(
double x);
146 void ClearScalarOpacityPoints();
150 void ClearGradientOpacityPoints();
153 void ClearRGBPoints();
155 bool operator==(
Self &other);
159 virtual ~TransferFunction();
161 TransferFunction(const TransferFunction &other);
163 virtual
itk::LightObject::
Pointer InternalClone() const override;
165 void PrintSelf(
std::ostream &os,
itk::Indent indent) const override;
168 vtkSmartPointer<vtkPiecewiseFunction> m_ScalarOpacityFunction;
171 vtkSmartPointer<vtkPiecewiseFunction> m_GradientOpacityFunction;
174 vtkSmartPointer<vtkColorTransferFunction> m_ColorTransferFunction;
187 TransferFunction::ControlPoints m_ScalarOpacityPoints;
190 TransferFunction::ControlPoints m_GradientOpacityPoints;
193 TransferFunction::RGBControlPoints m_RGBPoints;
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.
std::vector< std::pair< double, itk::RGBPixel< double > > > RGBControlPoints
#define mitkClassMacroItkParent(className, SuperClassName)
Image class for storing images.
std::vector< std::pair< double, double > > ControlPoints
Provides an easy way to calculate an itk::Histogram for a mitk::Image.