|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Wrapper for VTK scalar opacity, gradient opacity, and color transfer functions. More...
#include <mitkTransferFunction.h>


Public Types | |
| typedef std::vector< std::pair< double, double > > | ControlPoints |
| Type for scalar opacity or gradient opacity control points (x, value). More... | |
| typedef std::vector< std::pair< double, itk::RGBPixel< double > > > | RGBControlPoints |
| Type for color transfer function control points (x, RGB). More... | |
Public Member Functions | |
| mitkClassMacroItkParent (TransferFunction, itk::DataObject) | |
| Pointer | Clone () const |
| virtual void | SetMin (int _arg) |
| Get/Set min/max of transfer function range for initialization. More... | |
| virtual void | SetMax (int _arg) |
| Get/Set min/max of transfer function range for initialization. More... | |
| virtual int | GetMin () |
| Get/Set min/max of transfer function range for initialization. More... | |
| virtual int | GetMax () |
| Get/Set min/max of transfer function range for initialization. More... | |
| virtual vtkPiecewiseFunction * | GetScalarOpacityFunction () |
| Get/Set wrapped vtk transfer function. More... | |
| virtual vtkPiecewiseFunction * | GetGradientOpacityFunction () |
| Get/Set wrapped vtk transfer function. More... | |
| virtual vtkColorTransferFunction * | GetColorTransferFunction () |
| Get/Set wrapped vtk transfer function. More... | |
| virtual void | SetColorTransferFunction (vtkSmartPointer< vtkColorTransferFunction > _arg) |
| virtual const HistogramGenerator::HistogramType * | GetHistogram () |
| Get histogram used for transfer function initialization. More... | |
| void | InitializeByMitkImage (const mitk::Image *image) |
| Initialize all three transfer functions from an mitk::Image histogram. More... | |
| void | InitializeByItkHistogram (const itk::Statistics::Histogram< double > *histogram) |
| Initialize all three transfer functions from an ITK histogram. More... | |
| void | InitializeHistogram (const mitk::Image *image) |
| Compute and store the histogram and min/max range from an image. More... | |
| void | SetScalarOpacityPoints (TransferFunction::ControlPoints points) |
| Replace all scalar opacity control points. More... | |
| void | SetGradientOpacityPoints (TransferFunction::ControlPoints points) |
| Replace all gradient opacity control points. More... | |
| void | SetRGBPoints (TransferFunction::RGBControlPoints rgbpoints) |
| Replace all color transfer function control points. More... | |
| void | AddScalarOpacityPoint (double x, double value) |
| Add a single control point to the scalar opacity function. More... | |
| void | AddGradientOpacityPoint (double x, double value) |
| Add a single control point to the gradient opacity function. More... | |
| void | AddRGBPoint (double x, double r, double g, double b) |
| Add a single control point to the color transfer function. More... | |
| TransferFunction::ControlPoints & | GetScalarOpacityPoints () |
| Get the scalar opacity control points. More... | |
| TransferFunction::ControlPoints & | GetGradientOpacityPoints () |
| Get the gradient opacity control points. More... | |
| TransferFunction::RGBControlPoints & | GetRGBPoints () |
| Get the color transfer function control points. More... | |
| int | RemoveScalarOpacityPoint (double x) |
| Remove a control point from the scalar opacity function. More... | |
| int | RemoveGradientOpacityPoint (double x) |
| Remove a control point from the gradient opacity function. More... | |
| int | RemoveRGBPoint (double x) |
| Remove a control point from the color transfer function. More... | |
| void | ClearScalarOpacityPoints () |
| Remove all control points from the scalar opacity function. More... | |
| void | ClearGradientOpacityPoints () |
| Remove all control points from the gradient opacity function. More... | |
| void | ClearRGBPoints () |
| Remove all control points from the color transfer function. More... | |
| bool | operator== (Self &other) |
| Compare two TransferFunction objects for equality. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| TransferFunction () | |
| ~TransferFunction () override | |
| TransferFunction (const Self &other) | |
| mitkCloneMacro (Self) | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Attributes | |
| vtkSmartPointer< vtkPiecewiseFunction > | m_ScalarOpacityFunction |
| vtkSmartPointer< vtkPiecewiseFunction > | m_GradientOpacityFunction |
| vtkSmartPointer< vtkColorTransferFunction > | m_ColorTransferFunction |
| int | m_Min |
| int | m_Max |
| mitk::HistogramGenerator::HistogramType::ConstPointer | m_Histogram |
Wrapper for VTK scalar opacity, gradient opacity, and color transfer functions.
Holds and manages three standard VTK transfer functions: scalar opacity (vtkPiecewiseFunction), gradient opacity (vtkPiecewiseFunction), and color (vtkColorTransferFunction). Provides an interface for adding, removing, and querying control points, as well as initialization from image histograms.
Definition at line 49 of file mitkTransferFunction.h.
| typedef std::vector<std::pair<double, double> > mitk::TransferFunction::ControlPoints |
Type for scalar opacity or gradient opacity control points (x, value).
Definition at line 53 of file mitkTransferFunction.h.
| typedef std::vector<std::pair<double, itk::RGBPixel<double> > > mitk::TransferFunction::RGBControlPoints |
Type for color transfer function control points (x, RGB).
Definition at line 56 of file mitkTransferFunction.h.
|
protected |
|
overrideprotected |
|
protected |
| void mitk::TransferFunction::AddGradientOpacityPoint | ( | double | x, |
| double | value | ||
| ) |
Add a single control point to the gradient opacity function.
| [in] | x | The gradient magnitude position. |
| [in] | value | The opacity at this position (0.0 to 1.0). |
| void mitk::TransferFunction::AddRGBPoint | ( | double | x, |
| double | r, | ||
| double | g, | ||
| double | b | ||
| ) |
Add a single control point to the color transfer function.
| [in] | x | The scalar value position. |
| [in] | r | Red component (0.0 to 1.0). |
| [in] | g | Green component (0.0 to 1.0). |
| [in] | b | Blue component (0.0 to 1.0). |
| void mitk::TransferFunction::AddScalarOpacityPoint | ( | double | x, |
| double | value | ||
| ) |
Add a single control point to the scalar opacity function.
| [in] | x | The scalar value position. |
| [in] | value | The opacity at this position (0.0 to 1.0). |
| void mitk::TransferFunction::ClearGradientOpacityPoints | ( | ) |
Remove all control points from the gradient opacity function.
| void mitk::TransferFunction::ClearRGBPoints | ( | ) |
Remove all control points from the color transfer function.
| void mitk::TransferFunction::ClearScalarOpacityPoints | ( | ) |
Remove all control points from the scalar opacity function.
| Pointer mitk::TransferFunction::Clone | ( | ) | const |
|
virtual |
Get/Set wrapped vtk transfer function.
|
virtual |
Get/Set wrapped vtk transfer function.
| TransferFunction::ControlPoints& mitk::TransferFunction::GetGradientOpacityPoints | ( | ) |
Get the gradient opacity control points.
|
virtual |
Get histogram used for transfer function initialization.
|
virtual |
Get/Set min/max of transfer function range for initialization.
|
virtual |
Get/Set min/max of transfer function range for initialization.
| TransferFunction::RGBControlPoints& mitk::TransferFunction::GetRGBPoints | ( | ) |
Get the color transfer function control points.
|
virtual |
Get/Set wrapped vtk transfer function.
| TransferFunction::ControlPoints& mitk::TransferFunction::GetScalarOpacityPoints | ( | ) |
Get the scalar opacity control points.
| void mitk::TransferFunction::InitializeByItkHistogram | ( | const itk::Statistics::Histogram< double > * | histogram | ) |
Initialize all three transfer functions from an ITK histogram.
| [in] | histogram | The histogram to use for initialization. |
| void mitk::TransferFunction::InitializeByMitkImage | ( | const mitk::Image * | image | ) |
Initialize all three transfer functions from an mitk::Image histogram.
| [in] | image | The image whose histogram drives the initialization. |
| void mitk::TransferFunction::InitializeHistogram | ( | const mitk::Image * | image | ) |
Compute and store the histogram and min/max range from an image.
| [in] | image | The image from which the histogram is computed. |
| mitk::TransferFunction::mitkClassMacroItkParent | ( | TransferFunction | , |
| itk::DataObject | |||
| ) |
|
protected |
|
static |
| bool mitk::TransferFunction::operator== | ( | Self & | other | ) |
Compare two TransferFunction objects for equality.
| [in] | other | The TransferFunction to compare against. |
|
overrideprotected |
| int mitk::TransferFunction::RemoveGradientOpacityPoint | ( | double | x | ) |
Remove a control point from the gradient opacity function.
| [in] | x | The gradient position of the control point to remove. |
| int mitk::TransferFunction::RemoveRGBPoint | ( | double | x | ) |
Remove a control point from the color transfer function.
| [in] | x | The scalar position of the control point to remove. |
| int mitk::TransferFunction::RemoveScalarOpacityPoint | ( | double | x | ) |
Remove a control point from the scalar opacity function.
| [in] | x | The scalar position of the control point to remove. |
|
virtual |
| void mitk::TransferFunction::SetGradientOpacityPoints | ( | TransferFunction::ControlPoints | points | ) |
Replace all gradient opacity control points.
| [in] | points | The new set of (x, opacity) control points. |
|
virtual |
Get/Set min/max of transfer function range for initialization.
|
virtual |
Get/Set min/max of transfer function range for initialization.
| void mitk::TransferFunction::SetRGBPoints | ( | TransferFunction::RGBControlPoints | rgbpoints | ) |
Replace all color transfer function control points.
| [in] | rgbpoints | The new set of (x, RGB) control points. |
| void mitk::TransferFunction::SetScalarOpacityPoints | ( | TransferFunction::ControlPoints | points | ) |
Replace all scalar opacity control points.
| [in] | points | The new set of (x, opacity) control points. |
|
protected |
Wrapped VTK color transfer function
Definition at line 220 of file mitkTransferFunction.h.
|
protected |
Wrapped VTK gradient opacity transfer function
Definition at line 217 of file mitkTransferFunction.h.
|
protected |
Specified or calculated histogram (used for initialization)
Definition at line 229 of file mitkTransferFunction.h.
|
protected |
Current range of transfer function (used for initialization)
Definition at line 226 of file mitkTransferFunction.h.
|
protected |
Current range of transfer function (used for initialization)
Definition at line 223 of file mitkTransferFunction.h.
|
protected |
Wrapped VTK scalar opacity transfer function
Definition at line 214 of file mitkTransferFunction.h.