From 87f152b3e5c8448a246b44770ae86200a98abadf Mon Sep 17 00:00:00 2001 From: Michael Innerberger Date: Mon, 7 Oct 2024 17:52:30 -0400 Subject: [PATCH] Add parameter for high quality rendering and set to true --- .../java/org/janelia/alignment/ByteBoxRenderer.java | 13 +++++++++++++ .../org/janelia/alignment/ShortBoxRenderer.java | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/render-app/src/main/java/org/janelia/alignment/ByteBoxRenderer.java b/render-app/src/main/java/org/janelia/alignment/ByteBoxRenderer.java index 845cf40f0..f10d15617 100644 --- a/render-app/src/main/java/org/janelia/alignment/ByteBoxRenderer.java +++ b/render-app/src/main/java/org/janelia/alignment/ByteBoxRenderer.java @@ -44,6 +44,15 @@ public ByteProcessor render(final long x, final long y, final long z, final ImageProcessorCache ipCache) { + + render(x, y, z, ipCache, true); + } + + public ByteProcessor render(final long x, + final long y, + final long z, + final ImageProcessorCache ipCache, + final boolean highQuality) { final String renderParametersUrlString = String.format("%s/z/%d/box/%d,%d,%s", stackUrl, z, x, y, boxUrlSuffix); final RenderParameters renderParameters = RenderParameters.loadFromUrl(renderParametersUrlString); @@ -53,6 +62,10 @@ public ByteProcessor render(final long x, if (maxIntensity != null) { renderParameters.setMaxIntensity(maxIntensity); } + if (highQuality) { + renderParameters.setBinaryMask(false); + renderParameters.setSkipInterpolation(false); + } final ByteProcessor renderedProcessor; if (renderParameters.numberOfTileSpecs() > 0) { diff --git a/render-app/src/main/java/org/janelia/alignment/ShortBoxRenderer.java b/render-app/src/main/java/org/janelia/alignment/ShortBoxRenderer.java index 2f36dbdca..decd83d11 100644 --- a/render-app/src/main/java/org/janelia/alignment/ShortBoxRenderer.java +++ b/render-app/src/main/java/org/janelia/alignment/ShortBoxRenderer.java @@ -44,6 +44,15 @@ public ShortProcessor render(final long x, final long y, final long z, final ImageProcessorCache ipCache) { + + render(x, y, z, ipCache, true); + } + + public ShortProcessor render(final long x, + final long y, + final long z, + final ImageProcessorCache ipCache, + final boolean highQuality) { final String renderParametersUrlString = String.format("%s/z/%d/box/%d,%d,%s", stackUrl, z, x, y, boxUrlSuffix); final RenderParameters renderParameters = RenderParameters.loadFromUrl(renderParametersUrlString); @@ -53,6 +62,10 @@ public ShortProcessor render(final long x, if (maxIntensity != null) { renderParameters.setMaxIntensity(maxIntensity); } + if (highQuality) { + renderParameters.setBinaryMask(false); + renderParameters.setSkipInterpolation(false); + } final ShortProcessor renderedProcessor; if (renderParameters.numberOfTileSpecs() > 0) {