From 6048d46a5926cdbbb206e91c527905a974a305aa Mon Sep 17 00:00:00 2001 From: noordhee Date: Fri, 10 Jan 2025 18:01:23 +0100 Subject: [PATCH] return the image without casting --- ImageD11/nbGui/segmenter_gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ImageD11/nbGui/segmenter_gui.py b/ImageD11/nbGui/segmenter_gui.py index b06673a2..c5c5a8dd 100644 --- a/ImageD11/nbGui/segmenter_gui.py +++ b/ImageD11/nbGui/segmenter_gui.py @@ -73,7 +73,7 @@ def chooseframe(self, dset, scan=None, idx=None, counter="_roi1", fetch_raw_imag # placing the raw image if fetch_raw_image: - raw_image = hin[scan + "/measurement/" + dset.detector][idx].astype("uint16") + raw_image = hin[scan + "/measurement/" + dset.detector][idx] return scan, idx, raw_image @@ -198,6 +198,7 @@ def __init__(self, dset, worker_func, process_func, counter="_roi1", scan=None, def chooseframe(self, counter): self.scan, self.idx, self.raw_image = chooseframe(self.dset, self.scan, self.idx, counter, fetch_raw_image=True) + self.raw_image = self.raw_image.astype("uint16") def segment_frame(self): image_worker = self.worker_func(**self.options)