- java.lang.Object
-
- bdv.viewer.render.DefaultMipmapOrdering
-
- All Implemented Interfaces:
MipmapOrdering
public class DefaultMipmapOrdering extends Object implements MipmapOrdering
The standard mipmap ordering strategy for local hdf5 data. Assumes that mipmap indices in the source are ordered by decreasing resolution. Finds the mipmap level that best matches the given screen scale for the given source. Then, starting from this best level render all levels down to the lowest resolution. For prefetching reverse that order (lowest resolution is prefetched first). Additionally, when moving between time-points the following hack is used: When scrolling through time, we often get frames for which no data was loaded yet. To speed up rendering in these cases, use only two mipmap levels: the optimal and the coarsest. By doing this, we require at most two passes over the image at the expense of ignoring data present in intermediate mipmap levels. The assumption is, that we will either be moving back and forth between images that have all data present already or that we move to a new image with no data present at all.- Author:
- Tobias Pietzsch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface bdv.viewer.render.MipmapOrdering
MipmapOrdering.Level, MipmapOrdering.MipmapHints, MipmapOrdering.PrefetchOrderComparator, MipmapOrdering.RenderOrderComparator
-
-
Field Summary
-
Fields inherited from interface bdv.viewer.render.MipmapOrdering
prefetchOrderComparator, renderOrderComparator
-
-
Constructor Summary
Constructors Constructor Description DefaultMipmapOrdering(Source<?> source)DefaultMipmapOrdering(Source<?> source, boolean createHints, net.imglib2.cache.volatiles.LoadingStrategy renderLoadingStrategy, boolean renderEnqueuToFront, net.imglib2.cache.volatiles.LoadingStrategy prefetchLoadingStrategy, boolean prefetchEnqueuToFront)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MipmapOrdering.MipmapHintsgetMipmapHints(net.imglib2.realtransform.AffineTransform3D screenTransform, int timepoint, int previousTimepoint)Evaluate mipmap levels such that they can be ordered for rendering and/or prefetching.
-
-
-
Constructor Detail
-
DefaultMipmapOrdering
public DefaultMipmapOrdering(Source<?> source, boolean createHints, net.imglib2.cache.volatiles.LoadingStrategy renderLoadingStrategy, boolean renderEnqueuToFront, net.imglib2.cache.volatiles.LoadingStrategy prefetchLoadingStrategy, boolean prefetchEnqueuToFront)
- Parameters:
source-createHints- If true,MipmapOrdering.Levels are created withCacheHintscomputed as follows.LoadingStrategyand enqueue order are set as specified in the remaining parameters. Priority is set such that the coarsest mipmap level has highest priority. If false,MipmapOrdering.Levels are created withnullCacheHints.renderLoadingStrategy-renderEnqueuToFront-prefetchLoadingStrategy-prefetchEnqueuToFront-
-
DefaultMipmapOrdering
public DefaultMipmapOrdering(Source<?> source)
-
-
Method Detail
-
getMipmapHints
public MipmapOrdering.MipmapHints getMipmapHints(net.imglib2.realtransform.AffineTransform3D screenTransform, int timepoint, int previousTimepoint)
Description copied from interface:MipmapOrderingEvaluate mipmap levels such that they can be ordered for rendering and/or prefetching.- Specified by:
getMipmapHintsin interfaceMipmapOrdering- Parameters:
screenTransform- transforms screen coordinates to global coordinates.timepoint- current timepoint indexpreviousTimepoint- previous timepoint index
-
-