OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
WVisualizationPropertyHandler Class Reference

Creates, updates and handles the visualization properties. More...

#include <WVisualizationPropertyHandler.h>

+ Collaboration diagram for WVisualizationPropertyHandler:

Public Types

typedef boost::function< void() > CallbackPtr
 Function variables for updating the data. More...
 
typedef std::shared_ptr< WVisualizationPropertyHandlerSPtr
 shared_ptr that points to itself More...
 

Public Member Functions

 WVisualizationPropertyHandler (WProtonData::SPtr protonData, WPropertyGroup::SPtr properties, WVisualizationPropertyHandler::CallbackPtr dataUpdate)
 constructor More...
 
void createProperties ()
 creates the group property and the subproperty
More...
 
void updateProperty ()
 update current group property and subproperty
More...
 
void toggleColorProperties ()
 toggle the visibility of plain color and transfer function More...
 
WPropBool getColorFromEdep ()
 Getter. More...
 
WPropBool getSizesFromEdep ()
 Getter. More...
 
WPropBool getEnableClusterSize ()
 Getter. More...
 
WPropColor getColorSelection ()
 Getter. More...
 
WPropTransferFunction getTransferFunction ()
 Getter. More...
 
WTransferFunction setColorGradient ()
 Sets the transfer function. More...
 

Private Member Functions

void propertyCallback (WPropertyBase::SPtr property)
 Reload data when properties for selection of primaries and secondaries changed. More...
 

Private Attributes

WProtonData::SPtr m_protonData
 Pointer to the content and header of the CSV. More...
 
WPropertyGroup::SPtr m_properties
 A property variable that is generated by the WModul. More...
 
WVisualizationPropertyHandler::CallbackPtr m_dataUpdate
 A function variable that reinitializes the WDataSets. More...
 
WPropGroup m_visualizationGroup
 Property group for visualization modes. More...
 
WPropBool m_colorFromEdep
 Decides whether to color points based on the deposited energy or not. More...
 
WPropBool m_sizesFromEdep
 Decides whether to scale the points sizes according to their deposited energy. More...
 
WPropBool m_enabledClusterSize
 En-/Disables the clustersize conversion. More...
 
WPropColor m_colorSelection
 Property that holds the current selected color when not coloring points based on their deposited energy. More...
 
WPropTransferFunction m_gradient
 Property that holds the current transfer function for the gradient. More...
 
WPropTrigger m_applyGradient
 Property that holds a trigger to apply the current transfer function for the gradient. More...
 

Detailed Description

Creates, updates and handles the visualization properties.

Definition at line 37 of file WVisualizationPropertyHandler.h.

Member Typedef Documentation

◆ CallbackPtr

typedef boost::function< void( ) > WVisualizationPropertyHandler::CallbackPtr

Function variables for updating the data.

Definition at line 43 of file WVisualizationPropertyHandler.h.

◆ SPtr

shared_ptr that points to itself

Definition at line 48 of file WVisualizationPropertyHandler.h.

Constructor & Destructor Documentation

◆ WVisualizationPropertyHandler()

WVisualizationPropertyHandler::WVisualizationPropertyHandler ( WProtonData::SPtr  protonData,
WPropertyGroup::SPtr  properties,
WVisualizationPropertyHandler::CallbackPtr  dataUpdate 
)
explicit

constructor

Parameters
protonDataPointer to the content and header of the CSV
propertiesA property variable that is generated by the WModul
dataUpdateA function variable that reinitializes the WDataSets

Definition at line 30 of file WVisualizationPropertyHandler.cpp.

Member Function Documentation

◆ createProperties()

void WVisualizationPropertyHandler::createProperties ( )

◆ getColorFromEdep()

WPropBool WVisualizationPropertyHandler::getColorFromEdep ( )

Getter.

Returns
WPropBool of color from edep

Definition at line 115 of file WVisualizationPropertyHandler.cpp.

References m_colorFromEdep.

◆ getColorSelection()

WPropColor WVisualizationPropertyHandler::getColorSelection ( )

Getter.

Returns
WPropBool of color from selection

Definition at line 130 of file WVisualizationPropertyHandler.cpp.

References m_colorSelection.

◆ getEnableClusterSize()

WPropBool WVisualizationPropertyHandler::getEnableClusterSize ( )

Getter.

Returns
WPropBool switch to enable cluster size conversion.

Definition at line 125 of file WVisualizationPropertyHandler.cpp.

References m_enabledClusterSize.

◆ getSizesFromEdep()

WPropBool WVisualizationPropertyHandler::getSizesFromEdep ( )

Getter.

Returns
WPropBool of sizes from edep

Definition at line 120 of file WVisualizationPropertyHandler.cpp.

References m_sizesFromEdep.

◆ getTransferFunction()

WPropTransferFunction WVisualizationPropertyHandler::getTransferFunction ( )

Getter.

Returns
WPropTransferFunction of the current transfer function

Definition at line 135 of file WVisualizationPropertyHandler.cpp.

References m_gradient.

◆ propertyCallback()

void WVisualizationPropertyHandler::propertyCallback ( WPropertyBase::SPtr  property)
private

Reload data when properties for selection of primaries and secondaries changed.

Parameters
propertycontains reference to the property which called updateProperty()

Definition at line 103 of file WVisualizationPropertyHandler.cpp.

References m_applyGradient, m_dataUpdate, WPVBaseTypes::PV_TRIGGER_READY, WPVBaseTypes::PV_TRIGGER_TRIGGERED, and updateProperty().

Referenced by createProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setColorGradient()

WTransferFunction WVisualizationPropertyHandler::setColorGradient ( )

Sets the transfer function.

Returns
WTransferFunction with specified gradient

Definition at line 140 of file WVisualizationPropertyHandler.cpp.

References WTransferFunction::addAlpha(), and WTransferFunction::addColor().

Referenced by createProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleColorProperties()

void WVisualizationPropertyHandler::toggleColorProperties ( )

toggle the visibility of plain color and transfer function

Definition at line 87 of file WVisualizationPropertyHandler.cpp.

References m_applyGradient, m_colorFromEdep, m_colorSelection, and m_gradient.

Referenced by updateProperty().

+ Here is the caller graph for this function:

◆ updateProperty()

void WVisualizationPropertyHandler::updateProperty ( )

update current group property and subproperty

Definition at line 64 of file WVisualizationPropertyHandler.cpp.

References WSingleSelectorName::getEdep(), WSingleSelectorName::getX(), WSingleSelectorName::getY(), WSingleSelectorName::getZ(), m_applyGradient, m_colorFromEdep, m_colorSelection, m_enabledClusterSize, m_gradient, m_protonData, m_sizesFromEdep, and toggleColorProperties().

Referenced by createProperties(), and propertyCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_applyGradient

WPropTrigger WVisualizationPropertyHandler::m_applyGradient
private

Property that holds a trigger to apply the current transfer function for the gradient.

Definition at line 173 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), propertyCallback(), toggleColorProperties(), and updateProperty().

◆ m_colorFromEdep

WPropBool WVisualizationPropertyHandler::m_colorFromEdep
private

Decides whether to color points based on the deposited energy or not.

Definition at line 148 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), getColorFromEdep(), toggleColorProperties(), and updateProperty().

◆ m_colorSelection

WPropColor WVisualizationPropertyHandler::m_colorSelection
private

Property that holds the current selected color when not coloring points based on their deposited energy.

Definition at line 163 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), getColorSelection(), toggleColorProperties(), and updateProperty().

◆ m_dataUpdate

WVisualizationPropertyHandler::CallbackPtr WVisualizationPropertyHandler::m_dataUpdate
private

A function variable that reinitializes the WDataSets.

Definition at line 138 of file WVisualizationPropertyHandler.h.

Referenced by propertyCallback().

◆ m_enabledClusterSize

WPropBool WVisualizationPropertyHandler::m_enabledClusterSize
private

En-/Disables the clustersize conversion.

Definition at line 158 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), getEnableClusterSize(), and updateProperty().

◆ m_gradient

WPropTransferFunction WVisualizationPropertyHandler::m_gradient
private

Property that holds the current transfer function for the gradient.

Definition at line 168 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), getTransferFunction(), toggleColorProperties(), and updateProperty().

◆ m_properties

WPropertyGroup::SPtr WVisualizationPropertyHandler::m_properties
private

A property variable that is generated by the WModul.

Definition at line 133 of file WVisualizationPropertyHandler.h.

Referenced by createProperties().

◆ m_protonData

WProtonData::SPtr WVisualizationPropertyHandler::m_protonData
private

Pointer to the content and header of the CSV.

Definition at line 128 of file WVisualizationPropertyHandler.h.

Referenced by updateProperty().

◆ m_sizesFromEdep

WPropBool WVisualizationPropertyHandler::m_sizesFromEdep
private

Decides whether to scale the points sizes according to their deposited energy.

Definition at line 153 of file WVisualizationPropertyHandler.h.

Referenced by createProperties(), getSizesFromEdep(), and updateProperty().

◆ m_visualizationGroup

WPropGroup WVisualizationPropertyHandler::m_visualizationGroup
private

Property group for visualization modes.

Definition at line 143 of file WVisualizationPropertyHandler.h.

Referenced by createProperties().


The documentation for this class was generated from the following files: