25 #ifndef WMREADAMIRAMESH_H
26 #define WMREADAMIRAMESH_H
35 #include "core/dataHandler/WDataSetFibers.h"
36 #include "core/kernel/WModule.h"
37 #include "core/kernel/WModuleInputData.h"
38 #include "core/kernel/WModuleOutputData.h"
67 virtual const std::string
getName()
const;
81 virtual std::shared_ptr< WModule >
factory()
const;
128 void findAndReadVertices( std::string startLabel,
size_t numVertices, std::string fileName );
170 std::vector< std::pair< size_t, size_t > >
m_edges;
174 std::shared_ptr< WModuleOutputData< WDataSetFibers > >
m_output;
Reader for amiraMesh (.am) files.
std::vector< size_t > m_numEdgePoints
Number "points" per edge.
void findAndReadNumEdgePoints(std::string startLabel, size_t numEdges, std::string fileName)
Function for reading number of edgepoints per edge.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropFilename m_dataFile
The data will be read from this file.
std::vector< WPosition > m_vertices
vertices of the spatial graph
std::shared_ptr< WDataSetFibers > m_graph
The resulting fiber dataset respresenting the spatial graph.
std::vector< WPosition > m_edgePoints
The positions of the points building the edges between the vertices.
virtual ~WMReadAmiraMesh()
Destructor for cleaning up resources.
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.
virtual void moduleMain()
Entry point after loading the module.
bool readAmiraMesh(std::string fileName)
Very prelimiary and specialized way of reading a spatial graph from an amira mesh.
friend class WMReadAmiraMeshTest
Only UnitTests may be friends.
virtual void requirements()
Initialize requirements for this module.
void findAndReadEdgeConnectivity(std::string startLabel, size_t numConnections, std::string fileName)
Function for reading connectivity of edges.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
void prepareResult()
This function prepares the resulting dataset for being provided at the connector by construting it fr...
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
std::vector< std::pair< size_t, size_t > > m_edges
Edge connectivity of the spatial graph.
virtual void properties()
Initialize the properties for this module.
WMReadAmiraMesh()
Standard constructor.
virtual void connectors()
Initialize the connectors this module is using.
std::shared_ptr< WModuleOutputData< WDataSetFibers > > m_output
The only output of this data module.
void findAndReadEdgePoints(std::string startLabel, size_t numPoints, std::string fileName)
Function for reading edgepoints.
void findAndReadVertices(std::string startLabel, size_t numVertices, std::string fileName)
Function for reading coordinates of vertices.
Class representing a single module of OpenWalnut.