31 #include "WMReadMesh.h"
32 #include "WMReadMesh.xpm"
33 #include "WMeshReaderBrainVISA.h"
34 #include "WMeshReaderDIP.h"
35 #include "WMeshReaderFiberNavigator.h"
36 #include "WMeshReaderFreesurfer.h"
37 #include "WMeshReaderOBJ.h"
38 #include "WMeshReaderVTK.h"
39 #include "core/common/WIOTools.h"
40 #include "core/common/WPathHelper.h"
41 #include "core/common/WPropertyHelper.h"
42 #include "core/common/WStringUtils.h"
43 #include "core/graphicsEngine/WTriangleMesh.h"
44 #include "core/kernel/WKernel.h"
49 WMReadMesh::WMReadMesh():
51 m_strategy(
"Mesh Type",
"Select one of the mesh types and configure it to your needs.", NULL,
52 "Loader",
"A list of all known mesh loader." )
63 WMReadMesh::~WMReadMesh()
72 return std::shared_ptr< WModule >(
new WMReadMesh() );
77 return WMReadMesh_xpm;
89 return "Loads a triangle mesh from several types of files.";
94 m_output = std::shared_ptr< WModuleOutputData< WTriangleMesh > >(
118 m_nbVertices->setMax( std::numeric_limits< int >::max() );
virtual void wait() const
Wait for the condition.
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.
This module reads a file containing mesh data (several formats supported) and creates a mesh (or tria...
virtual void connectors()
Initialize the connectors this module is using.
WPropTrigger m_readTriggerProp
This property triggers the actual reading,.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
virtual void properties()
Initialize the properties for this 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...
WPropFilename m_meshFile
The mesh will be read from this file.
std::shared_ptr< WTriangleMesh > m_triMesh
This triangle mesh is provided as output through the connector.
virtual const std::string getDescription() const
Gives back a description of this module.
WStrategyHelper< WObjectNDIP< WMeshReaderInterface > > m_strategy
Handle each loader as strategy.
WPropInt m_nbVertices
Info-property showing the number of vertices in the mesh.
virtual void moduleMain()
Entry point after loading the module.
WPropInt m_nbTriangles
Info-property showing the number of triangles in the mesh.
virtual const std::string getName() const
Gives back the name of this module.
std::shared_ptr< WModuleOutputData< WTriangleMesh > > m_output
Output connector provided by this module.
Load FiberNavigator meshes.
Class offering an instantiate-able data connection between modules.
Class representing a single module of OpenWalnut.
virtual void properties()
Initialize properties in this function.
void removeConnectors()
Removes all connectors properly.
void addConnector(std::shared_ptr< WModuleInputConnector > con)
Adds the specified connector to the list of inputs.
std::shared_ptr< WProperties > m_properties
The property object for the module.
std::shared_ptr< WProperties > m_infoProperties
The property object for the module containing only module whose purpose is "PV_PURPOSE_INFORMNATION".
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.
static boost::filesystem::path getAppPath()
The path where the binary file resides in.
WProperties::SPtr getProperties() const
Get this strategy selectors properties.
WBoolFlag m_shutdownFlag
Condition getting fired whenever the thread should quit.
@ PV_TRIGGER_READY
Trigger property: is ready to be triggered (again)
void addTo(WPropFilename prop)
Add the PC_PATHEXISTS constraint to the property.