29 #include "WDataCreatorRandom.h"
30 #include "WDataCreatorSingleDirection.h"
31 #include "WDataCreatorSphere.h"
32 #include "WMDataCreatorVector.h"
33 #include "WMDataCreatorVector.xpm"
34 #include "core/common/WAssert.h"
35 #include "core/common/WProgress.h"
36 #include "core/common/WStrategyHelper.h"
37 #include "core/dataHandler/WDataSetVector.h"
38 #include "core/dataHandler/WGridRegular3D.h"
39 #include "core/kernel/WKernel.h"
43 m_strategy(
"Dataset Creators",
"Select one of the dataset creators and configure it to your needs.", NULL,
44 "Creator",
"A list of all known creators." )
66 return WMDataCreatorVector_xpm;
71 return "Data Creator Vector";
76 return "Allows the user to create vector data sets on a regular grid by providing a bunch of data creation schemes.";
105 m_size =
m_properties->addProperty(
"Size",
"The size of the dataset along the X,Y, and Z axis in the OpenWalnut coordinate system.",
147 debugLog() <<
"Created dataset with " << grid->size() <<
" voxels.";
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.
Creates random values inside a given grid.
Sets all voxels to the same vector.
This data set type contains vectors as values.
std::shared_ptr< WDataSetVector > SPtr
shared_ptr abbreviation
A grid that has parallelepiped cells which all have the same proportion.
std::shared_ptr< WGridRegular3DTemplate > SPtr
Convenience typedef for a std::shared_ptr< WGridRegular3DTemplate >.
WMDataCreatorVector()
Standard constructor.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
~WMDataCreatorVector()
Destructor.
virtual void connectors()
Initialize the connectors this module is using.
WPropInt m_nbVoxelsX
number of voxels in x direction
virtual void properties()
Initialize the properties for this module.
WPropPosition m_size
where to put the origin
WPropInt m_nbVoxelsY
number of voxels in y direction
virtual const std::string getDescription() const
Gives back a description of this module.
std::shared_ptr< WModuleOutputData< WDataSetVector > > m_output
The only output of this module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
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...
virtual const std::string getName() const
Gives back the name of this module.
WStrategyHelper< WObjectNDIP< WDataSetSingleCreatorInterface > > m_strategy
the strategy currently active.
virtual void moduleMain()
Entry point after loading the module.
WPropInt m_nbVoxelsZ
number of voxels in z direction
WPropPosition m_origin
where to put the origin
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.
std::shared_ptr< WObjectNDIP > SPtr
Shared ptr to an instance.
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.
std::shared_ptr< WValueSetBase > SPtr
Shared pointer to an instance of this class.