ImFusion SDK 4.3
ViewGroup Class Reference

#include <ImFusion/GUI/ViewGroup.h>

Non-owning container of multiple views that share and sync properties with each other. More...

+ Inheritance diagram for ViewGroup:

Detailed Description

Non-owning container of multiple views that share and sync properties with each other.

ViewGroup provides you with a set of convenience functions helpful for dealing with multiple views showing the same data. Furthermore, it enables you to specify Qt properties that shall automatically be synced between the views, such as zoom factor or blending mode if you have multiple MPR views.

The DisplayWidgetMulti will usually form a ViewGroup consisting of 3 MPR views and one 3D view.

Signals

void viewRemoved (InteractiveView *view)
 
void viewAdded (InteractiveView *view)
 

Public Member Functions

 ViewGroup (const QStringList &sharedProperties)
 
void addView (InteractiveView *view)
 
void removeView (InteractiveView *view)
 
bool isInGroup (InteractiveView *view) const
 
int numViews () const
 
void addProperty (const QString &name)
 
void removeProperty (const QString &name)
 
bool isShared (const QString &name) const
 
bool acceptsData (const Data *data)
 Returns whether any of the group's views is capable of displaying the given data.
 
void setVisibleData (const DataList &data)
 Calls setVisibleData() on all of the views comprising this group.
 
DataList visibleData () const
 Returns the union of the visible data of all views comprising this group.
 
bool showData (Data *data)
 Calls showData() on all of the views comprising this group.
 
void hideData (Data *data)
 Calls hideData() on all of the views comprising this group.
 
void addObject (GUI::ViewObject *object)
 
void removeObject (GUI::ViewObject *object)
 
const std::vector< InteractiveView * > & views () const
 
std::vector< ImageView2D * > mprViews () const
 Returns only the ImageView2D views of type GlView::SLICE3D.
 
std::vector< ImageView3D * > volumeViews () const
 Returns only the ImageView3D views of type GlView::SPACE3D.
 
void reset ()
 Reset all member views to their default state.
 
std::optional< vec3 > intersectionCenter () const
 Return the world coordinate where the 3 views intersect.
 
void centerIntersection ()
 Center slice views to their intersection.
 
void centerSlices (const vec3 &point)
 Center slice views to a specific point.
 
void centerSlices (const vec3 &point, const vec3 &normal)
 Center slice views to a specific point.
 
void centerOnData (const Data *data)
 Center both slice views and volume view on the provided data.
 
void orthogonalizeSlices ()
 Rotates the 3 slice views to an orthogonal configuration.
 
void setMprViewMatrices (const mat4 &matrix)
 Sets the matrix of each MPR view according to their original plane.
 
void alignMprViewsToVoxelGrid ()
 Aligns all MPR views to the volume axes.
 
const QStringList & sharedProperties () const
 
void configure (const Properties *p) override
 Set one or multiple properties.
 
void configuration (Properties *p) const override
 Retrieve the properties of this object.
 
- Public Member Functions inherited from 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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 
- 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.
 

Protected Member Functions

bool connectProperty (const char *property, InteractiveView *src, InteractiveView *dst)
 
bool disconnectProperty (const char *property, InteractiveView *src, InteractiveView *dst)
 
void onDisplayOptionsChanged (DisplayOptions2d *sender)
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Protected Attributes

QStringList m_sharedProperties
 
std::vector< InteractiveView * > m_views
 
bool m_ignoreEvents
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 

Member Function Documentation

◆ centerSlices()

void centerSlices ( const vec3 & point,
const vec3 & normal )

Center slice views to a specific point.

The second parameter additionally rotates the views, such that the normal on the first slice matches it.

◆ orthogonalizeSlices()

void orthogonalizeSlices ( )

Rotates the 3 slice views to an orthogonal configuration.

Requires exactly 3 slice views to be present. Will generally need additional rotation around view normals to look "nice". Use with care.

◆ setMprViewMatrices()

void setMprViewMatrices ( const mat4 & matrix)

Sets the matrix of each MPR view according to their original plane.

The rotation part of matrix sets the rotation of views with originalPlane() == 0. All MPR views will have the same position afterward (they will all intersect in their centers).

◆ configure()

void configure ( const Properties * p)
overridevirtual

Set one or multiple properties.

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
overridevirtual

Retrieve the properties of this object.

Reimplemented from Configurable.


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