30 #include <core/common/WPropertyHelper.h>
31 #include <core/common/WStrategyHelper.h>
32 #include <core/common/math/WMath.h>
33 #include <core/dataHandler/WDataHandler.h>
34 #include <core/kernel/WKernel.h>
36 #include "WMFiberResampling.h"
37 #include "WMFiberResampling.xpm"
38 #include "WResampleByMaxPoints.h"
39 #include "WResampleByNumPoints.h"
40 #include "WResampleBySegLength.h"
41 #include "WResampleBySegLengthKeepShortFibers.h"
47 m_strategy( "Fiber Resampling Algorithms", "Select one algorithm to resample fibers", NULL,
48 "FiberResampling", "A list of all known resampling strategies" )
67 return WMFiberResampling_xpm;
72 return "Fiber Re-Sampling";
77 return "This module can re-sample a fiber dataset and ensure equal segment lengths.";
126 debugLog() <<
"Finished resampling";
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.
std::shared_ptr< WDataSetFibers > SPtr
Pointer to dataset.
This modules takes a fiber dataset and samples it in regular steps.
std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_fiberOC
The output connector used to provide the calculated data to other modules.
WStrategyHelper< WObjectNDIP< WResampling_I > > m_strategy
Strategies for coloring fibers.
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...
WMFiberResampling()
Default constructor.
virtual ~WMFiberResampling()
Destructor.
std::shared_ptr< WModuleInputData< WDataSetFibers > > m_fiberIC
The fiber dataset which is going to be filtered.
virtual const std::string getName() const
Gives back the name of this module.
virtual void connectors()
Initialize the connectors this module is using.
virtual const std::string getDescription() const
Gives back a description of this module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void moduleMain()
Entry point after loading the module.
virtual void properties()
Initialize the properties for this module.
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.
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.
Class managing progress inside of modules.
std::shared_ptr< WProgress > SPtr
Shared pointer on a WProgress.
Resamples fibers so no fiber has more than the given number of Points.
Resamples fibers to have a given number of points afterwards.
Resamples fibers by segment length.
Resamples fibers by segment length.
WProperties::SPtr getProperties() const
Get this strategy selectors properties.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.