![]() |
ImFusion C++ SDK 4.4.0
|
#include <ImFusion/Base/DisplayOptions3d.h>
Configures the display options for 3D volume rendering of images. More...
Configures the display options for 3D volume rendering of images.
3D display options are mainly consumed by GlVolumeRenderer which implements 3D rendering of image data. Usually, DisplayOptions3d are attached as a DataComponent to the image for which they define the rendering options. However, classes like ImageView3D may use special (e.g. view-specific) display options for rendering their images and therefore use the same interface.
Public Types | |
| enum class | MaskingMode { Ignore , Discard , MultiplicativeBlend , DiscardZerosMultiplicativeOnes } |
| Enumeration of options for how masked image pixels should be rendered. More... | |
Public Member Functions | |
| DisplayOptions3d (const DisplayOptions3d &other) | |
| DisplayOptions3d (const Data *data) | |
| Standard constructor for the given data. | |
| virtual DisplayOptions3d & | operator= (const DisplayOptions3d &other) |
| bool | operator== (const DisplayOptions3d &other) const |
| const Data * | data () const |
| Return the optional reference Data. | |
| Public Member Functions inherited from ImFusion::DataComponent< DisplayOptions3d > | |
| std::unique_ptr< DataComponentBase > | clone () const override |
| Creates a clone of this data component. | |
| std::unique_ptr< Subclass > | cloneDerived () const |
| bool | assign (const DataComponentBase &other) override |
| Assigns the content of other to this data component. | |
| bool | equals (const DataComponentBase &other) const override |
| Compares this data component to other for equality. | |
| Public Member Functions inherited from ImFusion::Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
| Public Member Functions inherited from ImFusion::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. | |
Public Attributes | |
| Signal< DisplayOptions3d * > | signalChanged |
| Signal emitted when the display options have changed. | |
| Public Attributes inherited from ImFusion::Configurable | |
| Signal | signalParametersChanged |
| Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Getters/Setters | |
| double | window () const |
| Returns the windowing width corresponding to the image. | |
| void | setWindow (double value) |
| Sets the windowing width corresponding to the image. | |
| double | level () const |
| Returns the windowing level corresponding to the image. | |
| void | setLevel (double value) |
| Sets the windowing level corresponding to the image. | |
| void | setWindowLevel (double window, double level) |
| Convenience method for setting the windowing range based on window and level. | |
| double | alpha () const |
| Returns the alpha blending factor of the corresponding image. | |
| void | setAlpha (double value) |
| Sets the alpha blending factor of the corresponding image. | |
| bool | invert () const |
| Returns the flag whether to invert the intensities. | |
| void | setInvert (bool value) |
| Sets the flag whether to invert the intensities. | |
| MaskingMode | maskingMode () const |
| Returns the mode how masked image pixels should be rendered. | |
| void | setMaskingMode (MaskingMode value) |
| Sets the mode how masked image pixels should be rendered. | |
| const vec4 & | maskingColor () const |
| Returns the color used for the Multiply options of maskingMode(). | |
| void | setMaskingColor (const vec4 &value) |
| Sets the color used for the Multiply options of maskingMode(). | |
| TransferFunction & | transferFunction () |
| Returns the transfer function to use. | |
| const TransferFunction & | transferFunction () const |
| Returns the transfer function to use. | |
DataComponent interface | |
| std::string | id () const override |
| Returns a unique string identifier for this type of data component. | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from ImFusion::LazyInstantiatedDataComponent< DisplayOptions3d > | |
| static DisplayOptions3d & | get (const Data &data) |
| Returns the specific options of type T that are associated with the given data. | |
| Protected Member Functions inherited from ImFusion::DataComponentBase | |
| DataComponentBase (const DataComponentBase &)=default | |
| DataComponentBase & | operator= (const DataComponentBase &other)=default |
| Protected Member Functions inherited from ImFusion::SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
| Protected Attributes inherited from ImFusion::Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
strong |
Enumeration of options for how masked image pixels should be rendered.
| Enumerator | |
|---|---|
| Ignore | Ignore the mask, render the pixels normally. |
| Discard | Discard masked pixels (where the mask value is 0). |
| MultiplicativeBlend | Multiply masked pixels with the maskingColor() (where the mask value is 0). |
| DiscardZerosMultiplicativeOnes | Discard pixels where the mask value is 0, multiply pixels with maskingColor() where the mask value is 1. |
| double ImFusion::DisplayOptions3d::window | ( | ) | const |
Returns the windowing width corresponding to the image.
| void ImFusion::DisplayOptions3d::setWindow | ( | double | value | ) |
Sets the windowing width corresponding to the image.
| double ImFusion::DisplayOptions3d::level | ( | ) | const |
Returns the windowing level corresponding to the image.
| void ImFusion::DisplayOptions3d::setLevel | ( | double | value | ) |
Sets the windowing level corresponding to the image.
|
overridevirtual |
Returns a unique string identifier for this type of data component.
Implements ImFusion::DataComponentBase.
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from ImFusion::Configurable.