OpenWalnut
1.5.0dev
|
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 More... | |
typedef WDataSetSingle | DataSetType |
the dataset type More... | |
typedef std::shared_ptr< DataSetType const > | DataSetPtr |
a pointer to a dataset More... | |
typedef boost::function< WVector3d(DataSetPtr, JobType const &) > | DirFunc |
a function that calculates a direction to continue tracking More... | |
typedef std::shared_ptr< WGridRegular3D > | Grid3DPtr |
a pointer to a regular 3d grid More... | |
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. More... | |
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. More... | |
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. More... | |
A class that provides untility functions and typedefs for tracking algorithms.
Definition at line 60 of file WThreadedTrackingFunction.h.
typedef std::shared_ptr< DataSetType const > wtracking::WTrackingUtility::DataSetPtr |
a pointer to a dataset
Definition at line 70 of file WThreadedTrackingFunction.h.
the dataset type
Definition at line 67 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 73 of file WThreadedTrackingFunction.h.
typedef std::shared_ptr< WGridRegular3D > wtracking::WTrackingUtility::Grid3DPtr |
a pointer to a regular 3d grid
Definition at line 77 of file WThreadedTrackingFunction.h.
typedef std::pair< WVector3d, WVector3d > wtracking::WTrackingUtility::JobType |
define a job type for tracking algorithms
Definition at line 64 of file WThreadedTrackingFunction.h.
|
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 WMDeterministicFTMori::resetTracking(), WThreadedTrackingFunctionTest::testCompute(), WTrackingUtilityTest::testFollowToNextVoxel(), WThreadedTrackingFunctionTest::testGetJob(), and WThreadedTrackingFunctionTest::testInstantiation().
|
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().
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().