From 70237206f1bed35359fe302103bc7b00bfa46941 Mon Sep 17 00:00:00 2001 From: Gregoire Ville Date: Mon, 29 Apr 2024 17:06:34 +0200 Subject: [PATCH 1/2] Correction of an orientation error in the TODs estimated with animaTODEstimator --- .../odf/tod_estimator/animaTODEstimatorImageFilter.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx index edfd168f6..7c078e5a1 100644 --- a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx +++ b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx @@ -84,6 +84,14 @@ 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; From 9b5f3b4066fb920a81aaa2c045df1441347ef51c Mon Sep 17 00:00:00 2001 From: Gregoire Ville Date: Thu, 2 May 2024 11:43:40 +0200 Subject: [PATCH 2/2] Fix change request - curly brackets in then clauses --- .../odf/tod_estimator/animaTODEstimatorImageFilter.hxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx index 7c078e5a1..47bd8692c 100644 --- a/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx +++ b/Anima/diffusion/odf/tod_estimator/animaTODEstimatorImageFilter.hxx @@ -85,11 +85,17 @@ namespace anima { 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);