28 #include "WIntegrationParameterization.h"
29 #include "core/common/math/linearAlgebra/WVectorFixed.h"
33 m_lengthValues( grid->size(), 0.0 ),
48 std::shared_ptr< std::vector< double > >(
56 size_t index(
int x,
int y,
int z, std::shared_ptr< WGridRegular3D > grid )
62 x = x >=
static_cast< int >( grid->getNbCoordsX() ) ?
static_cast< int >( grid->getNbCoordsX() ) - 1 : x;
63 y = y >=
static_cast< int >( grid->getNbCoordsY() ) ?
static_cast< int >( grid->getNbCoordsY() ) - 1 : y;
64 z = z >=
static_cast< int >( grid->getNbCoordsZ() ) ?
static_cast< int >( grid->getNbCoordsZ() ) - 1 : z;
67 size_t nbX = grid->getNbCoordsX();
68 size_t nbXY = grid->getNbCoordsX() * grid->getNbCoordsY();
69 return x + y * nbX + z * nbXY;
This data set type contains scalars as values.
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.
double m_curLength
The current length of a line.
std::vector< double > m_lengthValues
Stores the current length of the fiber at each voxel.
WIntegrationParameterization(std::shared_ptr< WGridRegular3D > grid)
Default constructor.
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.
virtual ~WIntegrationParameterization()
Destructor.
virtual std::shared_ptr< WDataSetScalar > getDataSet()
Gets the dataset representing the parameterization.
virtual void newLine(const WLine &line)
Gets called for each new line getting rasterized.
A line is an ordered sequence of WPositions.
A fixed size matrix class.
This only is a 3d double vector.
This class is the base for all specific parameterization algorithms.
std::shared_ptr< WGridRegular3D > m_grid
The grid, which needs to be used for the created dataset and to which the parameterizeVoxel method is...
Base Class for all value set types.