From 9cc3b2a55dce18ba24c1d189678ea7a3a902a533 Mon Sep 17 00:00:00 2001 From: Eric Trautman Date: Mon, 12 Jun 2017 12:54:25 -0400 Subject: [PATCH] fix raw tile test so that it works with float processor target introduced for multi channel support --- .../java/org/janelia/alignment/RenderRawTileTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/render-app/src/test/java/org/janelia/alignment/RenderRawTileTest.java b/render-app/src/test/java/org/janelia/alignment/RenderRawTileTest.java index d665f3597..3981fb74c 100644 --- a/render-app/src/test/java/org/janelia/alignment/RenderRawTileTest.java +++ b/render-app/src/test/java/org/janelia/alignment/RenderRawTileTest.java @@ -1,9 +1,12 @@ package org.janelia.alignment; +import ij.process.FloatProcessor; import ij.process.ImageProcessor; import java.awt.image.BufferedImage; +import mpicbg.trakem2.transform.TransformMeshMappingWithMasks; + import org.janelia.alignment.spec.ChannelSpec; import org.janelia.alignment.spec.TileSpec; import org.janelia.alignment.util.ImageProcessorCache; @@ -24,7 +27,12 @@ public void testRender() throws Exception { final ImageProcessorCache imageProcessorCache = new ImageProcessorCache(); final ImageProcessor rawIp = imageProcessorCache.get(imageWithoutMask.getImageUrl(), 0, false, false); - final BufferedImage rawImage = rawIp.getBufferedImage(); + final FloatProcessor floatRawIp = rawIp.convertToFloatProcessor(); + final BufferedImage rawImage = + ArgbRenderer.targetToARGBImage(new TransformMeshMappingWithMasks.ImageProcessorWithMasks(floatRawIp, null, null), + 0, + 255, + false); final ChannelSpec channelSpec = new ChannelSpec(); channelSpec.putMipmap(0, imageWithoutMask);