Module org.bigdataviewer.core
Package bdv.util
Class RealRandomAccessibleSource<T extends net.imglib2.type.Type<T>>
- java.lang.Object
-
- bdv.util.RealRandomAccessibleSource<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Source<T>
- Direct Known Subclasses:
RealRandomAccessibleIntervalSource
public abstract class RealRandomAccessibleSource<T extends net.imglib2.type.Type<T>> extends Object implements Source<T>
ASourcewrapping someRealRandomAccessible. Derived concrete classes must implementgetInterval(int, int)to specify which interval to use forgetSource(int, int).- Author:
- Tobias Pietzsch
-
-
Field Summary
Fields Modifier and Type Field Description protected net.imglib2.RealRandomAccessible<T>accessibleprotected booleandoBoundingBoxIntersectionCheckprotected Stringnameprotected Ttypeprotected mpicbg.spim.data.sequence.VoxelDimensionsvoxelDimensions
-
Constructor Summary
Constructors Constructor Description RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name)RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name, mpicbg.spim.data.sequence.VoxelDimensions voxelDimensions)RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name, mpicbg.spim.data.sequence.VoxelDimensions voxelDimensions, boolean doBoundingBoxIntersectionCheck)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandoBoundingBoxCulling()Whether this source participates in bounding box culling.net.imglib2.RealRandomAccessible<? extends net.imglib2.type.mask.Masked<T>>getInterpolatedMaskedSource(int t, int level, Interpolation method)Get aMaskedversion of the3D stackat timepoint index t, extended to infinity and interpolated.net.imglib2.RealRandomAccessible<T>getInterpolatedSource(int t, int level, Interpolation method)Get the 3D stack at timepoint index t, extended to infinity and interpolated.abstract net.imglib2.IntervalgetInterval(int t, int level)Return the interval which should be used to bound the wrapped (unbounded)RealRandomAccessibleforgetSource(int, int).net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.mask.Masked<T>>getMaskedSource(int t, int level)Get aMaskedversion of the3D stackat timepoint index t.StringgetName()Get the name of the source.intgetNumMipmapLevels()net.imglib2.RandomAccessibleInterval<T>getSource(int t, int level)Get the 3D stack at timepoint index t.voidgetSourceTransform(int t, int level, net.imglib2.realtransform.AffineTransform3D transform)Get the transform from thesourceat the given timepoint index and mipmap level into the global coordinate system.TgetType()Get an instance of the pixel type.mpicbg.spim.data.sequence.VoxelDimensionsgetVoxelDimensions()Get voxel size and unit for this source.booleanisPresent(int t)Is there a stack at timepoint index t?
-
-
-
Field Detail
-
accessible
protected net.imglib2.RealRandomAccessible<T extends net.imglib2.type.Type<T>> accessible
-
type
protected final T extends net.imglib2.type.Type<T> type
-
name
protected final String name
-
voxelDimensions
protected final mpicbg.spim.data.sequence.VoxelDimensions voxelDimensions
-
doBoundingBoxIntersectionCheck
protected final boolean doBoundingBoxIntersectionCheck
-
-
Constructor Detail
-
RealRandomAccessibleSource
public RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name)
-
RealRandomAccessibleSource
public RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name, mpicbg.spim.data.sequence.VoxelDimensions voxelDimensions)
-
RealRandomAccessibleSource
public RealRandomAccessibleSource(net.imglib2.RealRandomAccessible<T> accessible, T type, String name, mpicbg.spim.data.sequence.VoxelDimensions voxelDimensions, boolean doBoundingBoxIntersectionCheck)
-
-
Method Detail
-
isPresent
public boolean isPresent(int t)
Description copied from interface:SourceIs there a stack at timepoint index t?- Specified by:
isPresentin interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint index- Returns:
- true, if there is data for timepoint index t.
-
getInterval
public abstract net.imglib2.Interval getInterval(int t, int level)
Return the interval which should be used to bound the wrapped (unbounded)RealRandomAccessibleforgetSource(int, int).- Returns:
- image interval
-
getSource
public net.imglib2.RandomAccessibleInterval<T> getSource(int t, int level)
Description copied from interface:SourceGet the 3D stack at timepoint index t.- Specified by:
getSourcein interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint indexlevel- mipmap level- Returns:
- the
stack.
-
getInterpolatedSource
public net.imglib2.RealRandomAccessible<T> getInterpolatedSource(int t, int level, Interpolation method)
Description copied from interface:SourceGet the 3D stack at timepoint index t, extended to infinity and interpolated.- Specified by:
getInterpolatedSourcein interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint indexlevel- mipmap levelmethod- interpolation method to use- Returns:
- the extended and interpolated
stack.
-
getMaskedSource
public net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.mask.Masked<T>> getMaskedSource(int t, int level)
Description copied from interface:SourceGet aMaskedversion of the3D stackat timepoint index t.By default, this is just
Source.getSource(int, int)augmented with a constant mask1.0.- Specified by:
getMaskedSourcein interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint indexlevel- mipmap level- Returns:
- the masked stack
-
getInterpolatedMaskedSource
public net.imglib2.RealRandomAccessible<? extends net.imglib2.type.mask.Masked<T>> getInterpolatedMaskedSource(int t, int level, Interpolation method)
Description copied from interface:SourceGet aMaskedversion of the3D stackat timepoint index t, extended to infinity and interpolated.By default, this is just
Source.getInterpolatedSource(int, int, bdv.viewer.Interpolation)augmented with a constant mask1.0.However, most sources should override this to extend
Source.getMaskedSource(int, int)to infinity (with a0mask) and interpolate.- Specified by:
getInterpolatedMaskedSourcein interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint indexlevel- mipmap levelmethod- interpolation method to use- Returns:
- the extended and interpolated
stack.
-
getSourceTransform
public void getSourceTransform(int t, int level, net.imglib2.realtransform.AffineTransform3D transform)Description copied from interface:SourceGet the transform from thesourceat the given timepoint index and mipmap level into the global coordinate system.- Specified by:
getSourceTransformin interfaceSource<T extends net.imglib2.type.Type<T>>- Parameters:
t- timepoint indexlevel- mipmap leveltransform- is set to the source-to-global transform, that transforms source coordinates into the global coordinates
-
getType
public T getType()
Description copied from interface:SourceGet an instance of the pixel type.- Specified by:
getTypein interfaceSource<T extends net.imglib2.type.Type<T>>- Returns:
- instance of pixel type.
-
getName
public String getName()
Description copied from interface:SourceGet the name of the source.- Specified by:
getNamein interfaceSource<T extends net.imglib2.type.Type<T>>- Returns:
- the name of the source.
-
getVoxelDimensions
public mpicbg.spim.data.sequence.VoxelDimensions getVoxelDimensions()
Description copied from interface:SourceGet voxel size and unit for this source. May return null.- Specified by:
getVoxelDimensionsin interfaceSource<T extends net.imglib2.type.Type<T>>- Returns:
- voxel size and unit or
null.
-
getNumMipmapLevels
public int getNumMipmapLevels()
- Specified by:
getNumMipmapLevelsin interfaceSource<T extends net.imglib2.type.Type<T>>
-
doBoundingBoxCulling
public boolean doBoundingBoxCulling()
Description copied from interface:SourceWhether this source participates in bounding box culling.If
true, then this source will only be rendered if its bounding box, i.e., the interval ofSource.getSource(int, int), intersects the current screen area (when transformed to viewer coordinates).If
false, then this source will be always rendered (if it is set to be visible.)- Specified by:
doBoundingBoxCullingin interfaceSource<T extends net.imglib2.type.Type<T>>- Returns:
true, if this source participates in bounding box culling.
-
-