From 66b757848e3b5875063d14dfe5700e8b1a2a54e6 Mon Sep 17 00:00:00 2001 From: Evgueni Ovtchinnikov Date: Tue, 3 Sep 2024 08:22:29 +0000 Subject: [PATCH] prior value now double, fixes #1290 --- src/xSTIR/cSTIR/cstir.cpp | 4 ++-- src/xSTIR/pSTIR/STIR.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xSTIR/cSTIR/cstir.cpp b/src/xSTIR/cSTIR/cstir.cpp index d74be8de7..ea034179f 100644 --- a/src/xSTIR/cSTIR/cstir.cpp +++ b/src/xSTIR/cSTIR/cstir.cpp @@ -1329,8 +1329,8 @@ cSTIR_priorValue(void* ptr_p, void* ptr_i) objectFromHandle(ptr_p); STIRImageData& id = objectFromHandle(ptr_i); Image3DF& image = id.data(); - float v = (float)prior.compute_value(image); - return dataHandle(v); + double v = prior.compute_value(image); + return dataHandle(v); } CATCH; } diff --git a/src/xSTIR/pSTIR/STIR.py b/src/xSTIR/pSTIR/STIR.py index efbc63c00..8e1e4fd5c 100644 --- a/src/xSTIR/pSTIR/STIR.py +++ b/src/xSTIR/pSTIR/STIR.py @@ -2320,7 +2320,7 @@ def get_value(self, image): assert_validity(image, ImageData) handle = pystir.cSTIR_priorValue(self.handle, image.handle) check_status(handle) - v = pyiutil.floatDataFromHandle(handle) + v = pyiutil.doubleDataFromHandle(handle) pyiutil.deleteDataHandle(handle) return v