25 #ifndef WRASTERALGORITHM_H
26 #define WRASTERALGORITHM_H
29 #include <shared_mutex>
32 #include <boost/thread.hpp>
34 #include "WRasterParameterization.h"
35 #include "core/common/math/WLine.h"
36 #include "core/common/math/linearAlgebra/WVectorFixed.h"
37 #include "core/dataHandler/WDataSetScalar.h"
38 #include "core/dataHandler/WGridRegular3D.h"
111 std::shared_ptr< WGridRegular3D >
m_grid;
A line is an ordered sequence of WPositions.
A fixed size matrix class.
This only is a 3d double vector.
Base class for all rasterization algorithms.
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.
virtual void raster(const WLine &line)=0
Rasterize the given line into the grid of dataset.