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

---
 scripts/check_value_range_depth.ijm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/check_value_range_depth.ijm b/scripts/check_value_range_depth.ijm
index 159ff22..37ff102 100644
--- a/scripts/check_value_range_depth.ijm
+++ b/scripts/check_value_range_depth.ijm
@@ -1,8 +1,9 @@
 // macro code to check a 16-bit image for its actual value range bit depth and
 // to test for saturation within that range
 
-// define the value range bit depths to test for:
-possible_depths = newArray(8, 10, 11, 12, 14, 16);
+// define the value range bit depths to test for (8 to 16):
+possible_depths = Array.getSequence(17);
+possible_depths = Array.slice(possible_depths, 8, 17);
 
 // code below expects array to be sorted, so make sure this is true:
 Array.sort(possible_depths);
-- 
GitLab