From 0c2ff6558b16cb377ed660ecec44a723ec76bf4b Mon Sep 17 00:00:00 2001
From: Nicola Vigano <nicola.vigano@esrf.fr>
Date: Mon, 26 Jan 2015 16:16:20 +0100
Subject: [PATCH] 6D-Cluster: fixed forced re-normalization

Signed-off-by: Nicola Vigano <nicola.vigano@esrf.fr>
---
 zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m b/zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
index 56d0f6d0..99582c63 100644
--- a/zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
+++ b/zUtil_Deformation/Gt6DReconstructionAlgorithmFactory.m
@@ -290,7 +290,8 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
                     safe_coeffs = coeffs(safe_indexes_pos);
                     % Let's build the interpolated slices
                     blob = blobs(ii).intm;
-                    blob = blob ./ sum(blob(:));
+                    blob(blob < 0) = 0;
+%                     blob = blob ./ sum(blob(:));
                     for w = 1:numel(safe_coeffs)
                         sub_blob_slices{ii}(:, :, n) = ...
                             sub_blob_slices{ii}(:, :, n) + safe_coeffs(w) .* blob(:, :, safe_indexes(w));
-- 
GitLab