OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | Friends | List of all members
wtracking::WThreadedTrackingFunction::IndexType Class Reference

An index for seed positions. More...

+ Collaboration diagram for wtracking::WThreadedTrackingFunction::IndexType:

Public Member Functions

 IndexType ()
 Construct an invalid index. More...
 
 IndexType (GridPtr grid, std::vector< int > const &v0, std::vector< int > const &v1, std::size_t seedPositions, std::size_t seedsPerPosition)
 Construct an index. More...
 
IndexTypeoperator++ ()
 Increase the index by one, effectively generating the next seed position. More...
 
bool done ()
 Check if there aren't any more seed positions. More...
 
JobType job ()
 Create a job from this index. More...
 

Private Attributes

GridPtr m_grid
 a pointer to the grid More...
 
bool m_done
 true, iff there are no more seeds More...
 
boost::array< std::size_t, 4 > m_pos
 the position in the seed space More...
 
boost::array< std::size_t, 4 > m_min
 the minimum position in the seed space More...
 
boost::array< std::size_t, 4 > m_max
 the maximum position in the seed space More...
 
double m_offset
 the relative (to the size of a voxel) distance between seeds More...
 

Friends

class ::WThreadedTrackingFunctionTest
 Access for test class. More...
 

Detailed Description

An index for seed positions.

Definition at line 232 of file WThreadedTrackingFunction.h.

Constructor & Destructor Documentation

◆ IndexType() [1/2]

wtracking::WThreadedTrackingFunction::IndexType::IndexType ( )

Construct an invalid index.

Definition at line 274 of file WThreadedTrackingFunction.cpp.

◆ IndexType() [2/2]

wtracking::WThreadedTrackingFunction::IndexType::IndexType ( GridPtr  grid,
std::vector< int > const &  v0,
std::vector< int > const &  v1,
std::size_t  seedPositions,
std::size_t  seedsPerPosition 
)

Construct an index.

Parameters
gridThe grid.
v0A vector of starting voxel indices for every direction.
v1A vector of target voxel indices for every direction.
seedPositionsThe number of seed positions in every direction per voxel.
seedsPerPositionThe number of fibers startet from every seed position.

Definition at line 280 of file WThreadedTrackingFunction.cpp.

References m_grid, m_max, m_min, m_offset, and m_pos.

Member Function Documentation

◆ done()

bool wtracking::WThreadedTrackingFunction::IndexType::done ( )

Check if there aren't any more seed positions.

Returns
true, iff there aren't any more seed positions.

Definition at line 346 of file WThreadedTrackingFunction.cpp.

Referenced by WThreadedTrackingFunctionTest::testIndexIncrement().

+ Here is the caller graph for this function:

◆ job()

WThreadedTrackingFunction::JobType wtracking::WThreadedTrackingFunction::IndexType::job ( )

Create a job from this index.

Returns
The job that is the current position.

Definition at line 351 of file WThreadedTrackingFunction.cpp.

References wtracking::WThreadedTrackingFunction::m_grid.

Referenced by WThreadedTrackingFunctionTest::testIndexToJob().

+ Here is the caller graph for this function:

◆ operator++()

WThreadedTrackingFunction::IndexType & wtracking::WThreadedTrackingFunction::IndexType::operator++ ( )

Increase the index by one, effectively generating the next seed position.

Returns
*this

Definition at line 325 of file WThreadedTrackingFunction.cpp.

Friends And Related Function Documentation

◆ ::WThreadedTrackingFunctionTest

friend class ::WThreadedTrackingFunctionTest
friend

Access for test class.

Definition at line 234 of file WThreadedTrackingFunction.h.

Member Data Documentation

◆ m_done

bool wtracking::WThreadedTrackingFunction::IndexType::m_done
private

true, iff there are no more seeds

Definition at line 280 of file WThreadedTrackingFunction.h.

Referenced by WThreadedTrackingFunctionTest::testIndexInitialization().

◆ m_grid

GridPtr wtracking::WThreadedTrackingFunction::IndexType::m_grid
private

a pointer to the grid

Definition at line 277 of file WThreadedTrackingFunction.h.

Referenced by IndexType().

◆ m_max

boost::array< std::size_t, 4 > wtracking::WThreadedTrackingFunction::IndexType::m_max
private

the maximum position in the seed space

Definition at line 289 of file WThreadedTrackingFunction.h.

Referenced by IndexType(), and WThreadedTrackingFunctionTest::testIndexInitialization().

◆ m_min

boost::array< std::size_t, 4 > wtracking::WThreadedTrackingFunction::IndexType::m_min
private

the minimum position in the seed space

Definition at line 286 of file WThreadedTrackingFunction.h.

Referenced by IndexType(), and WThreadedTrackingFunctionTest::testIndexInitialization().

◆ m_offset

double wtracking::WThreadedTrackingFunction::IndexType::m_offset
private

the relative (to the size of a voxel) distance between seeds

Definition at line 292 of file WThreadedTrackingFunction.h.

Referenced by IndexType(), and WThreadedTrackingFunctionTest::testIndexInitialization().

◆ m_pos

boost::array< std::size_t, 4 > wtracking::WThreadedTrackingFunction::IndexType::m_pos
private

the position in the seed space

Definition at line 283 of file WThreadedTrackingFunction.h.

Referenced by IndexType(), and WThreadedTrackingFunctionTest::testIndexInitialization().


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