OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | List of all members
WCenterlineParameterization Class Reference

Stores the direction if a line in a separate dataset for each voxel. More...

#include <WCenterlineParameterization.h>

+ Inheritance diagram for WCenterlineParameterization:
+ Collaboration diagram for WCenterlineParameterization:

Public Member Functions

 WCenterlineParameterization (std::shared_ptr< WGridRegular3D > grid, std::shared_ptr< WFiber > centerline)
 Default constructor. More...
 
virtual ~WCenterlineParameterization ()
 Destructor. More...
 
virtual void parameterizeVoxel (const WVector3i &voxel, size_t voxelIdx, const int axis, const double value, const WPosition &start, const WPosition &end)
 This method allows this parameterization to update. More...
 
virtual std::shared_ptr< WDataSetScalargetDataSet ()
 Gets the dataset representing the parameterization. More...
 
virtual void newLine (const WLine &line)
 Gets called for each new line getting rasterized. More...
 
virtual void newSegment (const WPosition &start, const WPosition &end)
 Gets called for each new line segment getting rasterized, as one segment can have multiple voxels. More...
 
virtual void finished ()
 Gets called whenever all lines have been rasterized. More...
 
- Public Member Functions inherited from WRasterParameterization
 WRasterParameterization (std::shared_ptr< WGridRegular3D > grid)
 Default constructor. More...
 
virtual ~WRasterParameterization ()
 Destructor. More...
 

Protected Attributes

std::vector< double > m_paramValues
 Stores the current length of the centerline fiber at each voxel. More...
 
std::vector< double > m_paramFinalValues
 The values with applied selective dilatation. More...
 
std::vector< bool > m_paramSetValues
 Stores whether the voxel has been set in the past or not. More...
 
std::shared_ptr< WFiberm_centerline
 The centerline of the cluster. More...
 
double m_currentStartParameter
 The current start parameter for the current segment. More...
 
double m_currentEndParameter
 The current end parameter for the current segment. More...
 
- Protected Attributes inherited from WRasterParameterization
std::shared_ptr< WGridRegular3Dm_grid
 The grid, which needs to be used for the created dataset and to which the parameterizeVoxel method is relating to. More...
 

Detailed Description

Stores the direction if a line in a separate dataset for each voxel.

Definition at line 37 of file WCenterlineParameterization.h.

Constructor & Destructor Documentation

◆ WCenterlineParameterization()

WCenterlineParameterization::WCenterlineParameterization ( std::shared_ptr< WGridRegular3D grid,
std::shared_ptr< WFiber centerline 
)

Default constructor.

Parameters
gridthe grid used for the new dataset.
centerlinethe centerline of the cluster

Definition at line 33 of file WCenterlineParameterization.cpp.

◆ ~WCenterlineParameterization()

WCenterlineParameterization::~WCenterlineParameterization ( )
virtual

Destructor.

Definition at line 45 of file WCenterlineParameterization.cpp.

Member Function Documentation

◆ finished()

void WCenterlineParameterization::finished ( )
virtual

Gets called whenever all lines have been rasterized.

Reimplemented from WRasterParameterization.

Definition at line 188 of file WCenterlineParameterization.cpp.

References wcp::Neighbourhood::indices, WRasterParameterization::m_grid, m_paramFinalValues, m_paramSetValues, and m_paramValues.

◆ getDataSet()

std::shared_ptr< WDataSetScalar > WCenterlineParameterization::getDataSet ( )
virtual

Gets the dataset representing the parameterization.

Returns
the dataset.

Implements WRasterParameterization.

Definition at line 50 of file WCenterlineParameterization.cpp.

References m_paramFinalValues.

◆ newLine()

void WCenterlineParameterization::newLine ( const WLine line)
virtual

Gets called for each new line getting rasterized.

Here, it is used to reset the internal length integrator

Parameters
linethe new line.

Reimplemented from WRasterParameterization.

Definition at line 149 of file WCenterlineParameterization.cpp.

References WRasterParameterization::newLine().

+ Here is the call graph for this function:

◆ newSegment()

void WCenterlineParameterization::newSegment ( const WPosition start,
const WPosition end 
)
virtual

Gets called for each new line segment getting rasterized, as one segment can have multiple voxels.

Parameters
startstart point of the new line segment
endend point of the new line segment

Reimplemented from WRasterParameterization.

Definition at line 155 of file WCenterlineParameterization.cpp.

References m_centerline, m_currentEndParameter, m_currentStartParameter, and WRasterParameterization::newSegment().

+ Here is the call graph for this function:

◆ parameterizeVoxel()

void WCenterlineParameterization::parameterizeVoxel ( const WVector3i voxel,
size_t  voxelIdx,
const int  axis,
const double  value,
const WPosition start,
const WPosition end 
)
virtual

This method allows this parameterization to update.

It gets called for every voxel which is rasterized by the WRasterAlgorithm.

Parameters
voxelthe voxel to parameterize
voxelIdxthe voxel index in the common grid calculated using "voxel" (this is for convenience)
axisAlong which axis the traversal takes place. Since when walking in e.g. X-direction there are not supporting voxels in the
valuethe new voxel value
startStart point of the line segment (used to computed the distance)
endEnd point of the line segment (used to computed the distance)

Implements WRasterParameterization.

Definition at line 124 of file WCenterlineParameterization.cpp.

References wcp::Neighbourhood::indices, m_currentStartParameter, WRasterParameterization::m_grid, m_paramSetValues, and m_paramValues.

Member Data Documentation

◆ m_centerline

std::shared_ptr< WFiber > WCenterlineParameterization::m_centerline
protected

The centerline of the cluster.

Definition at line 113 of file WCenterlineParameterization.h.

Referenced by newSegment().

◆ m_currentEndParameter

double WCenterlineParameterization::m_currentEndParameter
protected

The current end parameter for the current segment.

Definition at line 123 of file WCenterlineParameterization.h.

Referenced by newSegment().

◆ m_currentStartParameter

double WCenterlineParameterization::m_currentStartParameter
protected

The current start parameter for the current segment.

Definition at line 118 of file WCenterlineParameterization.h.

Referenced by newSegment(), and parameterizeVoxel().

◆ m_paramFinalValues

std::vector< double > WCenterlineParameterization::m_paramFinalValues
protected

The values with applied selective dilatation.

Definition at line 103 of file WCenterlineParameterization.h.

Referenced by finished(), and getDataSet().

◆ m_paramSetValues

std::vector< bool > WCenterlineParameterization::m_paramSetValues
protected

Stores whether the voxel has been set in the past or not.

Definition at line 108 of file WCenterlineParameterization.h.

Referenced by finished(), and parameterizeVoxel().

◆ m_paramValues

std::vector< double > WCenterlineParameterization::m_paramValues
protected

Stores the current length of the centerline fiber at each voxel.

Definition at line 98 of file WCenterlineParameterization.h.

Referenced by finished(), and parameterizeVoxel().


The documentation for this class was generated from the following files: