Skip to content

Commit

Permalink
fix raw tile test so that it works with float processor target introd…
Browse files Browse the repository at this point in the history
…uced for multi channel support
  • Loading branch information
trautmane committed Jun 12, 2017
1 parent 556e3b6 commit 9cc3b2a
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 9cc3b2a

Please sign in to comment.