31 #include "WDataCreatorFiberParallel.h"
32 #include "WDataCreatorFiberRandom.h"
33 #include "WDataCreatorFiberSpiral.h"
34 #include "WDataCreatorFiberStar.h"
35 #include "WDataCreatorTorus.h"
36 #include "WMDataCreatorFibers.h"
37 #include "WMDataCreatorFibers.xpm"
38 #include "core/common/WAssert.h"
39 #include "core/common/WProgress.h"
40 #include "core/common/WStrategyHelper.h"
41 #include "core/dataHandler/WDataSetFibers.h"
42 #include "core/kernel/WKernel.h"
46 m_strategy(
"Dataset Creators",
"Select one of the dataset creators and configure it to your needs.", NULL,
47 "Creator",
"A list of all known creators." )
70 return datacreator_xpm;
75 return "Data Creator Fibers";
80 return "Allows the user to create fiber data sets providing a bunch of data creation schemes.";
98 m_size =
m_properties->addProperty(
"Size",
"The size of the dataset along the X,Y, and Z axis in the OpenWalnut coordinate system.",
113 "Vary data over time. This feature is <b>experimental</b>.",
148 size_t numVerts = numVertsPerFiber * numFibers;
155 vertices->reserve( numVerts * 3 );
156 fibIdx->reserve( numFibers );
157 lengths->reserve( numFibers );
158 fibIdxVertexMap->reserve( numVerts );
159 colors->reserve( numVerts * 3 );
169 vertices, fibIdx, lengths, fibIdxVertexMap, colors );
173 ds->addColorScheme( colors,
"Fiber Creator",
"The color from Fiber Creator." );
186 std::this_thread::sleep_for( std::chrono::milliseconds( 100 ) );
virtual void wait() const
Wait for the condition.
void setResetable(bool resetable=true, bool autoReset=true)
Sets the resetable flag.
virtual void add(std::shared_ptr< WCondition > condition)
Adds another condition to the set of conditions to wait for.
Class to encapsulate boost::condition_variable_any.
std::shared_ptr< WDataCreatorFiberParallel > SPtr
Abbreviate shared_ptr.
std::shared_ptr< WDataCreatorFiberRandom > SPtr
Abbreviate shared_ptr.
std::shared_ptr< WDataCreatorFiberSpiral > SPtr
Abbreviate shared_ptr.
std::shared_ptr< WDataCreatorFiberStar > SPtr
Abbreviate shared_ptr.
std::shared_ptr< WDataCreatorTorus< T > > SPtr
Abbreviate shared_ptr.
Represents a simple set of WFibers.
std::shared_ptr< std::vector< size_t > > IndexArray
Index list indexing fibers in VertexArray in terms of vertex numbers.
std::shared_ptr< std::vector< float > > ColorArray
Colors for each vertex in VertexArray.
std::shared_ptr< std::vector< size_t > > LengthArray
Lengths of fibers in terms of vertices.
std::shared_ptr< WDataSetFibers > SPtr
Pointer to dataset.
std::shared_ptr< std::vector< float > > VertexArray
List of vertex coordinates in term of components of vertices.
WPropPosition m_size
Size of the fiber bounding box.
virtual void connectors()
Initialize the connectors this module is using.
WPropPosition m_origin
Origin of the bounding box.
virtual const std::string getName() const
Gives back the name of this module.
WPropInt m_numVertsPerFiber
Number of vertices per fiber.
~WMDataCreatorFibers()
Destructor.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropBool m_timeDependent
Use time dependent variation of data (experimental).
WMDataCreatorFibers()
Standard constructor.
std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_output
The only output of this module.
WPropInt m_numFibers
Number of fibers.
WStrategyHelper< WObjectNDIP< WDataSetFibersCreatorInterface > > m_strategy
the strategy currently active.
WPropColor m_fibColor
Fiber color.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void properties()
Initialize the properties for this module.
virtual void moduleMain()
Entry point after loading the module.
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...
WPropInt m_seed
The seed for the random.
static PtrType createAndAdd(std::shared_ptr< WModule > module, std::string name="", std::string description="")
Convenience method to create a new instance of this out data connector with proper type and add it to...
Class representing a single module of OpenWalnut.
virtual void properties()
Initialize properties in this function.
wlog::WStreamedLogger debugLog() const
Logger instance for comfortable debug logging.
void removeConnectors()
Removes all connectors properly.
std::shared_ptr< WProperties > m_properties
The property object for the module.
void ready()
Call this whenever your module is ready and can react on property changes.
WConditionSet m_moduleState
The internal state of the module.
std::shared_ptr< WProgressCombiner > m_progress
Progress indicator used as parent for all progress' of this module.
virtual void connectors()
Initialize connectors in this function.
This only is a 3d double vector.
Class managing progress inside of modules.
std::shared_ptr< WProgress > SPtr
Shared pointer on a WProgress.
WProperties::SPtr getProperties() const
Get this strategy selectors properties.
void addStrategy(typename StrategyType::SPtr strategy)
Adds the given strategy to the list of all strategies.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.