Skip to content

Commit 009748f

Browse files
authored
Merge pull request #112 from Gregoire-V/BugFixTODEstimatorOrientation
Bug fix TOD orientation
2 parents 185203f + 9b5f3b4 commit 009748f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,20 @@ namespace anima
8484
for (int i = 0; i < nbPoints; i++)
8585
{
8686
DirType dir = GetFiberDirection(i, fiber);
87+
if(output->GetDirection()[0][0] > 0)
88+
{
89+
dir[0] *= -1;
90+
}
91+
if(output->GetDirection()[1][1] < 0)
92+
{
93+
dir[1] *= -1;
94+
}
95+
if(output->GetDirection()[2][2] < 0)
96+
{
97+
dir[2] *= -1;
98+
}
99+
100+
87101
PointType point = GetCenterVoxel(i, fiber);
88102
itk::Index<3> index;
89103

0 commit comments

Comments
 (0)