25 #ifndef WMPICKINGDVR_H
26 #define WMPICKINGDVR_H
33 #include "WVisiTrace.h"
34 #include "core/kernel/WModule.h"
64 virtual const std::string
getName()
const;
78 virtual std::shared_ptr< WModule >
factory()
const;
134 std::pair<int, int>
getWYSIWYPBounds(
const std::vector<double>& vecAlphaAcc );
145 std::vector<int>& vecIndicesLowerBounds,
146 std::vector<int>& vecIndicesUpperBounds );
171 double getTFAlpha(
const double scalar )
const;
205 std::shared_ptr< WModuleInputData< WDataSetScalar > >
m_scalarIC;
This data set type contains scalars as values.
This class adds some convenience methods to WGEGroupNode.
Allows to select a 3D position in a DVR by selecting a 2D location on the screen.
std::vector< WPosition > m_curve3D
Positions representing the from VisiTrace selection mode.
WPropColor m_lineColor
Color of line/s indicating selected position/s.
WPropBool m_continuousDrawing
Should line be shown during drawing acrion?
virtual void moduleMain()
Entry point after loading the module.
void setPickPositionFromConnector()
Set the current pick position to the WSinglePosition from the connector.
osg::ref_ptr< osg::Geode > m_geode
The geometry rendered by this module.
bool m_pickHandlerConnected
Is the signal from the pick handler connected?
double getTFAlpha(const double scalar) const
Evaluate transfer function.
WPropSelection m_wysiwypPositionType
Selecting the type of position obtained by WYSIWYP.
WPropSelection m_pickingCriteriaCur
Current picking method.
bool m_intersected
Indicates if intersected positions are valid.
virtual const std::string getDescription() const
Gives back a description of this module.
virtual void properties()
Initialize the properties for this module.
osg::Vec3f m_posStart
Intersection position start.
WPropDouble m_crossSize
Picking crosshair length of lines.
void setPickPositionSource()
Check if a WSinglePosition is connected and dis/connects pick signal from clicking accordingly.
osg::ref_ptr< WGEManagedGroupNode > m_rootNode
All other geodes or OSG nodes of this module will be attached on this node.
std::shared_ptr< WItemSelection > m_pickingCriteriaList
Possible picking criteria for m_pickingCriteriaCur.
std::pair< int, int > getWYSIWYPBounds(const std::vector< double > &vecAlphaAcc)
Calculates which interval is the most visible according to WYSIWYP (http://dx.doi....
std::vector< std::pair< double, WPosition > > sampleIntensityAlongRay()
Samples the scalar data set along the viewing ray.
WPosition getPickedDVRPosition(std::string pickingMode, bool *pickingSuccess)
Compute the position picked in the DVR.
virtual void requirements()
Initialize requirements for this module.
std::shared_ptr< WItemSelection > m_selectionTypesList
List of selection types for m_selectionType.
virtual ~WMPickingDVR()
Destroys this module.
WPropBool m_opacityCorrectionEnabled
If active, the opacity of the classified fragment gets scaled according to sample count to ensure rel...
WPropDouble m_lineThickness
Thinkness of line/s indicating selected position/s.
WPropSelection m_selectionType
Property determining what type of structure will be selected.
WPropDouble m_alphaThreshold
Alpha value and alpha percentage.
WPropBool m_triggerCalculation
Trigger Property, will be triggered by the pickhandle.
virtual void connectors()
Initialize the connectors this module is using.
virtual const std::string getName() const
Gives back the name of this module.
std::shared_ptr< WModuleInputData< WDataSetSingle > > m_transferFunction
The transfer function as an input data set.
osg::Vec3f m_posEnd
Intersection position end.
std::vector< std::pair< double, WPosition > > computeVisiTraceCandidates()
Get the Visitrace candidates.
WMPickingDVR()
Creates the module for drawing contour lines.
void updatePositionIndicator(osg::Vec3f position)
Set the new position of the graphical representation of the picked position.
void pickHandler(WPickInfo pickInfo)
Handles picking and calculates ray start/end-position.
WVisiTrace m_visiTrace
Class providing VisiTrace optimization.
std::shared_ptr< WItemSelection > m_wysiwypPositionTypesList
Possible position types for WYSIWYP.
std::shared_ptr< WModuleInputData< WSinglePosition > > m_externalScreenPos
External screen position for picking instead of by clicking.
void updateModuleGUI(std::string pickingMode)
Shows and hide relevant properties according to chosen picking mode.
WPosition m_oldRayStart
Used to check if position of picking has changed.
void calculateIntervalsWYSIWYP(const std::vector< double > &vecAlphaAcc, std::vector< int > &vecIndicesLowerBounds, std::vector< int > &vecIndicesUpperBounds)
Calculates the object intervals according to WYSIWYP (http://dx.doi.org/10.1109/TVCG....
double compositingStep(const double accAlpha, double currentAlpha)
Perform front to back compositing.
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...
std::shared_ptr< WModuleInputData< WDataSetScalar > > m_scalarIC
Input connector for scalar data.
WPropInt m_sampleSteps
Number of samples along the ray.
void updateCurveRendering()
Create the line rendering of the VisiTrace line.
bool m_pickInProgress
Indicates whether continouos picking is still in progress.
std::shared_ptr< WCondition > m_propCondition
Needed for recreating the geometry, incase when resolution changes.
Class representing a single module of OpenWalnut.
Encapsulates info for pick action.
This only is a 3d double vector.
Represents a single position that is transferable between modules by connectors.
Class performing graph computations for VisiTrace algorithm.