OpenWalnut
1.4.0
|
A class that provides untility functions and typedefs for tracking algorithms. More...
#include <WThreadedTrackingFunction.h>
Public Types | |
typedef std::pair< WVector3d, WVector3d > | JobType |
define a job type for tracking algorithms | |
typedef WDataSetSingle | DataSetType |
the dataset type | |
typedef boost::shared_ptr < DataSetType const > | DataSetPtr |
a pointer to a dataset | |
typedef boost::function < WVector3d(DataSetPtr, JobType const &) > | DirFunc |
a function that calculates a direction to continue tracking | |
typedef boost::shared_ptr < WGridRegular3D > | Grid3DPtr |
a pointer to a regular 3d grid | |
Static Public Member Functions | |
static bool | followToNextVoxel (DataSetPtr dataset, JobType &job, DirFunc const &dirFunc) |
A function that follows a direction until leaving the current voxel. | |
static bool | onBoundary (Grid3DPtr grid, WVector3d const &pos) |
Check if a point is on the boundary of the given grid, where boundary means a distance less then TRACKING_EPS from any plane between voxels. | |
static double | getDistanceToBoundary (Grid3DPtr grid, WVector3d const &pos, WVector3d const &dir) |
Calculate the distance from a given position to the nearest voxel boundary on the ray from the position along the given direction. |
A class that provides untility functions and typedefs for tracking algorithms.
Definition at line 61 of file WThreadedTrackingFunction.h.
typedef boost::shared_ptr< DataSetType const > wtracking::WTrackingUtility::DataSetPtr |
a pointer to a dataset
Definition at line 71 of file WThreadedTrackingFunction.h.
the dataset type
Definition at line 68 of file WThreadedTrackingFunction.h.
typedef boost::function< WVector3d ( DataSetPtr, JobType const& ) > wtracking::WTrackingUtility::DirFunc |
a function that calculates a direction to continue tracking
Definition at line 74 of file WThreadedTrackingFunction.h.
typedef boost::shared_ptr< WGridRegular3D > wtracking::WTrackingUtility::Grid3DPtr |
a pointer to a regular 3d grid
Definition at line 78 of file WThreadedTrackingFunction.h.
typedef std::pair< WVector3d, WVector3d > wtracking::WTrackingUtility::JobType |
define a job type for tracking algorithms
Definition at line 65 of file WThreadedTrackingFunction.h.
bool wtracking::WTrackingUtility::followToNextVoxel | ( | DataSetPtr | dataset, |
JobType & | job, | ||
DirFunc const & | dirFunc | ||
) | [static] |
A function that follows a direction until leaving the current voxel.
dataset | A pointer to the input dataset. |
job | A pair of vectors, the position and the direction of the last integration. |
dirFunc | A function that computes the next direction. |
Definition at line 34 of file WThreadedTrackingFunction.cpp.
References getDistanceToBoundary(), wlimits::isInf(), wlimits::isNaN(), and onBoundary().
Referenced by WThreadedTrackingFunctionTest::testCompute(), WTrackingUtilityTest::testFollowToNextVoxel(), WThreadedTrackingFunctionTest::testGetJob(), and WThreadedTrackingFunctionTest::testInstantiation().
double wtracking::WTrackingUtility::getDistanceToBoundary | ( | Grid3DPtr | grid, |
WVector3d const & | pos, | ||
WVector3d const & | dir | ||
) | [static] |
Calculate the distance from a given position to the nearest voxel boundary on the ray from the position along the given direction.
grid | The grid. |
pos | The starting position of the ray. |
dir | The normalized direction of the ray. |
Definition at line 118 of file WThreadedTrackingFunction.cpp.
References onBoundary().
Referenced by followToNextVoxel(), and WTrackingUtilityTest::testGetDistanceToBoundary().
bool wtracking::WTrackingUtility::onBoundary | ( | Grid3DPtr | grid, |
WVector3d const & | pos | ||
) | [static] |
Check if a point is on the boundary of the given grid, where boundary means a distance less then TRACKING_EPS from any plane between voxels.
This does not check if the position is actually inside the grid.
grid | The grid. |
pos | The position to test. |
Definition at line 86 of file WThreadedTrackingFunction.cpp.
Referenced by followToNextVoxel(), getDistanceToBoundary(), WTrackingUtilityTest::testBoundary(), WTrackingUtilityTest::testFollowToNextVoxel(), and WTrackingUtilityTest::testGetDistanceToBoundary().