OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | List of all members
WRasterParameterization Class Referenceabstract

This class is the base for all specific parameterization algorithms. More...

#include <WRasterParameterization.h>

+ Inheritance diagram for WRasterParameterization:
+ Collaboration diagram for WRasterParameterization:

Public Member Functions

 WRasterParameterization (std::shared_ptr< WGridRegular3D > grid)
 Default constructor. More...
 
virtual ~WRasterParameterization ()
 Destructor. More...
 
virtual void parameterizeVoxel (const WVector3i &voxel, size_t voxelIdx, const int axis, const double value, const WPosition &start, const WPosition &end)=0
 This method allows this parameterization to update. More...
 
virtual std::shared_ptr< WDataSetScalargetDataSet ()=0
 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 ()
 This method gets called whenever all lines got rasterized. More...
 

Protected Attributes

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

This class is the base for all specific parameterization algorithms.

Derive from it to write your own class, which is able to create a new dataset basing on the parameterization of several lines. This might be useful for datasets which contain the current fiber direction at a voxel, datasets integrating the length of fibers along a fiber or parameterizing the volume using the centerline.

Definition at line 41 of file WRasterParameterization.h.

Constructor & Destructor Documentation

◆ WRasterParameterization()

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

Default constructor.

It needs a grid as the parameterization volume HAS to be in the same grid.

Parameters
gridthe grid to use for parameterization.

Definition at line 29 of file WRasterParameterization.cpp.

◆ ~WRasterParameterization()

WRasterParameterization::~WRasterParameterization ( )
virtual

Destructor.

Definition at line 35 of file WRasterParameterization.cpp.

Member Function Documentation

◆ finished()

void WRasterParameterization::finished ( )
virtual

This method gets called whenever all lines got rasterized.

Reimplemented in WCenterlineParameterization.

Definition at line 52 of file WRasterParameterization.cpp.

◆ getDataSet()

virtual std::shared_ptr< WDataSetScalar > WRasterParameterization::getDataSet ( )
pure virtual

Gets the dataset representing the parameterization.

Returns
the dataset.

Implemented in WIntegrationParameterization, and WCenterlineParameterization.

◆ newLine()

void WRasterParameterization::newLine ( const WLine line)
virtual

Gets called for each new line getting rasterized.

Parameters
linethe new line.

Reimplemented in WIntegrationParameterization, and WCenterlineParameterization.

Definition at line 40 of file WRasterParameterization.cpp.

Referenced by WCenterlineParameterization::newLine().

+ Here is the caller graph for this function:

◆ newSegment()

void WRasterParameterization::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 in WIntegrationParameterization, and WCenterlineParameterization.

Definition at line 46 of file WRasterParameterization.cpp.

Referenced by WCenterlineParameterization::newSegment().

+ Here is the caller graph for this function:

◆ parameterizeVoxel()

virtual void WRasterParameterization::parameterizeVoxel ( const WVector3i voxel,
size_t  voxelIdx,
const int  axis,
const double  value,
const WPosition start,
const WPosition end 
)
pure 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)

Implemented in WIntegrationParameterization, and WCenterlineParameterization.

Member Data Documentation

◆ m_grid

std::shared_ptr< WGridRegular3D > WRasterParameterization::m_grid
protected

The grid, which needs to be used for the created dataset and to which the parameterizeVoxel method is relating to.

Definition at line 101 of file WRasterParameterization.h.

Referenced by WCenterlineParameterization::finished(), WCenterlineParameterization::parameterizeVoxel(), and WIntegrationParameterization::parameterizeVoxel().


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