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

Test the WThreadedTrackingFunction class. More...

#include <WThreadedTrackingFunction_test.h>

+ Inheritance diagram for WThreadedTrackingFunctionTest:
+ Collaboration diagram for WThreadedTrackingFunctionTest:

Public Member Functions

void testIndexInitialization ()
 Test if everything gets initialized correctly. More...
 
void testIndexIncrement ()
 Test if indices (seed positions) iteration works. More...
 
void testIndexToJob ()
 Test if the right jobs get created from seeds. More...
 
void testInstantiation ()
 Test if everything gets initialized correctly. More...
 
void testGetJob ()
 Test if the correct amount of jobs gets created. More...
 
void testCompute ()
 Test if fibers with the right number of points get created. More...
 

Private Types

typedef WThreadedTrackingFunctionTest This
 a handy abbreviation More...
 

Private Member Functions

std::shared_ptr< WDataSetSinglebuildTestData (WVector3d data, int n)
 Build a test dataset. More...
 
WVector3d dirFunc (wtracking::WThreadedTrackingFunction::DataSetPtr, wtracking::WThreadedTrackingFunction::JobType const &j, WVector3d d)
 The direction computation function. More...
 
void fibVis (std::vector< WVector3d > const &)
 The fiber visitor. More...
 
void pntVis (WVector3d const &)
 The point visitor. More...
 

Private Attributes

WSharedObject< std::size_t > m_points
 the number of points found More...
 

Detailed Description

Test the WThreadedTrackingFunction class.

Definition at line 262 of file WThreadedTrackingFunction_test.h.

Member Typedef Documentation

◆ This

a handy abbreviation

Definition at line 265 of file WThreadedTrackingFunction_test.h.

Member Function Documentation

◆ buildTestData()

std::shared_ptr< WDataSetSingle > WThreadedTrackingFunctionTest::buildTestData ( WVector3d  data,
int  n 
)
inlineprivate

Build a test dataset.

Parameters
dataThe vector for every voxel.
nThe number of grid position in every direction.
Returns
The dataset.

Definition at line 601 of file WThreadedTrackingFunction_test.h.

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

Referenced by testCompute(), testGetJob(), testIndexIncrement(), testIndexInitialization(), testIndexToJob(), and testInstantiation().

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

◆ dirFunc()

WVector3d WThreadedTrackingFunctionTest::dirFunc ( wtracking::WThreadedTrackingFunction::DataSetPtr  ,
wtracking::WThreadedTrackingFunction::JobType const &  j,
WVector3d  d 
)
inlineprivate

The direction computation function.

Simply returns the parameter vector.

Parameters
jThe current job.
dThe direction to return.
Returns
d

Definition at line 649 of file WThreadedTrackingFunction_test.h.

Referenced by testCompute(), testGetJob(), and testInstantiation().

+ Here is the caller graph for this function:

◆ fibVis()

void WThreadedTrackingFunctionTest::fibVis ( std::vector< WVector3d > const &  )
inlineprivate

The fiber visitor.

Does nothing.

Definition at line 666 of file WThreadedTrackingFunction_test.h.

Referenced by testCompute(), testGetJob(), and testInstantiation().

+ Here is the caller graph for this function:

◆ pntVis()

void WThreadedTrackingFunctionTest::pntVis ( WVector3d const &  )
inlineprivate

The point visitor.

Counts the number of points found.

Definition at line 673 of file WThreadedTrackingFunction_test.h.

References WSharedObject< T >::getWriteTicket(), and m_points.

Referenced by testCompute(), testGetJob(), and testInstantiation().

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

◆ testCompute()

void WThreadedTrackingFunctionTest::testCompute ( )
inline

◆ testGetJob()

void WThreadedTrackingFunctionTest::testGetJob ( )
inline

Test if the correct amount of jobs gets created.

Definition at line 523 of file WThreadedTrackingFunction_test.h.

References buildTestData(), dirFunc(), fibVis(), wtracking::WTrackingUtility::followToNextVoxel(), wtracking::WThreadedTrackingFunction::getJob(), and pntVis().

+ Here is the call graph for this function:

◆ testIndexIncrement()

void WThreadedTrackingFunctionTest::testIndexIncrement ( )
inline

Test if indices (seed positions) iteration works.

Definition at line 347 of file WThreadedTrackingFunction_test.h.

References buildTestData(), and wtracking::WThreadedTrackingFunction::IndexType::done().

+ Here is the call graph for this function:

◆ testIndexInitialization()

void WThreadedTrackingFunctionTest::testIndexInitialization ( )
inline

◆ testIndexToJob()

void WThreadedTrackingFunctionTest::testIndexToJob ( )
inline

Test if the right jobs get created from seeds.

Definition at line 414 of file WThreadedTrackingFunction_test.h.

References buildTestData(), and wtracking::WThreadedTrackingFunction::IndexType::job().

+ Here is the call graph for this function:

◆ testInstantiation()

void WThreadedTrackingFunctionTest::testInstantiation ( )
inline

Test if everything gets initialized correctly.

Definition at line 499 of file WThreadedTrackingFunction_test.h.

References buildTestData(), dirFunc(), fibVis(), wtracking::WTrackingUtility::followToNextVoxel(), and pntVis().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_points

WSharedObject< std::size_t > WThreadedTrackingFunctionTest::m_points
private

the number of points found

Definition at line 679 of file WThreadedTrackingFunction_test.h.

Referenced by pntVis(), and testCompute().


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