From a2a36ecca5a2669797b55bd2dfd5b566a4e383cb Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Tue, 2 Apr 2019 22:10:49 +0200
Subject: [PATCH] Unzoom the model image to 12.5 percent

It is required to be shown on the screen, but we can at least make it
smaller so it is less prominent.
---
 src/imcflibs/imagej/shading.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py
index bd0774b..92dcd94 100644
--- a/src/imcflibs/imagej/shading.py
+++ b/src/imcflibs/imagej/shading.py
@@ -134,6 +134,10 @@ def process_folder(path, suffix, outpath, model_file, fmt):
         # the model needs to be shown, otherwise the IJ.run() call ignores it
         try:
             model.show()
+            canvas = model.getCanvas()
+            for _ in range(5):
+                # we have to show it, but we can make it smaller:
+                canvas.zoomOut(100, 100)
         except AttributeError:
             misc.error_exit("Opening shading model [%s] failed!" % model_file)
 
-- 
GitLab