Skip to content

Commit

Permalink
N5Test: Don't create ImageJ instance if not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
skalarproduktraum committed Oct 17, 2020
1 parent eac4e03 commit 8b8d8d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/tests/sc/iview/test/N5Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()
Expand All @@ -72,8 +76,6 @@ public static void setupBefore()
}

private static Mesh generateMesh() {
ImageJ imagej = new ImageJ();

// Generate an image
Img<BitType> img = ArrayImgs.bits(25, 25, 25);

Expand All @@ -89,8 +91,6 @@ private static Mesh generateMesh() {
}

private static Mesh getMesh() {
ImageJ imagej = new ImageJ();

final Mesh m;
try {
m = new STLMeshIO()
Expand All @@ -100,7 +100,7 @@ private static Mesh getMesh() {
return m;
}
catch (IOException exc) {
imagej.log().error( exc );
logger.error(exc.toString());
return null;
}
}
Expand Down

0 comments on commit 8b8d8d4

Please sign in to comment.