OpenWalnut
1.5.0dev
|
Stores the direction if a line in a separate dataset for each voxel. More...
#include <WCenterlineParameterization.h>
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< WDataSetScalar > | getDataSet () |
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< WFiber > | m_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< WGridRegular3D > | m_grid |
The grid, which needs to be used for the created dataset and to which the parameterizeVoxel method is relating to. More... | |
Stores the direction if a line in a separate dataset for each voxel.
Definition at line 37 of file WCenterlineParameterization.h.
WCenterlineParameterization::WCenterlineParameterization | ( | std::shared_ptr< WGridRegular3D > | grid, |
std::shared_ptr< WFiber > | centerline | ||
) |
Default constructor.
grid | the grid used for the new dataset. |
centerline | the centerline of the cluster |
Definition at line 33 of file WCenterlineParameterization.cpp.
|
virtual |
Destructor.
Definition at line 45 of file WCenterlineParameterization.cpp.
|
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.
|
virtual |
Gets the dataset representing the parameterization.
Implements WRasterParameterization.
Definition at line 50 of file WCenterlineParameterization.cpp.
References m_paramFinalValues.
|
virtual |
Gets called for each new line getting rasterized.
Here, it is used to reset the internal length integrator
line | the new line. |
Reimplemented from WRasterParameterization.
Definition at line 149 of file WCenterlineParameterization.cpp.
References WRasterParameterization::newLine().
|
virtual |
Gets called for each new line segment getting rasterized, as one segment can have multiple voxels.
start | start point of the new line segment |
end | end 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().
|
virtual |
This method allows this parameterization to update.
It gets called for every voxel which is rasterized by the WRasterAlgorithm.
voxel | the voxel to parameterize |
voxelIdx | the voxel index in the common grid calculated using "voxel" (this is for convenience) |
axis | Along which axis the traversal takes place. Since when walking in e.g. X-direction there are not supporting voxels in the |
value | the new voxel value |
start | Start point of the line segment (used to computed the distance) |
end | End 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.
|
protected |
The centerline of the cluster.
Definition at line 113 of file WCenterlineParameterization.h.
Referenced by newSegment().
|
protected |
The current end parameter for the current segment.
Definition at line 123 of file WCenterlineParameterization.h.
Referenced by newSegment().
|
protected |
The current start parameter for the current segment.
Definition at line 118 of file WCenterlineParameterization.h.
Referenced by newSegment(), and parameterizeVoxel().
|
protected |
The values with applied selective dilatation.
Definition at line 103 of file WCenterlineParameterization.h.
Referenced by finished(), and getDataSet().
|
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().
|
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().