- java.lang.Object
-
- bdv.viewer.ViewerOptions
-
public class ViewerOptions extends Object
Optional parameters forViewerPanel.- Author:
- Tobias Pietzsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classViewerOptions.ValuesRead-onlyViewerOptionsvalues.
-
Field Summary
Fields Modifier and Type Field Description ViewerOptions.Valuesvalues
-
Constructor Summary
Constructors Constructor Description ViewerOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ViewerOptionsaccumulateProjectorFactory(AccumulateProjectorFactory<net.imglib2.type.numeric.ARGBType> f)Set the factory for creatingAccumulateProjector.ViewerOptionsappearanceManager(AppearanceManager appearanceManager)Set theAppearanceManagerto share appearance settings with other BigDataViewer windows.ViewerOptionsheight(int h)Set height ofViewerPanelcanvas.ViewerOptionsinputTriggerConfig(org.scijava.ui.behaviour.io.InputTriggerConfig c)Set theInputTriggerConfigfrom which keyboard and mouse action mapping is loaded.ViewerOptionsis2D(boolean is2D)Set up the BigDataViewer for 2D navigation.ViewerOptionskeymapManager(KeymapManager keymapManager)Set theKeymapManagerto share keymap settings with other BigDataViewer windows.ViewerOptionsmsgOverlay(MessageOverlayAnimator o)ViewerOptionsnumRenderingThreads(int n)Set how many threads to use for rendering.ViewerOptionsnumSourceGroups(int n)Set how many source groups there are initially.static ViewerOptionsoptions()Create defaultViewerOptions.ViewerOptionsscreenScales(double[] s)Set the number and scale factors for scaled screen images.ViewerOptionsshareKeyPressedEvents(org.scijava.ui.behaviour.KeyPressedManager manager)Set theKeyPressedManagerto shareKeyListener.keyPressed(java.awt.event.KeyEvent)events with other ui-behaviour windows.ViewerOptionstargetRenderNanos(long t)Set target rendering time in nanoseconds.ViewerOptionstransformEventHandlerFactory(TransformEventHandlerFactory f)ViewerOptionsuseVolatileIfAvailable(boolean v)Set whether volatile versions of sources should be used if available.ViewerOptionswidth(int w)Set width ofViewerPanelcanvas.
-
-
-
Field Detail
-
values
public final ViewerOptions.Values values
-
-
Method Detail
-
options
public static ViewerOptions options()
Create defaultViewerOptions.- Returns:
- default
ViewerOptions.
-
width
public ViewerOptions width(int w)
Set width ofViewerPanelcanvas.
-
height
public ViewerOptions height(int h)
Set height ofViewerPanelcanvas.
-
screenScales
public ViewerOptions screenScales(double[] s)
Set the number and scale factors for scaled screen images.- Parameters:
s- Scale factors from the viewer canvas to screen images of different resolutions. A scale factor of 1 means 1 pixel in the screen image is displayed as 1 pixel on the canvas, a scale factor of 0.5 means 1 pixel in the screen image is displayed as 2 pixel on the canvas, etc.- See Also:
MultiResolutionRenderer
-
targetRenderNanos
public ViewerOptions targetRenderNanos(long t)
Set target rendering time in nanoseconds.- Parameters:
t- Target rendering time in nanoseconds. The rendering time for the coarsest rendered scale should be below this threshold.- See Also:
MultiResolutionRenderer
-
numRenderingThreads
public ViewerOptions numRenderingThreads(int n)
Set how many threads to use for rendering.- Parameters:
n- How many threads to use for rendering.- See Also:
MultiResolutionRenderer
-
numSourceGroups
public ViewerOptions numSourceGroups(int n)
Set how many source groups there are initially.- Parameters:
n- How many source groups to create initially.
-
useVolatileIfAvailable
public ViewerOptions useVolatileIfAvailable(boolean v)
Set whether volatile versions of sources should be used if available.- Parameters:
v- whether volatile versions of sources should be used if available.- See Also:
MultiResolutionRenderer
-
msgOverlay
public ViewerOptions msgOverlay(MessageOverlayAnimator o)
-
transformEventHandlerFactory
public ViewerOptions transformEventHandlerFactory(TransformEventHandlerFactory f)
-
is2D
public ViewerOptions is2D(boolean is2D)
Set up the BigDataViewer for 2D navigation. Note, that Sources still need to provide 3D stacks, etc. This option only prevents out-of-plane movement.- Parameters:
is2D- whether to restrict navigation to 2D (default isfalse).
-
accumulateProjectorFactory
public ViewerOptions accumulateProjectorFactory(AccumulateProjectorFactory<net.imglib2.type.numeric.ARGBType> f)
Set the factory for creatingAccumulateProjector. This can be used to customize how sources are combined.- Parameters:
f- factory for creatingAccumulateProjector.- See Also:
MultiResolutionRenderer
-
inputTriggerConfig
public ViewerOptions inputTriggerConfig(org.scijava.ui.behaviour.io.InputTriggerConfig c)
Set theInputTriggerConfigfrom which keyboard and mouse action mapping is loaded.Note that this will override the managed
InputTriggerConfig, that is, modifying the keymap through the preferences dialog will have no effect.- Parameters:
c- theInputTriggerConfigfrom which keyboard and mouse action mapping is loaded
-
shareKeyPressedEvents
public ViewerOptions shareKeyPressedEvents(org.scijava.ui.behaviour.KeyPressedManager manager)
Set theKeyPressedManagerto shareKeyListener.keyPressed(java.awt.event.KeyEvent)events with other ui-behaviour windows.The goal is to make keyboard click/drag behaviours work like mouse click/drag: When a behaviour is initiated with a key press, the window under the mouse receives focus and the behaviour is handled there.
- Parameters:
manager-- Returns:
-
keymapManager
public ViewerOptions keymapManager(KeymapManager keymapManager)
Set theKeymapManagerto share keymap settings with other BigDataViewer windows.This can be used to link multiple BigDataViewer windows such that they use (and modify) the same
Keymap, shortcuts and mouse gestures.
-
appearanceManager
public ViewerOptions appearanceManager(AppearanceManager appearanceManager)
Set theAppearanceManagerto share appearance settings with other BigDataViewer windows.This can be used to link multiple BigDataViewer windows such that they use (and modify) the same
Appearancesettings, e.g., LookAndFeel, scalebar overlay settings, etc.
-
-