T
- the type of the original source.public class TransformedSource<T> extends Object implements Source<T>, MipmapOrdering
Source
that wraps another Source
and allows to decorate it
with an extra AffineTransform3D
.
This extra transformation is made to capture manual editing of the actual transform in the SpimViewer.
MipmapOrdering.Level, MipmapOrdering.MipmapHints, MipmapOrdering.PrefetchOrderComparator, MipmapOrdering.RenderOrderComparator
Modifier and Type | Field and Description |
---|---|
protected AffineTransform3D |
composed
temporary.
|
protected AffineTransform3D |
fixedTransform
Fixed part of the extra transformation.
|
protected AffineTransform3D |
incrementalTransform
Incremental part of the extra transformation.
|
protected Source<T> |
source |
protected MipmapOrdering |
sourceMipmapOrdering
|
protected AffineTransform3D |
sourceTransform
Extra transformation.
|
prefetchOrderComparator, renderOrderComparator
Constructor and Description |
---|
TransformedSource(Source<T> source)
Instantiates a new
TransformedSource wrapping the specified
source with the identity transform. |
TransformedSource(Source<T> source,
TransformedSource<?> shareTransform) |
Modifier and Type | Method and Description |
---|---|
boolean |
doBoundingBoxCulling()
Whether this source participates in bounding box culling.
|
void |
getFixedTransform(AffineTransform3D transform)
Get the fixed part of the extra transformation.
|
void |
getIncrementalTransform(AffineTransform3D transform)
Get the incremental part of the extra transformation.
|
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. |
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?
|
void |
setFixedTransform(AffineTransform3D transform)
Sets the fixed part of the extra transformation to the specified
transform.
|
void |
setIncrementalTransform(AffineTransform3D transform)
Sets the incremental part of the extra transformation to the specified
transform.
|
protected final MipmapOrdering sourceMipmapOrdering
protected final AffineTransform3D incrementalTransform
protected final AffineTransform3D fixedTransform
protected final AffineTransform3D sourceTransform
incrementalTransform
*
fixedTransform
.protected final AffineTransform3D composed
sourceTransform
and the transform
obtained from the decorated source.public TransformedSource(Source<T> source)
TransformedSource
wrapping the specified
source with the identity transform.source
- the source to wrap.public TransformedSource(Source<T> source, TransformedSource<?> shareTransform)
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 setFixedTransform(AffineTransform3D transform)
The extra transformation applied by the TransformedSource
is a
concatenation of an incremental
and a fixed
transform.
transform
- is copied to the fixed
transform.public void getFixedTransform(AffineTransform3D transform)
The extra transformation applied by the TransformedSource
is a
concatenation of an incremental
and this fixed transform.
transform
- is set to the fixed transform.public void setIncrementalTransform(AffineTransform3D transform)
The extra transformation applied by the TransformedSource
is a
concatenation of an incremental
and a fixed
transform.
transform
- is copied to the incremental
transform.public void getIncrementalTransform(AffineTransform3D transform)
The extra transformation applied by the TransformedSource
is a
concatenation of this incremental transform and a
fixed
transform.
transform
- is set to the incremental transform.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 boolean isPresent(int t)
Source
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 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.