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

Stores the data of deterministic fiber tractograms. More...

#include <WTractData.h>

+ Collaboration diagram for WTractData:

Public Member Functions

 WTractData (std::shared_ptr< std::vector< float > > pointComponents, std::shared_ptr< std::vector< size_t > > startIndices)
 Constructs a new WTractData. More...
 
size_t numTracts () const
 

Private Attributes

std::shared_ptr< std::vector< float > > m_pointComponents
 Stores the all components of all vertices of all tracts. More...
 
std::shared_ptr< std::vector< size_t > > m_startIndices
 Stores for every tract the index number where it starts in the m_pointComponents array. More...
 

Detailed Description

Stores the data of deterministic fiber tractograms.

Derived or optional data as tangents, FA, etc. are not saved in here, and never will be! Just the polylines.

Definition at line 36 of file WTractData.h.

Constructor & Destructor Documentation

◆ WTractData()

WTractData::WTractData ( std::shared_ptr< std::vector< float > >  pointComponents,
std::shared_ptr< std::vector< size_t > >  startIndices 
)

Constructs a new WTractData.

Parameters
pointComponentsx, y, and z components of each position of each tract
startIndicesFor each tract the index of the first x component in pointComponents.

Definition at line 31 of file WTractData.cpp.

Member Function Documentation

◆ numTracts()

size_t WTractData::numTracts ( ) const
inline
Returns
Number of tracts.

Definition at line 75 of file WTractData.h.

References m_startIndices.

Member Data Documentation

◆ m_pointComponents

std::shared_ptr< std::vector< float > > WTractData::m_pointComponents
private

Stores the all components of all vertices of all tracts.

First x, y and finally z component are arranged in this manner: $[x_0, y_0, z_0, ..., x_{m_0}, y_{m_0}, z_{m_0}, ... , ..., x_{m_k}, y_{m_k}, z_{m_k}]$ where there are $k$ many tracts where the i'th tract has $m_i$ vertices, but $3m_i$ compontents. In other words: m_points.size() / 3 == number of vertices.

Note
the reason for beeing restricted to float is, that graphic boards and also the tracking algorithms which produce those tracks are just using floats.

Definition at line 63 of file WTractData.h.

◆ m_startIndices

std::shared_ptr< std::vector< size_t > > WTractData::m_startIndices
private

Stores for every tract the index number where it starts in the m_pointComponents array.

This means the index of each tracts first component $x_0$.

Note
the reason for using size_t instead of unsigned int is that more tracts with more points are in sight.

Definition at line 72 of file WTractData.h.

Referenced by numTracts().


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