|
OpenWalnut
1.2.5
|
Test the WThreadedTrackingFunction class. More...
#include <WThreadedTrackingFunction_test.h>
Inheritance diagram for WThreadedTrackingFunctionTest:Public Member Functions | |
| void | testIndexInitialization () |
| Test if everything gets initialized correctly. | |
| void | testIndexIncrement () |
| Test if indices (seed positions) iteration works. | |
| void | testIndexToJob () |
| Test if the right jobs get created from seeds. | |
| void | testInstantiation () |
| Test if everything gets initialized correctly. | |
| void | testGetJob () |
| Test if the correct amount of jobs gets created. | |
| void | testCompute () |
| Test if fibers with the right number of points get created. | |
Private Types | |
| typedef WThreadedTrackingFunctionTest | This |
| a handy abbreviation | |
Private Member Functions | |
| boost::shared_ptr< WDataSetSingle > | buildTestData (WVector3d data, int n) |
| Build a test dataset. | |
| WVector3d | dirFunc (wtracking::WThreadedTrackingFunction::DataSetPtr, wtracking::WThreadedTrackingFunction::JobType const &j, WVector3d d) |
| The direction computation function. | |
| void | fibVis (std::vector< WVector3d > const &) |
| The fiber visitor. | |
| void | pntVis (WVector3d const &) |
| The point visitor. | |
Private Attributes | |
| WSharedObject< std::size_t > | m_points |
| the number of points found | |
Test the WThreadedTrackingFunction class.
Definition at line 259 of file WThreadedTrackingFunction_test.h.
|
private |
a handy abbreviation
Definition at line 262 of file WThreadedTrackingFunction_test.h.
|
inlineprivate |
Build a test dataset.
| data | The vector for every voxel. |
| n | The number of grid position in every direction. |
Definition at line 578 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().
|
inlineprivate |
The direction computation function.
Simply returns the parameter vector.
| j | The current job. |
| d | The direction to return. |
Definition at line 626 of file WThreadedTrackingFunction_test.h.
Referenced by testCompute(), testGetJob(), and testInstantiation().
|
inlineprivate |
The fiber visitor.
Does nothing.
Definition at line 643 of file WThreadedTrackingFunction_test.h.
Referenced by testCompute(), testGetJob(), and testInstantiation().
|
inlineprivate |
The point visitor.
Counts the number of points found.
Definition at line 650 of file WThreadedTrackingFunction_test.h.
References WSharedObject< T >::getWriteTicket(), and m_points.
Referenced by testCompute(), testGetJob(), and testInstantiation().
|
inline |
Test if fibers with the right number of points get created.
Definition at line 534 of file WThreadedTrackingFunction_test.h.
References buildTestData(), wtracking::WThreadedTrackingFunction::compute(), dirFunc(), fibVis(), wtracking::WTrackingUtility::followToNextVoxel(), wtracking::WThreadedTrackingFunction::getJob(), WSharedObject< T >::getReadTicket(), WSharedObject< T >::getWriteTicket(), m_points, and pntVis().
|
inline |
Test if the correct amount of jobs gets created.
Definition at line 513 of file WThreadedTrackingFunction_test.h.
References buildTestData(), dirFunc(), fibVis(), wtracking::WTrackingUtility::followToNextVoxel(), wtracking::WThreadedTrackingFunction::getJob(), and pntVis().
|
inline |
Test if indices (seed positions) iteration works.
Definition at line 344 of file WThreadedTrackingFunction_test.h.
References buildTestData(), and wtracking::WThreadedTrackingFunction::IndexType::done().
|
inline |
Test if everything gets initialized correctly.
Definition at line 268 of file WThreadedTrackingFunction_test.h.
References buildTestData(), wtracking::WThreadedTrackingFunction::IndexType::m_done, wtracking::WThreadedTrackingFunction::IndexType::m_max, wtracking::WThreadedTrackingFunction::IndexType::m_min, wtracking::WThreadedTrackingFunction::IndexType::m_offset, and wtracking::WThreadedTrackingFunction::IndexType::m_pos.
|
inline |
Test if the right jobs get created from seeds.
Definition at line 411 of file WThreadedTrackingFunction_test.h.
References buildTestData(), and wtracking::WThreadedTrackingFunction::IndexType::job().
|
inline |
Test if everything gets initialized correctly.
Definition at line 496 of file WThreadedTrackingFunction_test.h.
References buildTestData(), dirFunc(), fibVis(), wtracking::WTrackingUtility::followToNextVoxel(), and pntVis().
|
private |
the number of points found
Definition at line 656 of file WThreadedTrackingFunction_test.h.
Referenced by pntVis(), and testCompute().
1.8.1