Widget for editing the three components of a volume rendering transfer function.
More...
#include <QmitkTransferFunctionWidget.h>
Widget for editing the three components of a volume rendering transfer function.
Provides interactive canvases for:
- Scalar opacity (grayvalue to opacity mapping)
- Color (grayvalue to RGB color mapping)
- Gradient opacity (gradient magnitude to opacity mapping)
Includes a range slider for zooming into a subrange of the scalar domain. Each canvas shows the underlying histogram and supports adding, removing, and dragging control points.
- See also
- QmitkTransferFunctionGeneratorWidget, QmitkColorTransferFunctionCanvas, QmitkPiecewiseFunctionCanvas
Definition at line 55 of file QmitkTransferFunctionWidget.h.
◆ QmitkTransferFunctionWidget()
| QmitkTransferFunctionWidget::QmitkTransferFunctionWidget |
( |
QWidget * |
parent = nullptr, |
|
|
Qt::WindowFlags |
f = {} |
|
) |
| |
Construct the transfer function widget.
- Parameters
-
| [in] | parent | The parent widget. |
| [in] | f | Window flags. |
◆ ~QmitkTransferFunctionWidget()
| QmitkTransferFunctionWidget::~QmitkTransferFunctionWidget |
( |
| ) |
|
|
override |
◆ OnResetSlider
| void QmitkTransferFunctionWidget::OnResetSlider |
( |
| ) |
|
|
slot |
Reset the range slider to its full extent.
◆ OnSpanChanged
| void QmitkTransferFunctionWidget::OnSpanChanged |
( |
double |
lower, |
|
|
double |
upper |
|
) |
| |
|
slot |
Handle range slider span changes and update canvas ranges.
- Parameters
-
| [in] | lower | The new lower bound. |
| [in] | upper | The new upper bound. |
◆ OnUpdateCanvas
| void QmitkTransferFunctionWidget::OnUpdateCanvas |
( |
| ) |
|
|
slot |
Refresh all three canvases from the current transfer function data.
◆ SetColorFunctionEnabled()
| void QmitkTransferFunctionWidget::SetColorFunctionEnabled |
( |
bool |
enable | ) |
|
Enable or disable the color function canvas.
- Parameters
-
| [in] | enable | True to enable. |
◆ SetDataNode()
Set the data node whose transfer function to edit.
Retrieves or creates a "TransferFunction" property on the node and initializes the canvases with the function data and histogram.
- Parameters
-
| [in] | node | The data node (must contain image data). |
| [in] | timestep | The time step for multi-timepoint images. |
| [in] | renderer | Optional renderer for renderer-specific properties. |
◆ SetGradientOpacityFunctionEnabled()
| void QmitkTransferFunctionWidget::SetGradientOpacityFunctionEnabled |
( |
bool |
enable | ) |
|
Enable or disable the gradient opacity function canvas.
- Parameters
-
| [in] | enable | True to enable. |
◆ SetScalarLabel()
| void QmitkTransferFunctionWidget::SetScalarLabel |
( |
const QString & |
scalarLabel | ) |
|
Set the label text for the scalar axis on all three canvases.
- Parameters
-
| [in] | scalarLabel | The axis label (e.g. "Grayvalue" or "HU"). |
◆ SetScalarOpacityFunctionEnabled()
| void QmitkTransferFunctionWidget::SetScalarOpacityFunctionEnabled |
( |
bool |
enable | ) |
|
Enable or disable the scalar opacity function canvas.
- Parameters
-
| [in] | enable | True to enable. |
◆ SetXValueColor
| void QmitkTransferFunctionWidget::SetXValueColor |
( |
const QString |
text | ) |
|
|
slot |
Set the x value for the color canvas from a line edit.
- Parameters
-
| [in] | text | The x value as text. |
◆ SetXValueGradient
| void QmitkTransferFunctionWidget::SetXValueGradient |
( |
const QString |
text | ) |
|
|
slot |
Set the x value for the gradient opacity canvas from a line edit.
- Parameters
-
| [in] | text | The x value as text. |
◆ SetXValueScalar
| void QmitkTransferFunctionWidget::SetXValueScalar |
( |
const QString |
text | ) |
|
|
slot |
Set the x value for the scalar opacity canvas from a line edit.
- Parameters
-
| [in] | text | The x value as text. |
◆ SetYValueGradient
| void QmitkTransferFunctionWidget::SetYValueGradient |
( |
const QString |
text | ) |
|
|
slot |
Set the y value for the gradient opacity canvas from a line edit.
- Parameters
-
| [in] | text | The y value as text. |
◆ SetYValueScalar
| void QmitkTransferFunctionWidget::SetYValueScalar |
( |
const QString |
text | ) |
|
|
slot |
Set the y value for the scalar opacity canvas from a line edit.
- Parameters
-
| [in] | text | The y value as text. |
◆ ShowColorFunction()
| void QmitkTransferFunctionWidget::ShowColorFunction |
( |
bool |
show | ) |
|
Show or hide the color function canvas.
- Parameters
-
◆ ShowGradientOpacityFunction()
| void QmitkTransferFunctionWidget::ShowGradientOpacityFunction |
( |
bool |
show | ) |
|
Show or hide the gradient opacity function canvas.
- Parameters
-
◆ ShowScalarOpacityFunction()
| void QmitkTransferFunctionWidget::ShowScalarOpacityFunction |
( |
bool |
show | ) |
|
Show or hide the scalar opacity function canvas.
- Parameters
-
◆ UpdateRanges
| void QmitkTransferFunctionWidget::UpdateRanges |
( |
| ) |
|
|
slot |
Update the visible ranges of all canvases from the range slider.
◆ UpdateStepSize
| void QmitkTransferFunctionWidget::UpdateStepSize |
( |
| ) |
|
|
slot |
Recalculate the range slider step size based on the current range.
◆ histogramCache
◆ m_Controls
| std::unique_ptr<Ui::QmitkTransferFunctionWidget> QmitkTransferFunctionWidget::m_Controls |
|
protected |
◆ tfpToChange
| mitk::TransferFunctionProperty::Pointer QmitkTransferFunctionWidget::tfpToChange |
|
protected |
The documentation for this class was generated from the following file: