- java.lang.Object
-
- bdv.viewer.state.ViewerState
-
@Deprecated public class ViewerState extends Object
Deprecated.Description of everything required to render the current image, such as the current timepoint, the visible and current sources and groups respectively, the viewer transformation, etc.- Author:
- Tobias Pietzsch
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedViewerState(ViewerState s)Deprecated.copy constructorViewerState(SynchronizedViewerState state)Deprecated.ViewerState(List<SourceAndConverter<?>> sources, int numTimePoints)Deprecated.ViewerState(List<SourceAndConverter<?>> sources, List<SourceGroup> sourceGroups, int numTimePoints)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddGroup(SourceGroup group)Deprecated.voidaddSource(SourceAndConverter<?> source)Deprecated.ViewerStatecopy()Deprecated.intgetBestMipMapLevel(net.imglib2.realtransform.AffineTransform3D screenScaleTransform, int sourceIndex)Deprecated.Get the mipmap level that best matches the given screen scale for the given source.intgetBestMipMapLevel(net.imglib2.realtransform.AffineTransform3D screenScaleTransform, Source<?> source)Deprecated.Get the mipmap level that best matches the given screen scale for the given source.intgetCurrentGroup()Deprecated.Get the index of the current group.intgetCurrentSource()Deprecated.Get the index of the current source.intgetCurrentTimepoint()Deprecated.Get the timepoint index that is currently displayed.DisplayModegetDisplayMode()Deprecated.Get the currentDisplayMode.InterpolationgetInterpolation()Deprecated.Get the interpolation method.intgetNumTimepoints()Deprecated.Get the number of timepoints.List<SourceGroup>getSourceGroups()Deprecated.Returns a list of all source groups.List<SourceState<?>>getSources()Deprecated.Returns a list of all sources.SynchronizedViewerStategetState()Deprecated.voidgetViewerTransform(net.imglib2.realtransform.AffineTransform3D t)Deprecated.Get the viewer transform.List<Integer>getVisibleSourceIndices()Deprecated.Returns a list of the indices of all currently visible sources.booleanisSingleSourceMode()Deprecated.replaced bygetDisplayMode()booleanisSourceVisible(int index)Deprecated.voidkill()Deprecated.DON'T USE THIS.intnumSourceGroups()Deprecated.Returns the number of source groups.intnumSources()Deprecated.Returns the number of sources.protected voidremoveGroup(int index)Deprecated.voidremoveGroup(SourceGroup group)Deprecated.protected voidremoveSource(int index)Deprecated.voidremoveSource(Source<?> source)Deprecated.voidsetCurrentGroup(int index)Deprecated.Make the group with the given index current.voidsetCurrentGroup(SourceGroup group)Deprecated.Make the given group current.voidsetCurrentSource(int index)Deprecated.Make the source with the given index current.voidsetCurrentSource(Source<?> source)Deprecated.Make the given source current.voidsetCurrentTimepoint(int timepoint)Deprecated.Set the current timepoint index.voidsetDisplayMode(DisplayMode mode)Deprecated.Set theDisplayMode.voidsetInterpolation(Interpolation method)Deprecated.Set the interpolation method.voidsetNumTimepoints(int numTimepoints)Deprecated.Set the number of timepoints.voidsetSingleSourceMode(boolean singleSourceMode)Deprecated.replaced bysetDisplayMode(DisplayMode)voidsetViewerTransform(net.imglib2.realtransform.AffineTransform3D t)Deprecated.Set the viewer transform.
-
-
-
Constructor Detail
-
ViewerState
public ViewerState(List<SourceAndConverter<?>> sources, int numTimePoints)
Deprecated.
-
ViewerState
public ViewerState(List<SourceAndConverter<?>> sources, List<SourceGroup> sourceGroups, int numTimePoints)
Deprecated.- Parameters:
sources- thesourcesto display.numTimePoints- number of available timepoints.
-
ViewerState
public ViewerState(SynchronizedViewerState state)
Deprecated.
-
ViewerState
protected ViewerState(ViewerState s)
Deprecated.copy constructor- Parameters:
s-
-
-
Method Detail
-
getState
public SynchronizedViewerState getState()
Deprecated.
-
copy
public ViewerState copy()
Deprecated.
-
getViewerTransform
public void getViewerTransform(net.imglib2.realtransform.AffineTransform3D t)
Deprecated.Get the viewer transform.- Parameters:
t- is set to the viewer transform.
-
setViewerTransform
public void setViewerTransform(net.imglib2.realtransform.AffineTransform3D t)
Deprecated.Set the viewer transform.- Parameters:
t- transform parameters.
-
getCurrentSource
public int getCurrentSource()
Deprecated.Get the index of the current source.
-
setCurrentSource
public void setCurrentSource(int index)
Deprecated.Make the source with the given index current.
-
setCurrentSource
public void setCurrentSource(Source<?> source)
Deprecated.Make the given source current.
-
getCurrentGroup
public int getCurrentGroup()
Deprecated.Get the index of the current group.
-
setCurrentGroup
public void setCurrentGroup(int index)
Deprecated.Make the group with the given index current.
-
setCurrentGroup
public void setCurrentGroup(SourceGroup group)
Deprecated.Make the given group current.
-
getInterpolation
public Interpolation getInterpolation()
Deprecated.Get the interpolation method.- Returns:
- interpolation method.
-
setInterpolation
public void setInterpolation(Interpolation method)
Deprecated.Set the interpolation method.- Parameters:
method- interpolation method.
-
isSingleSourceMode
@Deprecated public boolean isSingleSourceMode()
Deprecated.replaced bygetDisplayMode()Is the display mode single-source? In single-source mode, only the current source (SPIM angle). Otherwise, in fused mode, all active sources are blended.- Returns:
- whether the display mode is single-source.
-
setSingleSourceMode
@Deprecated public void setSingleSourceMode(boolean singleSourceMode)
Deprecated.replaced bysetDisplayMode(DisplayMode)Set the display mode to single-source (true) or fused (false). In single-source mode, only the current source (SPIM angle) is shown. In fused mode, all active sources are blended.- Parameters:
singleSourceMode- If true, set single-source mode. If false, set fused mode.
-
setDisplayMode
public void setDisplayMode(DisplayMode mode)
Deprecated.Set theDisplayMode.- In single-source mode, only the current source (SPIM angle) is shown.
- In fused mode, all active sources are blended.
- In single-group mode, all sources of the current group are blended.
- In fused group mode, all sources of all active groups are blended.
- Parameters:
mode- the display mode
-
getDisplayMode
public DisplayMode getDisplayMode()
Deprecated.Get the currentDisplayMode.- In single-source mode, only the current source (SPIM angle) is shown.
- In fused mode, all active sources are blended.
- In single-group mode, all sources of the current group are blended.
- In fused group mode, all sources of all active groups are blended.
- Returns:
- the current display mode
-
getCurrentTimepoint
public int getCurrentTimepoint()
Deprecated.Get the timepoint index that is currently displayed.- Returns:
- current timepoint index
-
setCurrentTimepoint
public void setCurrentTimepoint(int timepoint)
Deprecated.Set the current timepoint index.- Parameters:
timepoint- timepoint index.
-
getSources
public List<SourceState<?>> getSources()
Deprecated.Returns a list of all sources.- Returns:
- list of all sources.
-
numSources
public int numSources()
Deprecated.Returns the number of sources.- Returns:
- number of sources.
-
getSourceGroups
public List<SourceGroup> getSourceGroups()
Deprecated.Returns a list of all source groups.- Returns:
- list of all source groups.
-
numSourceGroups
public int numSourceGroups()
Deprecated.Returns the number of source groups.- Returns:
- number of source groups.
-
addSource
public void addSource(SourceAndConverter<?> source)
Deprecated.
-
removeSource
public void removeSource(Source<?> source)
Deprecated.
-
removeSource
protected void removeSource(int index)
Deprecated.
-
addGroup
public void addGroup(SourceGroup group)
Deprecated.
-
removeGroup
public void removeGroup(SourceGroup group)
Deprecated.
-
removeGroup
protected void removeGroup(int index)
Deprecated.
-
isSourceVisible
public boolean isSourceVisible(int index)
Deprecated.
-
getVisibleSourceIndices
public List<Integer> getVisibleSourceIndices()
Deprecated.Returns a list of the indices of all currently visible sources.- Returns:
- indices of all currently visible sources.
-
getBestMipMapLevel
public int getBestMipMapLevel(net.imglib2.realtransform.AffineTransform3D screenScaleTransform, int sourceIndex)
Deprecated.Get the mipmap level that best matches the given screen scale for the given source.- Parameters:
screenScaleTransform- screen scale, transforms screen coordinates to viewer coordinates.- Returns:
- mipmap level
-
getBestMipMapLevel
public int getBestMipMapLevel(net.imglib2.realtransform.AffineTransform3D screenScaleTransform, Source<?> source)
Deprecated.Get the mipmap level that best matches the given screen scale for the given source.- Parameters:
screenScaleTransform- screen scale, transforms screen coordinates to viewer coordinates.- Returns:
- mipmap level
-
getNumTimepoints
public int getNumTimepoints()
Deprecated.Get the number of timepoints.- Returns:
- the number of timepoints.
-
setNumTimepoints
public void setNumTimepoints(int numTimepoints)
Deprecated.Set the number of timepoints.- Parameters:
numTimepoints- the number of timepoints.
-
kill
public void kill()
Deprecated.DON'T USE THIS.This is a work around for JDK bug https://bugs.openjdk.java.net/browse/JDK-8029147 which leads to ViewerPanel not being garbage-collected when ViewerFrame is closed. So instead we need to manually let go of resources...
-
-