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

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

#include <WIntegrationParameterization.h>

+ Inheritance diagram for WIntegrationParameterization:
+ Collaboration diagram for WIntegrationParameterization:

Public Member Functions

 WIntegrationParameterization (std::shared_ptr< WGridRegular3D > grid)
 Default constructor. More...
 
virtual ~WIntegrationParameterization ()
 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...
 
- Public Member Functions inherited from WRasterParameterization
 WRasterParameterization (std::shared_ptr< WGridRegular3D > grid)
 Default constructor. More...
 
virtual ~WRasterParameterization ()
 Destructor. More...
 
virtual void finished ()
 This method gets called whenever all lines got rasterized. More...
 

Protected Attributes

std::vector< double > m_lengthValues
 Stores the current length of the fiber at each voxel. More...
 
double m_curLength
 The current length of a line. 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 WIntegrationParameterization.h.

Constructor & Destructor Documentation

◆ WIntegrationParameterization()

WIntegrationParameterization::WIntegrationParameterization ( std::shared_ptr< WGridRegular3D grid)
explicit

Default constructor.

Parameters
gridthe grid used for the new dataset.

Definition at line 31 of file WIntegrationParameterization.cpp.

◆ ~WIntegrationParameterization()

WIntegrationParameterization::~WIntegrationParameterization ( )
virtual

Destructor.

Definition at line 39 of file WIntegrationParameterization.cpp.

Member Function Documentation

◆ getDataSet()

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

Gets the dataset representing the parameterization.

Returns
the dataset.

Implements WRasterParameterization.

Definition at line 44 of file WIntegrationParameterization.cpp.

References m_lengthValues.

◆ newLine()

void WIntegrationParameterization::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 110 of file WIntegrationParameterization.cpp.

References m_curLength.

◆ newSegment()

void WIntegrationParameterization::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 116 of file WIntegrationParameterization.cpp.

References m_curLength.

◆ parameterizeVoxel()

void WIntegrationParameterization::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 73 of file WIntegrationParameterization.cpp.

References m_curLength, WRasterParameterization::m_grid, and m_lengthValues.

Member Data Documentation

◆ m_curLength

double WIntegrationParameterization::m_curLength
protected

The current length of a line.

Definition at line 97 of file WIntegrationParameterization.h.

Referenced by newLine(), newSegment(), and parameterizeVoxel().

◆ m_lengthValues

std::vector< double > WIntegrationParameterization::m_lengthValues
protected

Stores the current length of the fiber at each voxel.

Definition at line 92 of file WIntegrationParameterization.h.

Referenced by getDataSet(), and parameterizeVoxel().


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