ImFusion SDK 4.3
TransferFunctionDisplayWidget Class Reference

#include <ImFusion/GUI/TransferFunctionWidget.h>

Qt Widget for displaying an overview of a transfer function and providing basic interaction. More...

+ Inheritance diagram for TransferFunctionDisplayWidget:

Detailed Description

Qt Widget for displaying an overview of a transfer function and providing basic interaction.

Usually not intended to be used directly, consider using the TransferFunctionWidget instead.

See also
TransferFunctionWidget

Public Types

using HistogramType = TypedImage<unsigned int>
 

Signals

void zoomRangeChanged (double, double)
 
void mouseIntensityChanged (double)
 

Public Member Functions

 TransferFunctionDisplayWidget (TransferFunction *transferFunction, QWidget *parent=nullptr)
 Standard constructor, creates a widget to setup the given transfer function.
 
 ~TransferFunctionDisplayWidget () override
 Virtual Destructor.
 
bool performLoadAction ()
 Loads a transfer function from a file selected by the user.
 
bool performSaveAction ()
 Saves the current transfer function to a file specified by the user.
 
void resetZoom ()
 Resets the zoom to fit the entire intensity range.
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Getters/Setters

enum  Mode { Mode2D , Mode3D }
 
void setCompactMode (bool value)
 
bool compactMode () const
 Returns the flag whether to use the compact mode or show the full widget.
 
void setNonLinearOpacity (bool value)
 Sets the flag whether to show a non-linear opacity scale.
 
bool nonLinearOpacity () const
 Returns the flag whether to show a non-linear opacity scale.
 
bool showThumbnails () const
 Returns the flag whether to show thumbnails.
 
void setShowThumbnails (bool value)
 Sets the flag whether to show thumbnails.
 
bool isCheckerboardDrawn () const
 Returns the flag whether to draw the checkerboard background.
 
void setDrawCheckerboard (bool value)
 Sets the flag whether to draw the checkerboard background.
 
Mode mode () const
 Returns the mode, either 2D or 3D in 2D, there is an implicit black-white scale drawn over the entire window when no tissues are defined in 2D, values outside of the window are clamped as if the colorscale extended infinitely in both direction in 3D, values outside of the window are not visible at all.
 
void setMode (Mode mode) const
 Sets the active mode.
 
void setTransferFunction (TransferFunction *transferFunction)
 Sets the transfer function this widget manipulates, may be 0.
 
void setImage (const SharedImageSet *image, int index)
 Sets the image the TF is applied to (optional, may be nullptr). Used for displaying a histogram and modifying windowing.
 
void setView (GUI::View *view)
 Sets the view on which this transfer function is based (optional, may be nullptr) Used for rendering thumbnails and automatically requesting updates If the view is an instance of ImageView2D or ImageView3D, the mode of the widget is changed accordingly.
 

Qt-related overrides

void paintEvent (QPaintEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void wheelEvent (QWheelEvent *e) override
 
void leaveEvent (QEvent *e) override
 
void contextMenuEvent (QContextMenuEvent *e) override
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 
void hideEvent (QHideEvent *e) override
 

Additional Inherited Members

- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Constructor & Destructor Documentation

◆ TransferFunctionDisplayWidget()

TransferFunctionDisplayWidget ( TransferFunction * transferFunction,
QWidget * parent = nullptr )

Standard constructor, creates a widget to setup the given transfer function.

Parameters
transferFunctionThe transfer function this widget manipulates, may be 0
parentParent widget, may be 0.

Member Function Documentation

◆ setCompactMode()

void setCompactMode ( bool value)

Sets whether to use the compact mode or show the full widget. The compact mode shows an overview and allows for altering the windowing only.

◆ setNonLinearOpacity()

void setNonLinearOpacity ( bool value)

Sets the flag whether to show a non-linear opacity scale.

The non-linear scale facilitates configuring low opacities.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close