26 #include <shared_mutex>
30 #include "WRasterAlgorithm.h"
31 #include "core/common/WLogger.h"
32 #include "core/common/math/linearAlgebra/WVectorFixed.h"
33 #include "core/dataHandler/WDataSetScalar.h"
34 #include "core/dataHandler/WGridRegular3D.h"
38 m_values( grid->size(), 0.0 )
53 std::shared_ptr< std::vector< double > >(
54 new std::vector< double >(
m_values ) ),
98 boost::shared_lock< std::shared_mutex > lock = boost::shared_lock< std::shared_mutex >(
m_parameterizationsLock );
This data set type contains scalars as values.
A line is an ordered sequence of WPositions.
A fixed size matrix class.
This only is a 3d double vector.
std::shared_ptr< WDataSetScalar > generateDataSet() const
Computes a dataset out of our voxel values and the previously given grid.
void addParameterizationAlgorithm(std::shared_ptr< WRasterParameterization > algorithm)
This method allows the user of the raster algorithm to add arbitrary parameterizations.
std::shared_ptr< WGridRegular3D > m_grid
The grid is used for the following purposes:
std::vector< std::shared_ptr< WRasterParameterization > > m_parameterizations
All the parameterization algorithms to apply while rasterizing a line.
virtual void finished()
Called whenever all lines have been rasterized.
virtual void parameterizeVoxel(const WVector3i &voxel, size_t voxelIdx, const int axis, const double value, const WPosition &start, const WPosition &end)
This method allows all registered parameterization algorithms to update.
WRasterAlgorithm(std::shared_ptr< WGridRegular3D > grid)
Creates new raster algorithm within the given grid.
std::shared_mutex m_parameterizationsLock
The mutex used to lock access to m_parameterizations.
std::vector< double > m_values
Stores the value of each voxel.
virtual void newLine(const WLine &line)
Distribute a new line getting rasterized to all parameterize algorithms.
virtual void newSegment(const WPosition &start, const WPosition &end)
Distribute a new segment of a line to all parameterization algorithms.
virtual ~WRasterAlgorithm()
Dispose a this raster algorithm.
Base Class for all value set types.
WStreamedLogger debug(const std::string &source)
Logging a debug message.