![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/TransferFunctionWidget.h>
Widget for setting up a transfer function. More...
Inheritance diagram for TransferFunctionWidget: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. | |
| SignalReceiver & | operator= (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. | |
| 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.
| TransferFunctionWidget | ( | bool | compactMode, |
| QWidget * | parent = nullptr ) |
Standard constructor, creates a widget to setup the given transfer function.
| compactMode | Flag whether to use the compact mode or show the full widget. |
| parent | Parent widget, may be 0. |