OpenWalnut
1.5.0dev
|
Allows one to display and interact with clustered voxel data. More...
#include <WMClusterDisplayVoxels.h>
Public Member Functions | |
virtual const std::string | getName () const |
Gives back the name of this module. More... | |
virtual const std::string | getDescription () const |
Gives back a description of this module. More... | |
virtual std::shared_ptr< WModule > | factory () const |
Due to the prototype design pattern used to build modules, this method returns a new instance of this method. More... | |
virtual const char ** | getXPMIcon () const |
Get the icon for this module in XPM format. More... | |
Public Member Functions inherited from WModule | |
WModule () | |
Constructs a new WModule instance. More... | |
virtual | ~WModule () |
Destructor. More... | |
const InputConnectorList & | getInputConnectors () const |
Gives back input connectors. More... | |
std::shared_ptr< WModuleInputConnector > | getInputConnector (std::string name) |
Finds the named connector for the module. More... | |
std::shared_ptr< WModuleInputConnector > | findInputConnector (std::string name) |
Finds the named connector for the module. More... | |
const OutputConnectorList & | getOutputConnectors () const |
Gives back output connectors. More... | |
std::shared_ptr< WModuleOutputConnector > | getOutputConnector (std::string name) |
Finds the named connector for the module. More... | |
std::shared_ptr< WModuleOutputConnector > | findOutputConnector (std::string name) |
Finds the named connector for the module. More... | |
std::shared_ptr< WModuleConnector > | getConnector (std::string name) |
Finds the named connector for the module. More... | |
std::shared_ptr< WModuleConnector > | findConnector (std::string name) |
Finds the named connector for the module. More... | |
std::shared_ptr< WProperties > | getProperties () const |
Return a pointer to the properties object of the module. More... | |
std::shared_ptr< WProperties > | getInformationProperties () const |
Return a pointer to the information properties object of the module. More... | |
const WBoolFlag & | isInitialized () const |
Determines whether the module instance is properly initialized. More... | |
const WBoolFlag & | isUseable () const |
Checks whether the module instance is ready to be used. More... | |
const WBoolFlag & | isAssociated () const |
Checks whether this module is associated with an container. More... | |
const WBoolFlag & | isReady () const |
Checks whether this module is ready. More... | |
const WBoolFlag & | isReadyOrCrashed () const |
This is the logical or of isReady and isCrashed. More... | |
const WBoolFlag & | isRunning () const |
Returns a flag denoting whether the thread currently is running or nor. More... | |
void | waitRestored () |
This method waits for the module to be restored completely. More... | |
bool | isRestoreNeeded () const |
Check whether this module is in restore mode. More... | |
void | setRestoreNeeded (bool restore=true) |
Change the restore mode. More... | |
void | reportRestoreComplete () |
Called by loaders to tell the module that loading has been completed. More... | |
std::shared_ptr< WModuleContainer > | getAssociatedContainer () const |
The container this module is associated with. More... | |
virtual boost::signals2::connection | subscribeSignal (MODULE_SIGNAL signal, t_ModuleGenericSignalHandlerType notifier) |
Connects a specified notify function with a signal this module instance is offering. More... | |
virtual boost::signals2::connection | subscribeSignal (MODULE_SIGNAL signal, t_ModuleErrorSignalHandlerType notifier) |
Connects a specified notify function with a signal this module instance is offering. More... | |
virtual std::shared_ptr< WProgressCombiner > | getRootProgressCombiner () |
Gets the modules base progress. More... | |
virtual MODULE_TYPE | getType () const |
Gets the type of the module. More... | |
void | disconnect () |
Completely disconnects all connected connectors of this module. More... | |
WCombinerTypes::WDisconnectList | getPossibleDisconnections () |
Gives a list of all WDisconnectCombiners possible. More... | |
boost::filesystem::path | getLocalPath () const |
Returns the local path of the module. More... | |
boost::filesystem::path | getLibPath () const |
Returns the absolute path to the library containing this module. More... | |
std::string | getPackageName () const |
Returns the name of the package the module belongs to, The package name basically is the name of the library containing this and maybe other modules. More... | |
bool | isDeprecated () const |
Checks whether the module was marked as deprecated. More... | |
std::string | getDeprecationMessage () const |
Queries the deprecation message of a module if specified. More... | |
virtual WModuleMetaInformation::ConstSPtr | getMetaInformation () const |
The meta information of this module. More... | |
const std::string & | getUUID () const |
Get the UUID of the module instance. More... | |
WPropString | getRuntimeName () const |
Returns the name the user has given this module. More... | |
const WRequirement * | checkRequirements () const |
This method checks whether all the requirements of the module are complied. More... | |
virtual boost::signals2::connection | subscribeSignal (THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier) |
Connects a specified notify function with a signal this thread instance is offering. More... | |
Public Member Functions inherited from WThreadedRunner | |
WThreadedRunner () | |
Default constructor. More... | |
virtual | ~WThreadedRunner () |
Destructor. More... | |
virtual void | run () |
Run thread. More... | |
void | run (THREADFUNCTION f) |
Run thread. More... | |
void | wait (bool requestFinish=false) |
Wait for the thread to be finished. More... | |
virtual void | requestStop () |
This method's purpose is to request a stop without waiting for it. More... | |
virtual boost::signals2::connection | subscribeSignal (THREAD_SIGNAL signal, t_ThreadErrorSignalHandlerType notifier) |
Connects a specified notify function with a signal this thread instance is offering. More... | |
const WBoolFlag & | isCrashed () const |
Checks whether this thread has been crashed. More... | |
const std::string & | getCrashMessage () const |
Get the message of the exception finally causing the crash. More... | |
void | setThreadName (std::string name) |
Set the name of the thread. More... | |
std::string | getThreadName () const |
Returns the current thread name. More... | |
Public Member Functions inherited from WPrototyped | |
WPrototyped () | |
Default constructor. More... | |
virtual | ~WPrototyped () |
Destructor. More... | |
template<typename T > | |
bool | isA () |
Checks whether the actual prototype has the specified runtime type. More... | |
Protected Member Functions | |
virtual void | moduleMain () |
Entry point after loading the module. More... | |
virtual void | connectors () |
Initialize the connectors this module is using. More... | |
virtual void | properties () |
Initialize the properties for this module. More... | |
Protected Member Functions inherited from WModule | |
void | threadMain () |
Thread entry point. More... | |
virtual void | onThreadException (const WException &e) |
This method is called if an exception was caught, which came from the custom thread code. More... | |
void | setAssociatedContainer (std::shared_ptr< WModuleContainer > container) |
Sets the container this module is associated with. More... | |
virtual void | requirements () |
Initialize requirements in this function. More... | |
virtual std::string | deprecated () const |
This function allows module programmers to mark their modules deprecated in a user-friendly way. More... | |
void | initialize () |
Manages initialization. More... | |
virtual void | cleanup () |
Called whenever the module should shutdown. More... | |
void | addConnector (std::shared_ptr< WModuleInputConnector > con) |
Adds the specified connector to the list of inputs. More... | |
void | addConnector (std::shared_ptr< WModuleOutputConnector > con) |
Adds the specified connector to the list of outputs. More... | |
void | removeConnectors () |
Removes all connectors properly. More... | |
virtual void | activate () |
Callback for m_active. More... | |
virtual const t_GenericSignalHandlerType | getSignalHandler (MODULE_CONNECTOR_SIGNAL signal) |
Gives the signal handler function responsible for a given signal. More... | |
virtual void | notifyConnectionEstablished (std::shared_ptr< WModuleConnector > here, std::shared_ptr< WModuleConnector > there) |
Gets called whenever a connector gets connected to the specified input. More... | |
virtual void | notifyConnectionClosed (std::shared_ptr< WModuleConnector > here, std::shared_ptr< WModuleConnector > there) |
Gets called whenever a connection between a remote and local connector gets closed. More... | |
virtual void | notifyDataChange (std::shared_ptr< WModuleConnector > input, std::shared_ptr< WModuleConnector > output) |
Gets called when the data on one input connector changed. More... | |
void | ready () |
Call this whenever your module is ready and can react on property changes. More... | |
wlog::WStreamedLogger | infoLog () const |
Logger instance for comfortable info logging. More... | |
wlog::WStreamedLogger | debugLog () const |
Logger instance for comfortable debug logging. More... | |
wlog::WStreamedLogger | warnLog () const |
Logger instance for comfortable warning- logs. More... | |
wlog::WStreamedLogger | errorLog () const |
Logger instance for comfortable error logging. More... | |
void | setLocalPath (boost::filesystem::path path) |
Sets the local module path. More... | |
void | setLibPath (boost::filesystem::path path) |
Set the path to the library which contains this module. More... | |
void | setPackageName (std::string name) |
Set the package name. More... | |
Protected Member Functions inherited from WThreadedRunner | |
virtual void | notifyStop () |
Gets called when the thread should be stopped. More... | |
void | yield () const |
Give remaining execution timeslice to another thread. More... | |
void | sleep (const int32_t t) const |
Sets thread asleep. More... | |
void | msleep (const int32_t t) const |
Sets thread asleep. More... | |
void | waitForStop () |
Let the thread sleep until a stop request was given. More... | |
void | handleDeadlyException (const WException &e, std::string sender="WThreadedRunner") |
Handle the specified exception which was not caught in the thread, which basically means the thread has crashed. More... | |
Private Member Functions | |
bool | loadClustering (boost::filesystem::path clusterFile) |
loads and parses the clustering text file More... | |
void | createTexture () |
creates a new texture More... | |
void | handleMinSizeChanged () |
function to handle user input More... | |
void | updateAll () |
after the active cluster list has changed this function updates the texture, triangulation and dendrogram More... | |
void | createMesh () |
creates a triangulation from the selected clusters More... | |
void | renderMesh () |
renders the triangulated clusters More... | |
void | initWidgets () |
inits the graphical widgets in the 3d scene More... | |
void | updateWidgets () |
updates the graphical widgets in the 3d scene More... | |
bool | widgetClicked () |
handles mouse clicks into the dendrogram More... | |
void | setPropertyBoundaries () |
updates property min/max values after loading a clustering file More... | |
void | dendrogramClick (WPickInfo pickInfo) |
listenes to the pickhandler and determines if a click into the dendrogram happened More... | |
void | updateOutDataset () |
update the output connector on demand, for performance reasons this is not done every time a change to the cluster selection is applied More... | |
void | setButtonLabels () |
helper function to set the label on the in scene buttons depending on which labeling scheme is selected More... | |
void | initColors (size_t root, size_t index) |
recursive function that initalizes a color for for every cluster, the biggest of the two children of a cluster inherits the color for its parent More... | |
Private Attributes | |
std::shared_ptr< WModuleInputData< WDataSetSingle > > | m_input |
An input connector that accepts order 1 datasets. More... | |
std::shared_ptr< WModuleOutputData< WDataSetScalar > > | m_output |
An output connector for the output scalar dsataset. More... | |
std::shared_ptr< WDataSetSingle > | m_dataSet |
This is a pointer to the dataset the module is currently working on. More... | |
std::shared_ptr< WDataSetScalar > | m_outDataOld |
Point to the out dataset once it is invalid. More... | |
std::shared_ptr< WDataSetScalar > | m_outData |
This is a pointer to the current output. More... | |
osg::ref_ptr< osg::Texture3D > | m_texture |
stores a pointer to the texture we paint in More... | |
std::vector< size_t > | m_data |
stores a pointer to the texture we paint in More... | |
std::shared_ptr< WGridRegular3D > | m_grid |
stores a pointer to the grid we use; More... | |
CDV_DISPLAYMODE | m_currentDisplayMode |
the currently active display mode More... | |
std::string | m_currentDisplayModeString |
the currently active display mode as string More... | |
std::shared_ptr< WCondition > | m_propCondition |
A condition used to notify about changes in several properties. More... | |
WPropTrigger | m_propReadTrigger |
This property triggers the actual reading,. More... | |
WPropFilename | m_propClusterFile |
The png files will be loaded form this directory. More... | |
WPropInt | m_propSelectedCluster |
the currently selected cluster More... | |
WPropInt | m_propXBiggestClusters |
the currently selected cluster More... | |
WPropDouble | m_propValue |
the similarity value for selecting clusters More... | |
WPropInt | m_propSelectedLoadedPartion |
property to select a loaded partition More... | |
WPropInt | m_propLevelsFromTop |
how many levels to go down from top More... | |
WPropInt | m_propXClusters |
how many levels to go down from top More... | |
WPropDouble | m_propMinBranchLength |
minimum branch length More... | |
WPropInt | m_propMinBranchSize |
minimum branch size More... | |
WPropBool | m_propHideOutliers |
show or hide outliers More... | |
WPropBool | m_propShowSelectedButtons |
show or hide outliers More... | |
WPropInt | m_propMinSizeToColor |
specifies a minimum size for a cluster so that too small cluster won't get an own color More... | |
WPropGroup | m_groupSelection |
grouping the different selection methods More... | |
WPropGroup | m_groupDendrogram |
grouping the dendrogram manipulation properties More... | |
WPropGroup | m_groupTriangulation |
grouping the dendrogram manipulation properties More... | |
WPropBool | m_propShowDendrogram |
controls the display of the dendrogram overlay More... | |
WPropBool | m_propPlotHeightByLevel |
controls plotting the height of a join More... | |
WPropBool | m_propResizeWithWindow |
if true position and size sliders will have no effect More... | |
WPropTrigger | m_propZoomIn |
zoom into tree, sets m_zoom true and m_zoomRoot to the currently selected cluster More... | |
WPropTrigger | m_propZoomOut |
zooms out, m_zoom = false, dendrogram shows the whole tree More... | |
size_t | m_zoomRoot |
control variable for zoom mode More... | |
bool | m_zoom |
control variable for zoom mode More... | |
WPropInt | m_propDendrogramSizeX |
controls the width of the dendrogram More... | |
WPropInt | m_propDendrogramSizeY |
controls the height of the dendrogram More... | |
WPropInt | m_propDendrogramOffsetX |
controls the horizontal origin of the dendrogram More... | |
WPropInt | m_propDendrogramOffsetY |
controls the vertical origin of the dendrogram More... | |
WPropBool | m_propShowVoxelTriangulation |
if true position and size sliders will have no effect More... | |
WPropBool | m_showNotInClusters |
if true clusters not in the current selection list will be rendered grey in the texture and triangulation More... | |
WHierarchicalTreeVoxels | m_tree |
the tree object as loaded from the file More... | |
osg::ref_ptr< WGEGroupNode > | m_moduleNode |
Pointer to the modules group node. More... | |
osg::ref_ptr< WGEGroupNode > | m_dendrogramNode |
Pointer to the dendrogram group node. More... | |
osg::ref_ptr< WGEGroupNode > | m_meshNode |
Pointer to the mesh group node. More... | |
std::vector< osg::ref_ptr< osg::Geode > > | m_outputGeodes |
a vector of dendrogram nodes More... | |
std::vector< std::shared_ptr< WTriangleMesh > > | m_triMeshes |
triangulation of the active clusters More... | |
std::shared_ptr< WTriangleMesh > | m_nonActiveMesh |
triangulation of the voxels not in active clusters More... | |
std::vector< size_t > | m_activatedClusters |
stores the currently activated clusters More... | |
std::vector< osg::ref_ptr< WOSGButton > > | m_activeClustersButtonList |
list of buttons for the active cluster selection More... | |
WGECamera * | m_camera |
stores the camera object More... | |
WDendrogramGeode * | m_dendrogramGeode |
stores the dendrogram geode More... | |
osgWidget::WindowManager * | m_wm |
stores a pointer to the window manager used for osg wdgets and overlay stuff More... | |
bool | m_selectionChanged |
true if the selection changed and widgets need redrawing More... | |
bool | m_dendrogramDirty |
true if the dendrogram needs redrawing More... | |
size_t | m_rootCluster |
currently selected cluster + offset More... | |
int | m_oldViewHeight |
stores the old viewport resolution to check whether a resize happened More... | |
int | m_oldViewWidth |
stores the old viewport resolution to check whether a resize happened More... | |
WPropInt | m_infoCountLeafes |
info property More... | |
WPropInt | m_infoCountClusters |
info property More... | |
WPropInt | m_infoMaxLevel |
info property More... | |
std::vector< std::vector< size_t > > | m_loadedPartitions |
set partitions loaded from file More... | |
WPropTrigger | m_buttonUpdateOutput |
updates the output connector on demand, as we don't want to do this every paint command More... | |
std::shared_ptr< WItemSelection > | m_clusterSelectionsList |
A list of cluster selection methods. More... | |
WPropSelection | m_clusterSelection |
Selection property for clusters. More... | |
WPropTrigger | m_buttonExecuteSelection |
triggers the cluster selection update More... | |
std::shared_ptr< WItemSelection > | m_buttonLabelList |
A list of button labels. More... | |
WPropSelection | m_buttonLabelSelection |
Selection property for button labels. More... | |
std::vector< WColor > | m_clusterColors |
stores a preset color for every cluster, so clusters can keep the same color through different selection methods More... | |
size_t | m_colorIndex |
temp variable for the initColors function More... | |
Additional Inherited Members | |
Public Types inherited from WModule | |
typedef std::vector< std::shared_ptr< WModuleInputConnector > > | InputConnectorList |
The type for the list of input connectors. More... | |
typedef std::vector< std::shared_ptr< WModuleOutputConnector > > | OutputConnectorList |
The type for the list of output connectors. More... | |
typedef std::shared_ptr< WModule > | SPtr |
Shared pointer to a WModule. More... | |
typedef std::shared_ptr< const WModule > | ConstSPtr |
Shared pointer to a const WModule. More... | |
Public Types inherited from WThreadedRunner | |
typedef std::shared_ptr< WThreadedRunner > | SPtr |
Abbreviation to a shared_ptr to this type. More... | |
typedef std::shared_ptr< const WThreadedRunner > | ConstSPtr |
Abbreviation to a const shared_ptr to this type. More... | |
typedef boost::function< void(void) > | THREADFUNCTION |
Type used for simple thread functions. More... | |
Static Public Member Functions inherited from WModule | |
static SPtr | findByUUID (std::string uuid) |
Find a module instance by UUID. More... | |
Static Public Member Functions inherited from WThreadedRunner | |
static void | setThisThreadName (std::string name) |
Static function to set the name of the calling thread. More... | |
Protected Types inherited from WModule | |
typedef std::vector< WRequirement * > | Requirements |
The type of the requirement list. More... | |
Protected Attributes inherited from WModule | |
std::shared_ptr< WProperties > | m_properties |
The property object for the module. More... | |
std::shared_ptr< WProperties > | m_infoProperties |
The property object for the module containing only module whose purpose is "PV_PURPOSE_INFORMNATION". More... | |
std::shared_ptr< WProgressCombiner > | m_progress |
Progress indicator used as parent for all progress' of this module. More... | |
WBoolFlag | m_initialized |
True if everything is initialized and ready to be used. More... | |
WBoolFlag | m_isAssociated |
True if container got associated with this flag. More... | |
WBoolFlag | m_isUsable |
True if associated && initialized. More... | |
WBoolFlag | m_isReady |
True if ready() was called. More... | |
WBoolFlag | m_isReadyOrCrashed |
It is true whenever m_isReady or WThreadedRunner::m_isCrashed is true. More... | |
WBoolFlag | m_isRunning |
True if the module currently is running. More... | |
WBoolFlag | m_isLoadFinished |
Flag to denote whether the module container and the project loader have finished their work. More... | |
bool | m_restoreMode |
Flag denoting the current restore mode. More... | |
std::shared_ptr< WProgress > | m_readyProgress |
Progress indicator for the "ready" state. More... | |
WConditionSet | m_moduleState |
The internal state of the module. More... | |
std::shared_ptr< WModuleContainer > | m_container |
The container this module belongs to. More... | |
InputConnectorList | m_inputConnectors |
Set of input connectors associated with this module. More... | |
OutputConnectorList | m_outputConnectors |
Set of output connectors associated with this module. More... | |
WPropBool | m_active |
True whenever the module should be active. More... | |
WPropString | m_runtimeName |
This property holds a user specified name for the current module instance. More... | |
boost::filesystem::path | m_localPath |
The path where the module binary resides in. More... | |
boost::filesystem::path | m_libPath |
The absolute path to the library containing this module. More... | |
std::string | m_packageName |
The name of the lib/the package containing this module. More... | |
Requirements | m_requirements |
The list of requirements. More... | |
Protected Attributes inherited from WThreadedRunner | |
boost::thread | m_thread |
Thread instance. More... | |
WBoolFlag | m_shutdownFlag |
Condition getting fired whenever the thread should quit. More... | |
WBoolFlag | m_isCrashed |
True whenever an exception is thrown during threadMain. More... | |
std::string | m_crashMessage |
The crash message. More... | |
Allows one to display and interact with clustered voxel data.
Definition at line 74 of file WMClusterDisplayVoxels.h.
|
protectedvirtual |
Initialize the connectors this module is using.
Reimplemented from WModule.
Definition at line 92 of file WMClusterDisplayVoxels.cpp.
References WModule::addConnector(), WModule::connectors(), m_input, and m_output.
|
private |
creates a triangulation from the selected clusters
Definition at line 728 of file WMClusterDisplayVoxels.cpp.
References WMarchingLegoAlgorithm::genSurfaceOneValue(), m_activatedClusters, m_data, m_grid, m_nonActiveMesh, m_showNotInClusters, and m_triMeshes.
Referenced by moduleMain(), and updateAll().
|
private |
creates a new texture
Definition at line 680 of file WMClusterDisplayVoxels.cpp.
References WDataHandler::getDefaultSubject(), WKernel::getRunningKernel(), WKernel::getSelectionManager(), m_data, m_grid, and m_texture.
Referenced by moduleMain().
|
private |
listenes to the pickhandler and determines if a click into the dendrogram happened
pickInfo | the pickInfo object as sent out by the pickhandler |
Definition at line 1064 of file WMClusterDisplayVoxels.cpp.
References WDendrogramGeode::getClickedCluster(), WPickInfo::getName(), WPickInfo::getPickPixel(), m_buttonExecuteSelection, m_dendrogramGeode, m_propSelectedCluster, m_propShowDendrogram, WPVBaseTypes::PV_TRIGGER_TRIGGERED, WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y().
Referenced by moduleMain().
|
virtual |
Due to the prototype design pattern used to build modules, this method returns a new instance of this method.
NOTE: it should never be initialized or modified in some other way. A simple new instance is required.
Implements WModule.
Definition at line 69 of file WMClusterDisplayVoxels.cpp.
|
virtual |
Gives back a description of this module.
Implements WPrototyped.
Definition at line 85 of file WMClusterDisplayVoxels.cpp.
|
virtual |
Gives back the name of this module.
Implements WPrototyped.
Definition at line 79 of file WMClusterDisplayVoxels.cpp.
|
virtual |
Get the icon for this module in XPM format.
Reimplemented from WModule.
Definition at line 75 of file WMClusterDisplayVoxels.cpp.
|
private |
function to handle user input
Definition at line 591 of file WMClusterDisplayVoxels.cpp.
References m_dendrogramDirty.
Referenced by moduleMain().
|
private |
recursive function that initalizes a color for for every cluster, the biggest of the two children of a cluster inherits the color for its parent
root | cluster to work on |
index | color index of the parent |
Definition at line 658 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTree::getChildren(), wge::getNthHSVColor(), m_clusterColors, m_colorIndex, m_tree, and WHierarchicalTree::size().
Referenced by loadClustering().
|
private |
inits the graphical widgets in the 3d scene
Definition at line 852 of file WMClusterDisplayVoxels.cpp.
References WKernel::getGraphicsEngine(), WKernel::getRunningKernel(), WModule::m_active, m_camera, m_dendrogramNode, m_meshNode, m_moduleNode, m_oldViewHeight, m_oldViewWidth, m_wm, and updateWidgets().
Referenced by moduleMain().
|
private |
loads and parses the clustering text file
clusterFile | to the clustering file |
Definition at line 596 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTreeVoxels::addCluster(), WHierarchicalTreeVoxels::addLeaf(), WModule::debugLog(), WHierarchicalTree::getClusterCount(), WFileParser::getLinesForTagSeparated(), WFileParser::getRawLines(), initColors(), m_clusterColors, m_colorIndex, m_grid, m_loadedPartitions, m_tree, and WFileParser::readFile().
Referenced by moduleMain().
|
protectedvirtual |
Entry point after loading the module.
Runs in separate thread.
Implements WModule.
Definition at line 260 of file WMClusterDisplayVoxels.cpp.
References WConditionSet::add(), createMesh(), createTexture(), dendrogramClick(), WKernel::getGraphicsEngine(), WKernel::getRunningKernel(), handleMinSizeChanged(), initWidgets(), loadClustering(), WModule::m_active, m_buttonExecuteSelection, m_buttonLabelSelection, m_buttonUpdateOutput, m_clusterSelection, m_currentDisplayMode, m_dataSet, m_dendrogramDirty, m_grid, m_groupDendrogram, m_groupSelection, m_groupTriangulation, m_input, m_moduleNode, WModule::m_moduleState, m_propClusterFile, m_propCondition, m_propDendrogramOffsetX, m_propDendrogramOffsetY, m_propDendrogramSizeX, m_propDendrogramSizeY, m_propHideOutliers, m_propLevelsFromTop, m_propMinBranchLength, m_propMinBranchSize, m_propMinSizeToColor, m_propPlotHeightByLevel, m_propReadTrigger, m_propResizeWithWindow, m_propSelectedCluster, m_propSelectedLoadedPartion, m_propShowDendrogram, m_propShowSelectedButtons, m_propShowVoxelTriangulation, m_propValue, m_propXBiggestClusters, m_propXClusters, m_propZoomIn, m_propZoomOut, m_showNotInClusters, WThreadedRunner::m_shutdownFlag, m_zoom, m_zoomRoot, WPVBaseTypes::PV_TRIGGER_READY, WPVBaseTypes::PV_TRIGGER_TRIGGERED, WModule::ready(), renderMesh(), setButtonLabels(), setPropertyBoundaries(), WConditionSet::setResetable(), updateAll(), updateOutDataset(), and WConditionSet::wait().
|
protectedvirtual |
Initialize the properties for this module.
Reimplemented from WModule.
Definition at line 106 of file WMClusterDisplayVoxels.cpp.
References WPropertyHelper::PC_SELECTONLYONE::addTo(), m_buttonExecuteSelection, m_buttonLabelList, m_buttonLabelSelection, m_buttonUpdateOutput, m_clusterSelection, m_clusterSelectionsList, m_groupDendrogram, m_groupSelection, m_groupTriangulation, m_infoCountClusters, m_infoCountLeafes, m_infoMaxLevel, WModule::m_infoProperties, m_propClusterFile, m_propCondition, m_propDendrogramOffsetX, m_propDendrogramOffsetY, m_propDendrogramSizeX, m_propDendrogramSizeY, WModule::m_properties, m_propHideOutliers, m_propLevelsFromTop, m_propMinBranchLength, m_propMinBranchSize, m_propMinSizeToColor, m_propPlotHeightByLevel, m_propReadTrigger, m_propResizeWithWindow, m_propSelectedCluster, m_propSelectedLoadedPartion, m_propShowDendrogram, m_propShowSelectedButtons, m_propShowVoxelTriangulation, m_propValue, m_propXBiggestClusters, m_propXClusters, m_propZoomIn, m_propZoomOut, m_showNotInClusters, WModule::properties(), and WPVBaseTypes::PV_TRIGGER_READY.
|
private |
renders the triangulated clusters
Definition at line 751 of file WMClusterDisplayVoxels.cpp.
References m_activatedClusters, m_clusterColors, m_meshNode, m_nonActiveMesh, m_outputGeodes, m_propShowVoxelTriangulation, m_showNotInClusters, m_triMeshes, and string_utils::toString().
Referenced by moduleMain(), and updateAll().
|
private |
helper function to set the label on the in scene buttons depending on which labeling scheme is selected
Definition at line 1099 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTree::getCustomData(), WHierarchicalTree::getLevel(), m_activatedClusters, m_activeClustersButtonList, m_buttonLabelSelection, m_propShowSelectedButtons, m_tree, WHierarchicalTree::size(), and string_utils::toString().
Referenced by moduleMain(), and updateWidgets().
|
private |
updates property min/max values after loading a clustering file
Definition at line 227 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTree::getClusterCount(), WHierarchicalTree::getLeafCount(), WHierarchicalTree::getMaxLevel(), m_infoCountClusters, m_infoCountLeafes, m_infoMaxLevel, m_loadedPartitions, m_propLevelsFromTop, m_propMinSizeToColor, m_propSelectedCluster, m_propSelectedLoadedPartion, m_rootCluster, m_tree, m_zoom, and m_zoomRoot.
Referenced by moduleMain().
|
private |
after the active cluster list has changed this function updates the texture, triangulation and dendrogram
Definition at line 491 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTree::colorCluster(), createMesh(), WHierarchicalTree::downXLevelsFromTop(), WHierarchicalTreeVoxels::findClustersForBranchLength(), WHierarchicalTreeVoxels::findClustersForValue(), WHierarchicalTree::findXBiggestClusters(), WHierarchicalTreeVoxels::findXClusters(), WHierarchicalTree::getClusterCount(), WHierarchicalTreeVoxels::getVoxelsForCluster(), m_activatedClusters, m_clusterColors, m_currentDisplayMode, m_currentDisplayModeString, m_data, m_dendrogramDirty, m_grid, m_loadedPartitions, m_propHideOutliers, m_propLevelsFromTop, m_propMinBranchLength, m_propMinBranchSize, m_propSelectedCluster, m_propSelectedLoadedPartion, m_propValue, m_propXBiggestClusters, m_propXClusters, m_selectionChanged, m_showNotInClusters, m_texture, m_tree, and renderMesh().
Referenced by moduleMain().
|
private |
update the output connector on demand, for performance reasons this is not done every time a change to the cluster selection is applied
Definition at line 1079 of file WMClusterDisplayVoxels.cpp.
References m_data, and m_dataSet.
Referenced by moduleMain().
|
private |
updates the graphical widgets in the 3d scene
Definition at line 896 of file WMClusterDisplayVoxels.cpp.
References WHierarchicalTree::colorCluster(), WHierarchicalTree::getClusterCount(), WKernel::getGraphicsEngine(), wge::getNthHSVColor(), WKernel::getRunningKernel(), m_activatedClusters, m_activeClustersButtonList, m_camera, m_clusterColors, m_currentDisplayMode, m_currentDisplayModeString, m_dendrogramDirty, m_dendrogramGeode, m_oldViewHeight, m_oldViewWidth, m_propDendrogramOffsetX, m_propDendrogramOffsetY, m_propDendrogramSizeX, m_propDendrogramSizeY, m_propMinSizeToColor, m_propPlotHeightByLevel, m_propResizeWithWindow, m_propShowDendrogram, m_propShowSelectedButtons, m_selectionChanged, m_tree, m_wm, m_zoom, m_zoomRoot, setButtonLabels(), and widgetClicked().
Referenced by initWidgets().
|
private |
handles mouse clicks into the dendrogram
Definition at line 1023 of file WMClusterDisplayVoxels.cpp.
References m_activeClustersButtonList, and m_outputGeodes.
Referenced by updateWidgets().
|
private |
stores the currently activated clusters
Definition at line 393 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), renderMesh(), setButtonLabels(), updateAll(), and updateWidgets().
|
private |
list of buttons for the active cluster selection
Definition at line 398 of file WMClusterDisplayVoxels.h.
Referenced by setButtonLabels(), updateWidgets(), and widgetClicked().
|
private |
triggers the cluster selection update
Definition at line 440 of file WMClusterDisplayVoxels.h.
Referenced by dendrogramClick(), moduleMain(), and properties().
|
private |
A list of button labels.
Definition at line 445 of file WMClusterDisplayVoxels.h.
Referenced by properties().
|
private |
Selection property for button labels.
Definition at line 450 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and setButtonLabels().
|
private |
updates the output connector on demand, as we don't want to do this every paint command
Definition at line 425 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
stores the camera object
Definition at line 400 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and updateWidgets().
|
private |
stores a preset color for every cluster, so clusters can keep the same color through different selection methods
Definition at line 455 of file WMClusterDisplayVoxels.h.
Referenced by initColors(), loadClustering(), renderMesh(), updateAll(), and updateWidgets().
|
private |
Selection property for clusters.
Definition at line 435 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
A list of cluster selection methods.
Definition at line 430 of file WMClusterDisplayVoxels.h.
Referenced by properties().
|
private |
temp variable for the initColors function
Definition at line 457 of file WMClusterDisplayVoxels.h.
Referenced by initColors(), and loadClustering().
|
private |
the currently active display mode
Definition at line 260 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), updateAll(), and updateWidgets().
|
private |
the currently active display mode as string
Definition at line 265 of file WMClusterDisplayVoxels.h.
Referenced by updateAll(), and updateWidgets().
|
private |
stores a pointer to the texture we paint in
label vector for texture creation
Definition at line 250 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), createTexture(), updateAll(), and updateOutDataset().
|
private |
This is a pointer to the dataset the module is currently working on.
Definition at line 224 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and updateOutDataset().
|
private |
true if the dendrogram needs redrawing
Definition at line 408 of file WMClusterDisplayVoxels.h.
Referenced by handleMinSizeChanged(), moduleMain(), updateAll(), and updateWidgets().
|
private |
stores the dendrogram geode
Definition at line 402 of file WMClusterDisplayVoxels.h.
Referenced by dendrogramClick(), and updateWidgets().
|
private |
Pointer to the dendrogram group node.
Definition at line 384 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets().
|
private |
stores a pointer to the grid we use;
Definition at line 255 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), createTexture(), loadClustering(), moduleMain(), and updateAll().
|
private |
grouping the dendrogram manipulation properties
Definition at line 339 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
grouping the different selection methods
Definition at line 334 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
grouping the dendrogram manipulation properties
Definition at line 344 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
info property
Definition at line 417 of file WMClusterDisplayVoxels.h.
Referenced by properties(), and setPropertyBoundaries().
|
private |
info property
Definition at line 416 of file WMClusterDisplayVoxels.h.
Referenced by properties(), and setPropertyBoundaries().
|
private |
info property
Definition at line 418 of file WMClusterDisplayVoxels.h.
Referenced by properties(), and setPropertyBoundaries().
|
private |
An input connector that accepts order 1 datasets.
Definition at line 214 of file WMClusterDisplayVoxels.h.
Referenced by connectors(), and moduleMain().
|
private |
set partitions loaded from file
Definition at line 420 of file WMClusterDisplayVoxels.h.
Referenced by loadClustering(), setPropertyBoundaries(), and updateAll().
|
private |
Pointer to the mesh group node.
Definition at line 385 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and renderMesh().
|
private |
Pointer to the modules group node.
Definition at line 383 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and moduleMain().
|
private |
triangulation of the voxels not in active clusters
Definition at line 391 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), and renderMesh().
|
private |
stores the old viewport resolution to check whether a resize happened
Definition at line 412 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and updateWidgets().
|
private |
stores the old viewport resolution to check whether a resize happened
Definition at line 414 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and updateWidgets().
|
private |
This is a pointer to the current output.
Definition at line 234 of file WMClusterDisplayVoxels.h.
|
private |
Point to the out dataset once it is invalid.
Used to deregister from the datahandler
Definition at line 229 of file WMClusterDisplayVoxels.h.
|
private |
An output connector for the output scalar dsataset.
Definition at line 219 of file WMClusterDisplayVoxels.h.
Referenced by connectors().
|
private |
a vector of dendrogram nodes
Definition at line 387 of file WMClusterDisplayVoxels.h.
Referenced by renderMesh(), and widgetClicked().
|
private |
The png files will be loaded form this directory.
Definition at line 273 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
A condition used to notify about changes in several properties.
Definition at line 270 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
controls the horizontal origin of the dendrogram
Definition at line 368 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
controls the vertical origin of the dendrogram
Definition at line 369 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
controls the width of the dendrogram
Definition at line 366 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
controls the height of the dendrogram
Definition at line 367 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
show or hide outliers
Definition at line 319 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
how many levels to go down from top
Definition at line 298 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), setPropertyBoundaries(), and updateAll().
|
private |
minimum branch length
Definition at line 309 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
minimum branch size
Definition at line 314 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
specifies a minimum size for a cluster so that too small cluster won't get an own color
Definition at line 329 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), setPropertyBoundaries(), and updateWidgets().
|
private |
controls plotting the height of a join
Definition at line 354 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
This property triggers the actual reading,.
Definition at line 272 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
if true position and size sliders will have no effect
Definition at line 359 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateWidgets().
|
private |
the currently selected cluster
Definition at line 278 of file WMClusterDisplayVoxels.h.
Referenced by dendrogramClick(), moduleMain(), properties(), setPropertyBoundaries(), and updateAll().
|
private |
property to select a loaded partition
Definition at line 293 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), setPropertyBoundaries(), and updateAll().
|
private |
controls the display of the dendrogram overlay
Definition at line 349 of file WMClusterDisplayVoxels.h.
Referenced by dendrogramClick(), moduleMain(), properties(), and updateWidgets().
|
private |
show or hide outliers
Definition at line 324 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), setButtonLabels(), and updateWidgets().
|
private |
if true position and size sliders will have no effect
Definition at line 374 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and renderMesh().
|
private |
the similarity value for selecting clusters
Definition at line 288 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
the currently selected cluster
Definition at line 283 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
how many levels to go down from top
Definition at line 303 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), properties(), and updateAll().
|
private |
zoom into tree, sets m_zoom true and m_zoomRoot to the currently selected cluster
Definition at line 361 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
zooms out, m_zoom = false, dendrogram shows the whole tree
Definition at line 362 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), and properties().
|
private |
currently selected cluster + offset
Definition at line 410 of file WMClusterDisplayVoxels.h.
Referenced by setPropertyBoundaries().
|
private |
true if the selection changed and widgets need redrawing
Definition at line 406 of file WMClusterDisplayVoxels.h.
Referenced by updateAll(), and updateWidgets().
|
private |
if true clusters not in the current selection list will be rendered grey in the texture and triangulation
Definition at line 379 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), moduleMain(), properties(), renderMesh(), and updateAll().
|
private |
stores a pointer to the texture we paint in
Definition at line 239 of file WMClusterDisplayVoxels.h.
Referenced by createTexture(), and updateAll().
|
private |
the tree object as loaded from the file
Definition at line 381 of file WMClusterDisplayVoxels.h.
Referenced by initColors(), loadClustering(), setButtonLabels(), setPropertyBoundaries(), updateAll(), and updateWidgets().
|
private |
triangulation of the active clusters
Definition at line 389 of file WMClusterDisplayVoxels.h.
Referenced by createMesh(), and renderMesh().
|
private |
stores a pointer to the window manager used for osg wdgets and overlay stuff
Definition at line 404 of file WMClusterDisplayVoxels.h.
Referenced by initWidgets(), and updateWidgets().
|
private |
control variable for zoom mode
Definition at line 364 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), setPropertyBoundaries(), and updateWidgets().
|
private |
control variable for zoom mode
Definition at line 363 of file WMClusterDisplayVoxels.h.
Referenced by moduleMain(), setPropertyBoundaries(), and updateWidgets().