Package net.imglib2.view.iteration
Class IterableTransformBuilder<T>
- java.lang.Object
-
- net.imglib2.view.TransformBuilder<T>
-
- net.imglib2.view.iteration.IterableTransformBuilder<T>
-
public class IterableTransformBuilder<T> extends TransformBuilder<T>
Simplifies View cascades to provide the most efficientCursor
.- Author:
- Tobias Pietzsch
- See Also:
getEfficientIterableInterval(Interval, RandomAccessible)
-
-
Field Summary
Fields Modifier and Type Field Description protected Interval
interval
The interval which should be iterated.-
Fields inherited from class net.imglib2.view.TransformBuilder
boundingBox, source, transforms
-
-
Constructor Summary
Constructors Constructor Description IterableTransformBuilder(Interval interval, RandomAccessible<T> randomAccessible)
Create a new IterableTransformBuilder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IterableInterval<T>
buildIterableInterval()
Create anIterableInterval
on theInterval
specified in the constructor of theRandomAccessible
specified in the constructor.static <S> IterableInterval<S>
getEfficientIterableInterval(Interval interval, RandomAccessible<S> randomAccessible)
-
Methods inherited from class net.imglib2.view.TransformBuilder
build, getEfficientRandomAccessible, isComponentMapping, isIdentity, isSlicing, isTranslation, prependTransform, simplifyTransforms, visit, visitExtended, visitTransformed, wrapGenericTransform, wrapMixedTransform, wrapSlicingTransform, wrapTranslationTransform
-
-
-
-
Field Detail
-
interval
protected Interval interval
The interval which should be iterated.Currently, no transformations are done on this, because the cases where an optimized
IterableInterval
can be returned do not allow for any transformation except a single slicing. In the future, it may become necessary, to propagated the interval through the transforms down the view hierarchy.
-
-
Constructor Detail
-
IterableTransformBuilder
public IterableTransformBuilder(Interval interval, RandomAccessible<T> randomAccessible)
Create a new IterableTransformBuilder. This calls the the super constructor to gather and simplify transformations.- Parameters:
interval
- the interval ofrandomAccessible
which should be iterated.randomAccessible
- theRandomAccessible
that should be iterated.
-
-
Method Detail
-
getEfficientIterableInterval
public static <S> IterableInterval<S> getEfficientIterableInterval(Interval interval, RandomAccessible<S> randomAccessible)
Create anIterableInterval
that iterates anInterval
of aRandomAccessible
. If possible, this should return an optimized cursor. If not, falls back to creating anIterableRandomAccessibleInterval
.- Parameters:
interval
- the interval ofrandomAccessible
which should be iterated.randomAccessible
- theRandomAccessible
that should be iterated.- Returns:
- an
IterableInterval
that iteratesinterval
ofrandomAccessible
.
-
buildIterableInterval
public IterableInterval<T> buildIterableInterval()
Create anIterableInterval
on theInterval
specified in the constructor of theRandomAccessible
specified in the constructor.
-
-