Property for storing a mitk::TransferFunction.
More...
#include <mitkTransferFunctionProperty.h>
|
| typedef mitk::TransferFunction::Pointer | ValueType |
| | The type of the value stored by this property. More...
|
| |
|
| mitk::TransferFunction::Pointer | m_Value |
| |
Property for storing a mitk::TransferFunction.
Holds a transfer function that maps scalar values to colors and opacities for volume rendering or other rendering modes. The transfer function consists of scalar opacity, gradient opacity, and color transfer function components.
- Note
- If you want to use this property for an mitk::Image, make sure to set the mitk::RenderingModeProperty to a mode which supports transfer functions (e.g. COLORTRANSFERFUNCTION_COLOR). See the documentation of mitk::RenderingModeProperty. For a code example see mitkImageVtkMapper2DTransferFunctionTest.cpp in Core/Code/Testing.
- See also
- BaseProperty
-
TransferFunction
-
RenderingModeProperty
Definition at line 38 of file mitkTransferFunctionProperty.h.
◆ ValueType
◆ TransferFunctionProperty() [1/3]
| mitk::TransferFunctionProperty::TransferFunctionProperty |
( |
| ) |
|
|
protected |
◆ TransferFunctionProperty() [2/3]
◆ TransferFunctionProperty() [3/3]
| mitk::TransferFunctionProperty::TransferFunctionProperty |
( |
mitk::TransferFunction::Pointer |
value | ) |
|
|
protected |
◆ Clone()
| Pointer mitk::TransferFunctionProperty::Clone |
( |
| ) |
const |
◆ FromJSON()
| bool mitk::TransferFunctionProperty::FromJSON |
( |
const nlohmann::json & |
j | ) |
|
|
overridevirtual |
Deserialize the transfer function from JSON.
Reads scalar opacity points, gradient opacity points, and color transfer function nodes from a structured JSON object and creates a new TransferFunction instance.
- Parameters
-
| [in] | j | The JSON object containing the transfer function data. |
- Returns
- Always
true.
Implements mitk::BaseProperty.
◆ GetValue()
| virtual mitk::TransferFunction::Pointer mitk::TransferFunctionProperty::GetValue |
( |
| ) |
const |
|
virtual |
Get the transfer function.
- Returns
- The stored transfer function smart pointer.
◆ GetValueAsString()
| std::string mitk::TransferFunctionProperty::GetValueAsString |
( |
| ) |
const |
|
overridevirtual |
Return the transfer function as a string (address representation).
- Returns
- A string representation of the transfer function pointer.
Reimplemented from mitk::BaseProperty.
◆ mitkClassMacro()
◆ mitkCloneMacro()
◆ mitkNewMacro1Param()
◆ New()
| static Pointer mitk::TransferFunctionProperty::New |
( |
| ) |
|
|
static |
◆ operator=()
Assign a property value to this instance.
Performs a polymorphic assignment from the given property. The assignment succeeds only if the source and target properties are of the same type. The subclass-specific Assign() method is called to perform the actual value copy.
Subclasses must implement Assign(const BaseProperty&) and call the superclass Assign method for proper handling. The copy assignment operator of the subclass should be disabled and the base class operator should be made visible using "using" statements.
- Parameters
-
| [in] | property | The property whose value should be assigned to this instance. |
- Returns
- A reference to this property.
- See also
- AssignProperty
-
Assign
◆ SetValue()
| virtual void mitk::TransferFunctionProperty::SetValue |
( |
mitk::TransferFunction::Pointer |
_arg | ) |
|
|
virtual |
Set the transfer function.
- Parameters
-
| [in] | _arg | The new transfer function smart pointer. |
◆ ToJSON()
| bool mitk::TransferFunctionProperty::ToJSON |
( |
nlohmann::json & |
j | ) |
const |
|
overridevirtual |
Serialize the transfer function to JSON.
Serializes scalar opacity points, gradient opacity points, and color transfer function nodes into a structured JSON object.
- Parameters
-
| [out] | j | The JSON object to write the value into. |
- Returns
- Always
true.
Implements mitk::BaseProperty.
◆ m_Value
| mitk::TransferFunction::Pointer mitk::TransferFunctionProperty::m_Value |
|
protected |
The documentation for this class was generated from the following file: