Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #211 from chamberm/master
Browse files Browse the repository at this point in the history
Random initialisation of tractography did'nt ensure that backward and forward tracking was done based on the same peak
  • Loading branch information
jchoude committed Nov 13, 2015
2 parents 20c5228 + 3797a27 commit 8172317
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Tutorials
New rs-fMRI and real-time fiber tractography tutorials soon available: `Tutorial Page`_.
New **video tutorials** of the Fibernavigator are available.

- `Optic radiation`_ : Real-time tractography of the optic radiation using HCP data
- `Scene navigation`_: how to interact with the 3D view, move planes, etc.
- `Mesh display and interaction`_: how to create and modify the display of meshes.
- `Drawing tool`_: how to draw on empty or already existing anatomies.
Expand Down Expand Up @@ -72,6 +73,5 @@ All issues have been moved to the new `issue tracker`_. New issues will also be
.. _Opacity rendering: https://www.youtube.com/watch?v=IzJ537KNpR0
.. _Image Gallery: http://chamberm.github.io/media.html
.. _Tutorial Page: http://chamberm.github.io/fibernavigator_single.html


.. _Optic radiation: https://www.youtube.com/watch?v=UDFpvyrXNyA

14 changes: 13 additions & 1 deletion src/dataset/RTTFibers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ void RTTFibers::clearFibersRTT()
m_streamlinesColors.clear();
m_streamlinesPoints.clear();

m_storedDir.clear();

if( SceneManager::getInstance()->isUsingVBO() )
{
glDeleteBuffers( 2, m_bufferObjectsRTT );
Expand Down Expand Up @@ -1500,7 +1502,17 @@ void RTTFibers::performHARDIRTT(Vector seed, int bwdfwd, vector<float>& points,
if( withinMapThreshold(sticksNumber, currPosition) && !m_stop && absPeak != 0)
{
bool initWithDir = RTTrackingHelper::getInstance()->isInitSeed();
sticks = pickDirection(m_pMaximasInfo->getMainDirData()->at(sticksNumber), initWithDir, currPosition);

if(bwdfwd != -1)
{
sticks = pickDirection(m_pMaximasInfo->getMainDirData()->at(sticksNumber), initWithDir, currPosition);
m_storedDir = sticks;
}
else
{
sticks = m_storedDir;
}


currDirection.x = flippedAxes.x * sticks[0];
currDirection.y = flippedAxes.y * sticks[1];
Expand Down
2 changes: 2 additions & 0 deletions src/dataset/RTTFibers.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ class RTTFibers

std::vector<float> m_streamlinesPoints; // Points to be rendered Forward
std::vector<float> m_streamlinesColors; //Color (local directions)Forward

std::vector<float> m_storedDir;


float m_alpha;
Expand Down

0 comments on commit 8172317

Please sign in to comment.