OpenWalnut  1.5.0dev
Public Member Functions | Private Types | Private Member Functions | List of all members
WTrackingUtilityTest Class Reference

Test the utility functions for tracking. More...

#include <WThreadedTrackingFunction_test.h>

+ Inheritance diagram for WTrackingUtilityTest:
+ Collaboration diagram for WTrackingUtilityTest:

Public Member Functions

void setUp ()
 Setup logger and other stuff for each test. More...
 
void testBoundary ()
 Test if positions with a distance less then TRACKING_EPS from a boundary are determined correctly by onBoundary(). More...
 
void testGetDistanceToBoundary ()
 Check if getDistanceToBoundary() returns the correct distance. More...
 
void testFollowToNextVoxel ()
 Test if followToNextVoxel() returns a valid (inside the grid) position in the next voxel (and not on any boundary). More...
 

Private Types

typedef WTrackingUtilityTest This
 an abbreviation More...
 

Private Member Functions

WVector3d simpleDirFunc (wtracking::WTrackingUtility::DataSetPtr, wtracking::WTrackingUtility::JobType const &)
 A simple direction calculation function. More...
 
std::shared_ptr< WDataSetSinglebuildTestData (WVector3d data)
 Build a test dataset. More...
 

Detailed Description

Test the utility functions for tracking.

Definition at line 41 of file WThreadedTrackingFunction_test.h.

Member Typedef Documentation

◆ This

an abbreviation

Definition at line 44 of file WThreadedTrackingFunction_test.h.

Member Function Documentation

◆ buildTestData()

std::shared_ptr< WDataSetSingle > WTrackingUtilityTest::buildTestData ( WVector3d  data)
inlineprivate

Build a test dataset.

Parameters
dataThe vector for every voxel.
Returns
the test dataset

Definition at line 214 of file WThreadedTrackingFunction_test.h.

References WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::at(), and WMatrix< T >::makeIdentity().

Referenced by testBoundary(), testFollowToNextVoxel(), and testGetDistanceToBoundary().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUp()

void WTrackingUtilityTest::setUp ( )
inline

Setup logger and other stuff for each test.

Definition at line 50 of file WThreadedTrackingFunction_test.h.

References WLogger::startup().

+ Here is the call graph for this function:

◆ simpleDirFunc()

WVector3d WTrackingUtilityTest::simpleDirFunc ( wtracking::WTrackingUtility::DataSetPtr  ,
wtracking::WTrackingUtility::JobType const &   
)
inlineprivate

A simple direction calculation function.

Returns
A direction.

Definition at line 200 of file WThreadedTrackingFunction_test.h.

Referenced by testFollowToNextVoxel().

+ Here is the caller graph for this function:

◆ testBoundary()

void WTrackingUtilityTest::testBoundary ( )
inline

Test if positions with a distance less then TRACKING_EPS from a boundary are determined correctly by onBoundary().

Definition at line 59 of file WThreadedTrackingFunction_test.h.

References buildTestData(), and wtracking::WTrackingUtility::onBoundary().

+ Here is the call graph for this function:

◆ testFollowToNextVoxel()

void WTrackingUtilityTest::testFollowToNextVoxel ( )
inline

Test if followToNextVoxel() returns a valid (inside the grid) position in the next voxel (and not on any boundary).

Definition at line 163 of file WThreadedTrackingFunction_test.h.

References buildTestData(), wlimits::FLT_EPS, wtracking::WTrackingUtility::followToNextVoxel(), wtracking::WTrackingUtility::onBoundary(), and simpleDirFunc().

+ Here is the call graph for this function:

◆ testGetDistanceToBoundary()

void WTrackingUtilityTest::testGetDistanceToBoundary ( )
inline

Check if getDistanceToBoundary() returns the correct distance.

Definition at line 125 of file WThreadedTrackingFunction_test.h.

References buildTestData(), wtracking::WTrackingUtility::getDistanceToBoundary(), and wtracking::WTrackingUtility::onBoundary().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: