public class WarpedSource<T> extends Object implements Source<T>, MipmapOrdering
MipmapOrdering.Level, MipmapOrdering.MipmapHints, MipmapOrdering.PrefetchOrderComparator, MipmapOrdering.RenderOrderComparator
prefetchOrderComparator, renderOrderComparator
Constructor and Description |
---|
WarpedSource(Source<T> source,
String name) |
WarpedSource(Source<T> source,
String name,
Supplier<Boolean> doBoundingBoxCulling) |
Modifier and Type | Method and Description |
---|---|
boolean |
doBoundingBoxCulling()
Whether this source participates in bounding box culling.
|
RealRandomAccessible<T> |
getInterpolatedSource(int t,
int level,
Interpolation method)
Get the 3D stack at timepoint index t, extended to infinity and interpolated.
|
MipmapOrdering.MipmapHints |
getMipmapHints(AffineTransform3D screenTransform,
int timepoint,
int previousTimepoint)
Evaluate mipmap levels such that they can be ordered for rendering and/or
prefetching.
|
String |
getName()
Get the name of the source.
|
int |
getNumMipmapLevels() |
RandomAccessibleInterval<T> |
getSource(int t,
int level)
Get the 3D stack at timepoint index t.
|
void |
getSourceTransform(int t,
int level,
AffineTransform3D transform)
Get the transform from the
source at the
given timepoint index and mipmap level into the global coordinate system. |
RealTransform |
getTransform() |
T |
getType()
Get an instance of the pixel type.
|
VoxelDimensions |
getVoxelDimensions()
Get voxel size and unit for this source.
|
Source<T> |
getWrappedSource() |
boolean |
isPresent(int t)
Is there a stack at timepoint index t?
|
boolean |
isTransformed() |
void |
setIsTransformed(boolean isTransformed) |
void |
updateTransform(RealTransform xfm) |
static <T> SourceAndConverter<T> |
wrap(SourceAndConverter<T> wrap,
String name,
int ndims) |
public static <T> SourceAndConverter<T> wrap(SourceAndConverter<T> wrap, String name, int ndims)
public boolean isPresent(int t)
Source
public boolean doBoundingBoxCulling()
Source
If true
, then this source will only be rendered if its bounding
box, i.e., the interval of Source.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.)
doBoundingBoxCulling
in interface Source<T>
true
, if this source participates in bounding box culling.public void updateTransform(RealTransform xfm)
public void setIsTransformed(boolean isTransformed)
public boolean isTransformed()
public RandomAccessibleInterval<T> getSource(int t, int level)
Source
public RealRandomAccessible<T> getInterpolatedSource(int t, int level, Interpolation method)
Source
getInterpolatedSource
in interface Source<T>
t
- timepoint indexlevel
- mipmap levelmethod
- interpolation method to usestack
.public void getSourceTransform(int t, int level, AffineTransform3D transform)
Source
source
at the
given timepoint index and mipmap level into the global coordinate system.getSourceTransform
in interface Source<T>
t
- timepoint indexlevel
- mipmap leveltransform
- is set to the source-to-global transform, that transforms
source coordinates into the global coordinatespublic RealTransform getTransform()
public T getType()
Source
public String getName()
Source
public VoxelDimensions getVoxelDimensions()
Source
getVoxelDimensions
in interface Source<T>
null
.public int getNumMipmapLevels()
getNumMipmapLevels
in interface Source<T>
public MipmapOrdering.MipmapHints getMipmapHints(AffineTransform3D screenTransform, int timepoint, int previousTimepoint)
MipmapOrdering
getMipmapHints
in interface MipmapOrdering
screenTransform
- transforms screen coordinates to global coordinates.timepoint
- current timepoint indexpreviousTimepoint
- previous timepoint indexCopyright © 2015–2021 Fiji. All rights reserved.