13 #ifndef mitkTransferFunction_h
14 #define mitkTransferFunction_h
20 #include <itkHistogram.h>
21 #include <itkObject.h>
22 #include <itkRGBPixel.h>
24 #include <vtkColorTransferFunction.h>
25 #include <vtkPiecewiseFunction.h>
26 #include <vtkSmartPointer.h>
63 itkFactorylessNewMacro(
Self);
68 itkSetMacro(Min,
int);
71 itkSetMacro(Max,
int);
74 itkGetMacro(Min,
int);
77 itkGetMacro(Max,
int);
80 itkGetMacro(ScalarOpacityFunction, vtkPiecewiseFunction *);
83 itkGetMacro(GradientOpacityFunction, vtkPiecewiseFunction *);
86 itkGetMacro(ColorTransferFunction, vtkColorTransferFunction *);
163 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
181 mitk::HistogramGenerator::HistogramType::ConstPointer
m_Histogram;
itk::Statistics::Histogram< double > HistogramType
Image class for storing images.
The TransferFunction class A wrapper class for VTK scalar opacity, gradient opacity,...
TransferFunction(const TransferFunction &other)
int RemoveRGBPoint(double x)
Remove the specified control point from the color transfer function.
void SetScalarOpacityPoints(TransferFunction::ControlPoints points)
Insert control points and values into the scalar opacity transfer function.
void ClearGradientOpacityPoints()
Removes all control points from the gradient opacity transfer function.
mitk::HistogramGenerator::HistogramType::ConstPointer m_Histogram
TransferFunction::RGBControlPoints & GetRGBPoints()
Get a copy of the color transfer function control-points.
void InitializeByMitkImage(const mitk::Image *image)
Initialize transfer function based on the histogram of an mitk::Image.
int RemoveGradientOpacityPoint(double x)
Remove the specified control point from the gradient opacity transfer function.
TransferFunction::ControlPoints & GetGradientOpacityPoints()
Get a copy of the gradient opacity transfer function control-points.
std::vector< std::pair< double, itk::RGBPixel< double > > > RGBControlPoints
void ClearScalarOpacityPoints()
Removes all control points from the scalar opacity transfer function.
std::vector< std::pair< double, double > > ControlPoints
vtkSmartPointer< vtkPiecewiseFunction > m_GradientOpacityFunction
~TransferFunction() override
void SetRGBPoints(TransferFunction::RGBControlPoints rgbpoints)
Insert control points and RGB values into the color transfer function.
int RemoveScalarOpacityPoint(double x)
Remove the specified control point from the scalar opacity transfer function.
void SetGradientOpacityPoints(TransferFunction::ControlPoints points)
Insert control points and values into the gradient opacity transfer function.
void AddGradientOpacityPoint(double x, double value)
Add a single control point to the gradient opacity transfer function.
itk::LightObject::Pointer InternalClone() const override
TransferFunction::ControlPoints & GetScalarOpacityPoints()
Get a copy of the scalar opacity transfer function control-points.
void AddScalarOpacityPoint(double x, double value)
Add a single control point to the scalar opacity transfer function.
void AddRGBPoint(double x, double r, double g, double b)
Add a single control point to the color opacity transfer function.
void InitializeHistogram(const mitk::Image *image)
Initialize the internal histogram and min/max range based on the specified mitk::Image.
void ClearRGBPoints()
Removes all control points from the color transfer function.
void InitializeByItkHistogram(const itk::Statistics::Histogram< double > *histogram)
Initialize transfer function based on the specified histogram.
void PrintSelf(std::ostream &os, itk::Indent indent) const override
vtkSmartPointer< vtkColorTransferFunction > m_ColorTransferFunction
bool operator==(Self &other)
vtkSmartPointer< vtkPiecewiseFunction > m_ScalarOpacityFunction
#define mitkClassMacroItkParent(className, SuperClassName)
Find image slices visible on a given plane.