From b3ad4e3207771db649c3b14e53b33f9ca7c51bde Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Fri, 3 Nov 2023 15:50:24 +0100 Subject: [PATCH] Updated to new test classifiers --- clients/examples/run_simple_ilastik.py | 4 ++-- clients/imagej/adapter.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clients/examples/run_simple_ilastik.py b/clients/examples/run_simple_ilastik.py index 123874bf..b9c99fad 100644 --- a/clients/examples/run_simple_ilastik.py +++ b/clients/examples/run_simple_ilastik.py @@ -10,8 +10,8 @@ if __name__ == '__main__': img_abspath = 'C:\\Users\\rhodes\\projects\\proj0004-marine-photoactivation\\data\\exp0021\\B2\\20230320-153317\\Selection\\Selection--W0000--P0001-T0001.czi' params = { - 'pixel_classifier_path': 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0019/px-02.ilp', - 'object_classifier_path': 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0019/obj-06.ilp', + 'pixel_classifier_path': 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0019/px-03.ilp', + 'object_classifier_path': 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0019/obj-07.ilp', 'channel': 4, } diff --git a/clients/imagej/adapter.py b/clients/imagej/adapter.py index f09942b7..3ed10c07 100644 --- a/clients/imagej/adapter.py +++ b/clients/imagej/adapter.py @@ -31,9 +31,9 @@ def hit_endpoint(method, endpoint, params=None): resp = connection.getresponse() resp_str = resp.read() try: - content = json.loads(resp_str) + content = json.loads(resp_str) except Exception: - content = {'str': str(resp_str)} + content = {'str': str(resp_str)} return {'status': resp.status, 'content': content} def run_request_sequence(imp, func, params): @@ -44,6 +44,6 @@ def run_request_sequence(imp, func, params): :param params: (dict) parameters specific to client request :return: (ij.ImagePlus) output image """ - in_path = imp.getProp('Location') - out_path = func(hit_endpoint, in_path, params) - return ImagePlus(out_path) \ No newline at end of file + in_path = imp.getProp('Location') + out_path = func(hit_endpoint, in_path, params) + return ImagePlus(out_path) \ No newline at end of file -- GitLab