diff --git a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx index edfd168f6..47bd8692c 100644 --- a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx +++ b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx @@ -84,6 +84,20 @@ namespace anima for (int i = 0; i < nbPoints; i++) { DirType dir = GetFiberDirection(i, fiber); + if(output->GetDirection()[0][0] > 0) + { + dir[0] *= -1; + } + if(output->GetDirection()[1][1] < 0) + { + dir[1] *= -1; + } + if(output->GetDirection()[2][2] < 0) + { + dir[2] *= -1; + } + + PointType point = GetCenterVoxel(i, fiber); itk::Index<3> index;