From 6fb3a5ab7fbf008ad0b794f13ee8c741de82af04 Mon Sep 17 00:00:00 2001
From: jstark <jstark@mpi-cbg.de>
Date: Tue, 10 Nov 2020 18:50:38 +0100
Subject: [PATCH] Fixing bug in offset computation.

---
 src/RawReader/InitGridWithPixel.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/RawReader/InitGridWithPixel.hpp b/src/RawReader/InitGridWithPixel.hpp
index 01e23ec..bd53a1c 100644
--- a/src/RawReader/InitGridWithPixel.hpp
+++ b/src/RawReader/InitGridWithPixel.hpp
@@ -129,7 +129,7 @@ void load_pixel_onto_grid(grid_type & grid, std::string file_name, std::vector <
 		// in case that the grid has a different resolution than the underlying image stack:
 		// create a key which is used to get the offset for the file reading
 		// the indices in this key are corrected by the refinement factor
-		for (size_t d = 1; d < grid_type::dims; d++)
+		for (size_t d = 0; d < grid_type::dims; d++)
 		{
 			gkey.set_d(d, std::round(gkey.get(d) / refinement[d]));
 		}
-- 
GitLab