From 8b8d8d40ceea34e9398dc3356ba8f8e32a9e1b00 Mon Sep 17 00:00:00 2001 From: Ulrik Guenther Date: Sat, 17 Oct 2020 16:22:12 +0200 Subject: [PATCH] N5Test: Don't create ImageJ instance if not necessary --- src/test/tests/sc/iview/test/N5Test.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/tests/sc/iview/test/N5Test.java b/src/test/tests/sc/iview/test/N5Test.java index 27730853..0059380e 100644 --- a/src/test/tests/sc/iview/test/N5Test.java +++ b/src/test/tests/sc/iview/test/N5Test.java @@ -45,6 +45,9 @@ import org.junit.BeforeClass; import org.junit.Test; +import org.scijava.Context; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import sc.iview.commands.demo.MeshDemo; import sc.iview.commands.demo.ResourceLoader; import sc.iview.io.N5; @@ -64,6 +67,7 @@ public class N5Test { private static final double EPSILON = 10e-12; private static Mesh mesh; + private static final Logger logger = LoggerFactory.getLogger("N5Test"); @BeforeClass public static void setupBefore() @@ -72,8 +76,6 @@ public static void setupBefore() } private static Mesh generateMesh() { - ImageJ imagej = new ImageJ(); - // Generate an image Img img = ArrayImgs.bits(25, 25, 25); @@ -89,8 +91,6 @@ private static Mesh generateMesh() { } private static Mesh getMesh() { - ImageJ imagej = new ImageJ(); - final Mesh m; try { m = new STLMeshIO() @@ -100,7 +100,7 @@ private static Mesh getMesh() { return m; } catch (IOException exc) { - imagej.log().error( exc ); + logger.error(exc.toString()); return null; } }