From 35d7b6230cbe664272c2adfd74edb11c89b577b5 Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Mon, 3 Sep 2018 11:00:32 +0200
Subject: [PATCH] Generate array instead of specifying it

---
 scripts/gen_16bit_testimages_5px.ijm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/gen_16bit_testimages_5px.ijm b/scripts/gen_16bit_testimages_5px.ijm
index 07a2b03..7dbe4aa 100644
--- a/scripts/gen_16bit_testimages_5px.ijm
+++ b/scripts/gen_16bit_testimages_5px.ijm
@@ -4,7 +4,12 @@
 
 #@ File(label="Output directory",style="directory") gen_images_output_dir
 
-bit_depths = newArray(8, 9, 10, 11, 12, 13, 14, 15, 16);
+setBatchMode(true);
+
+// create an array with values from 8 to 16 (including)
+bit_depths = Array.getSequence(17);
+bit_depths = Array.slice(bit_depths, 8, 17);
+
 
 for (i = 0; i < lengthOf(bit_depths); i++) {
     title = "" + bit_depths[i] + " bit 5px test image";
-- 
GitLab