From d4d3751d18b627aa0c21fb7a30d9913507995107 Mon Sep 17 00:00:00 2001 From: Alejandro Homs Puron Date: Wed, 24 Mar 2021 16:21:14 +0100 Subject: [PATCH] CtSaving_Edf: fix saving of (3D) image stack --- control/src/CtSaving_Edf.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/control/src/CtSaving_Edf.h b/control/src/CtSaving_Edf.h index 91caeddf..4ce5e821 100644 --- a/control/src/CtSaving_Edf.h +++ b/control/src/CtSaving_Edf.h @@ -204,7 +204,10 @@ namespace lima { sout << "Dim_2 = "; mmap_info.height_offset = sout.tellp(); snprintf(aBuffer,sizeof(aBuffer),"%*s ;\n",nbCharReserved,""); - sout << aData.dimensions[1] << aBuffer; + int rows = aData.dimensions[1]; + if (aData.dimensions.size() == 3) + rows *= aData.dimensions[2]; + sout << rows << aBuffer; sout << "Image = " << image_nb << " ;\n"; -- GitLab