ImFusion SDK 4.3
TransferFunctionWidget Class Reference

#include <ImFusion/GUI/TransferFunctionWidget.h>

Widget for setting up a transfer function. More...

+ Inheritance diagram for TransferFunctionWidget:

Detailed Description

Widget for setting up a transfer function.

Provides a GUI for a TransferFunction that is optionally also mapped onto a SharedImage.

Public Types

using Preset = std::pair<QString, std::function<void(TransferFunction&, const SharedImageSet&)>>
 Map of presets: string used for the GUI, std::function used to apply the preset to the TF.
 
using PresetMap = std::vector<Preset>
 

Public Member Functions

 TransferFunctionWidget (bool compactMode, QWidget *parent=nullptr)
 Standard constructor, creates a widget to setup the given transfer function.
 
 ~TransferFunctionWidget () override
 Virtual Destructor.
 
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 0). Used for displaying a histogram and modifying windowing.
 
void setView (GUI::View *view)
 Sets the view to update on changes as well as reference view.
 
void setPresets (const PresetMap &presets)
 Setter for the list of presets to provide.
 
void insertPreset (const Preset &preset)
 If the list of presets does not contain a preset with the same name, inserts the preset at the beginning of the list of presets, otherwise replaces the preset with the given one.
 
- 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.
 

Additional Inherited Members

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

Member Typedef Documentation

◆ Preset

using Preset = std::pair<QString, std::function<void(TransferFunction&, const SharedImageSet&)>>

Map of presets: string used for the GUI, std::function used to apply the preset to the TF.

We use a vector instead of a map to allow for custom sorting.

Constructor & Destructor Documentation

◆ TransferFunctionWidget()

TransferFunctionWidget ( bool compactMode,
QWidget * parent = nullptr )

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

Parameters
compactModeFlag whether to use the compact mode or show the full widget.
parentParent widget, may be 0.

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