34 #include "core/kernel/WModule.h"
71 virtual const std::string
getName()
const;
87 virtual std::shared_ptr< WModule >
factory()
const;
118 std::shared_ptr< const WDataSetFibers > tracts,
119 std::shared_ptr< const WFiberCluster > cluster )
const;
134 osg::ref_ptr< osg::Node >
genDataSetGeode( std::shared_ptr< WDataSetScalar > dataset )
const;
143 void raster( std::shared_ptr< WRasterAlgorithm > algo, std::shared_ptr< const WDataSetFibers > tracts,
144 std::shared_ptr< const WFiberCluster > cluster )
const;
163 std::shared_ptr< WGridRegular3D >
constructGrid( std::shared_ptr< const WDataSetFibers > tracts,
164 std::shared_ptr< const WFiberCluster > cluster )
const;
178 std::shared_ptr< WFiber >
longestLine( std::shared_ptr< const WDataSetFibers > tracts,
179 std::shared_ptr< const WFiberCluster > cluster = std::shared_ptr< const WFiberCluster >() )
const;
193 std::shared_ptr< WFiber >
centerLine( std::shared_ptr< const WDataSetFibers > tracts,
194 std::shared_ptr< const WFiberCluster > cluster = std::shared_ptr< const WFiberCluster >() )
const;
200 std::shared_ptr< WModuleInputData< const WDataSetFibers > >
m_tractIC;
205 std::shared_ptr< WModuleInputData< const WFiberCluster > >
m_clusterIC;
216 std::shared_ptr< WModuleOutputData< WDataSetScalar > >
m_paramOC;
271 return std::string(
"Voxelizer" );
276 return std::string(
"Rasterize or voxelize a dataset with the given tracts." );
This is a modified version the Bresenham algorithm.
Represents a simple set of WFibers.
This data set type contains scalars as values.
Represents a cluster of indices of a WDataSetFiberVector.
This class adds some convenience methods to WGEGroupNode.
Traces a given set of deterministic tracts as given by a dataset of deterministic tracts (optionally ...
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...
void updateCenterLine()
Removes or inserts geode for the center line of the current cluster into this modules group node.
WPropBool m_antialiased
Enable/disable anti-aliased rasterization of voxels.
WPropBool m_colorMapping
add colormapping
WMVoxelizer()
Default Constructor.
WPropDouble m_voxelsPerUnit
The number of voxels per unit in the coordinate system.
WPropBool m_phongShading
Add lighting to the scene.
WPropSelection m_rasterAlgo
List for selecting the rasterization method.
void raster(std::shared_ptr< WRasterAlgorithm > algo, std::shared_ptr< const WDataSetFibers > tracts, std::shared_ptr< const WFiberCluster > cluster) const
Performs rasterization with the given algorithm on either all tracts or only a subset if given.
std::shared_ptr< WModuleInputData< const WFiberCluster > > m_clusterIC
Input connector for an optional selection of some fibers in the fiber dataset via a cluster.
WPropSelection m_parameterAlgo
The actually selected parameterization algorithm.
WBoundingBox createBoundingBox(const WFiberCluster &cluster) const
Creates two vertices describing the bounding box of a cluster.
std::shared_ptr< WFiber > longestLine(std::shared_ptr< const WDataSetFibers > tracts, std::shared_ptr< const WFiberCluster > cluster=std::shared_ptr< const WFiberCluster >()) const
Finds and returns a copy of the longest line (in term of #points) in the dataset, or in a subset of i...
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_paramOC
Output providing parameterization to other algorithms.
std::shared_ptr< WGridRegular3D > constructGrid(std::shared_ptr< const WDataSetFibers > tracts, std::shared_ptr< const WFiberCluster > cluster) const
Constructs a grid out of the current tract dataset or out of a subset (selection) of this dataset.
osg::ref_ptr< WGEManagedGroupNode > m_rootNode
OSG root node for this module.
std::shared_ptr< WItemSelection > m_paramAlgoSelections
The available parameterization algorithms.
osg::ref_ptr< osg::Node > genDataSetGeode(std::shared_ptr< WDataSetScalar > dataset) const
Builds an OSG geode where all voxels inside the dataSet which are not zero are drawn as cuboids.
virtual const std::string getName() const
Gives back the name of this module.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_voxelizedOC
Output connector for a voxelized cluster.
std::shared_ptr< const WDataSetFibers > m_tracts
Reference to the fiber dataset.
WPropBool m_renderingActive
Enable/disable rendering of voxels.
virtual ~WMVoxelizer()
Default Destructor.
virtual void properties()
Initialize the properties for this module.
std::shared_ptr< WCondition > m_fullUpdate
module is performing an expensive update
virtual void connectors()
Initialize the connectors this module is using.
virtual void moduleMain()
Entry point after loading the module.
std::shared_ptr< WFiber > centerLine(std::shared_ptr< const WDataSetFibers > tracts, std::shared_ptr< const WFiberCluster > cluster=std::shared_ptr< const WFiberCluster >()) const
Finds and returns a copy of the center line in the dataset, or in a subset of it specified by the giv...
friend class WMVoxelizerTest
Only UnitTests may be friends.
boost::array< std::shared_ptr< WDataSetScalar >, 2 > generateDatasets(std::shared_ptr< const WDataSetFibers > tracts, std::shared_ptr< const WFiberCluster > cluster) const
Generates a intensity dataset where each tract is rasterized into.
virtual const std::string getDescription() const
Gives back a description of this module.
std::shared_ptr< WModuleInputData< const WDataSetFibers > > m_tractIC
Input connector for a fiber dataset.
Class representing a single module of OpenWalnut.
Base class for all rasterization algorithms.