Module org.bigdataviewer.core
Package bdv
Class AbstractSpimSource<T extends net.imglib2.type.numeric.NumericType<T>>
- java.lang.Object
-
- bdv.AbstractSpimSource<T>
-
- All Implemented Interfaces:
Source<T>
- Direct Known Subclasses:
SpimSource,VolatileSpimSource
public abstract class AbstractSpimSource<T extends net.imglib2.type.numeric.NumericType<T>> extends Object implements Source<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractSpimSource(mpicbg.spim.data.generic.AbstractSpimData<?> spimData, int setupId, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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<? extends net.imglib2.type.mask.Masked<T>>getInterpolatedMaskedSource(int t, int level, Interpolation method, ThreadGroup threadGroup)net.imglib2.RealRandomAccessible<T>getInterpolatedSource(int t, int level, Interpolation method)Get the 3D stack at timepoint index t, extended to infinity and interpolated.net.imglib2.RealRandomAccessible<T>getInterpolatedSource(int t, int level, Interpolation method, ThreadGroup threadGroup)net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.mask.Masked<T>>getMaskedSource(int t, int level)Get aMaskedversion of the3D stackat timepoint index t.net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.mask.Masked<T>>getMaskedSource(int t, int level, ThreadGroup threadGroup)StringgetName()Get the name of the source.intgetNumMipmapLevels()intgetSetupId()net.imglib2.RandomAccessibleInterval<T>getSource(int t, int level)Get the 3D stack at timepoint index t.net.imglib2.RandomAccessibleInterval<T>getSource(int t, int level, ThreadGroup threadGroup)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.mpicbg.spim.data.sequence.VoxelDimensionsgetVoxelDimensions()Get voxel size and unit for this source.booleanisPresent(int t)Is there a stack at timepoint index t?voidreload()Invalidate cached source transformations, triggering a reload fromSpimData.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface bdv.viewer.Source
doBoundingBoxCulling, getType
-
-
-
-
Constructor Detail
-
AbstractSpimSource
public AbstractSpimSource(mpicbg.spim.data.generic.AbstractSpimData<?> spimData, int setupId, String name)
-
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint index- Returns:
- true, if there is data for timepoint index t.
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint indexlevel- mipmap level- Returns:
- the
stack.
-
getSource
public net.imglib2.RandomAccessibleInterval<T> getSource(int t, int level, ThreadGroup threadGroup)
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint indexlevel- mipmap levelmethod- interpolation method to use- Returns:
- the extended and interpolated
stack.
-
getInterpolatedSource
public net.imglib2.RealRandomAccessible<T> getInterpolatedSource(int t, int level, Interpolation method, ThreadGroup threadGroup)
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint indexlevel- mipmap leveltransform- is set to the source-to-global transform, that transforms source coordinates into the global coordinates
-
getName
public String getName()
Description copied from interface:SourceGet the name of the source.- Specified by:
getNamein interfaceSource<T extends net.imglib2.type.numeric.NumericType<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.numeric.NumericType<T>>- Returns:
- voxel size and unit or
null.
-
getNumMipmapLevels
public int getNumMipmapLevels()
- Specified by:
getNumMipmapLevelsin interfaceSource<T extends net.imglib2.type.numeric.NumericType<T>>
-
getSetupId
public int getSetupId()
-
reload
public void reload()
Invalidate cached source transformations, triggering a reload fromSpimData.Implementation Note: This method was added so that BigStitcher can trigger reloading source transforms from ViewRegistrations. It doesn't currently trigger update of anything else (MissingViews, available timepoints, etc.) However, if the need for these arises, this method would be a good place to put it.
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint indexlevel- mipmap level- Returns:
- the masked stack
-
getMaskedSource
public net.imglib2.RandomAccessibleInterval<? extends net.imglib2.type.mask.Masked<T>> getMaskedSource(int t, int level, ThreadGroup threadGroup)
-
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.numeric.NumericType<T>>- Parameters:
t- timepoint indexlevel- mipmap levelmethod- interpolation method to use- Returns:
- the extended and interpolated
stack.
-
getInterpolatedMaskedSource
public net.imglib2.RealRandomAccessible<? extends net.imglib2.type.mask.Masked<T>> getInterpolatedMaskedSource(int t, int level, Interpolation method, ThreadGroup threadGroup)
-
-