- java.lang.Object
-
- bdv.viewer.render.awt.BufferedImageRenderResult
-
- All Implemented Interfaces:
RenderResult
public class BufferedImageRenderResult extends Object implements RenderResult
-
-
Constructor Summary
Constructors Constructor Description BufferedImageRenderResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImagegetBufferedImage()doublegetScaleFactor()Get the scale factor from target coordinates to screen resolution.net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.ARGBType>getTargetImage()Get the image to render to.net.imglib2.realtransform.AffineTransform3DgetViewerTransform()Get the viewer transform used to render image.voidinit(int width, int height)Allocate storage such thatRenderResult.getTargetImage()holds an image ofwidth * height.voidpatch(RenderResult patch, net.imglib2.Interval interval, double ox, double oy)Fill inintervalwith data frompatch, scaled by the relative scale between thisRenderResultandpatch, and shifted such that(0,0)of thepatchis placed at(ox,oy)of thisRenderResultvoidsetScaleFactor(double scaleFactor)Set the scale factor from target coordinates to screen resolution.voidsetUpdated()Notify that thetarget imagedata was changed.
-
-
-
Method Detail
-
init
public void init(int width, int height)Description copied from interface:RenderResultAllocate storage such thatRenderResult.getTargetImage()holds an image ofwidth * height.(Called by the
renderer.)- Specified by:
initin interfaceRenderResult
-
getTargetImage
public net.imglib2.RandomAccessibleInterval<net.imglib2.type.numeric.ARGBType> getTargetImage()
Description copied from interface:RenderResultGet the image to render to.(Called by the
renderer.)- Specified by:
getTargetImagein interfaceRenderResult- Returns:
- the image to render to
-
getBufferedImage
public BufferedImage getBufferedImage()
-
getViewerTransform
public net.imglib2.realtransform.AffineTransform3D getViewerTransform()
Description copied from interface:RenderResultGet the viewer transform used to render image. This is with respect to the screen resolution (doesn't include scaling).(Called by the
rendererto set the transform.)- Specified by:
getViewerTransformin interfaceRenderResult
-
getScaleFactor
public double getScaleFactor()
Description copied from interface:RenderResultGet the scale factor from target coordinates to screen resolution.- Specified by:
getScaleFactorin interfaceRenderResult
-
setScaleFactor
public void setScaleFactor(double scaleFactor)
Description copied from interface:RenderResultSet the scale factor from target coordinates to screen resolution.- Specified by:
setScaleFactorin interfaceRenderResult
-
setUpdated
public void setUpdated()
Description copied from interface:RenderResultNotify that thetarget imagedata was changed.(Called by the
renderer.)- Specified by:
setUpdatedin interfaceRenderResult
-
patch
public void patch(RenderResult patch, net.imglib2.Interval interval, double ox, double oy)
Description copied from interface:RenderResultFill inintervalwith data frompatch, scaled by the relative scale between thisRenderResultandpatch, and shifted such that(0,0)of thepatchis placed at(ox,oy)of thisRenderResultNote that only data in
intervalwill be modified, although the scaled and shiftedpatchmight fall partially outside.- Specified by:
patchin interfaceRenderResult
-
-