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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classIterableTransformBuilder.IterableIntervalViewprivate classIterableTransformBuilder.SliceAnIterableIntervalon a slice of aSubIntervalIterable.private classIterableTransformBuilder.SubInterval
-
Field Summary
Fields Modifier and Type Field Description protected IntervalintervalThe 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 anIterableIntervalon theIntervalspecified in the constructor of theRandomAccessiblespecified 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
IterableIntervalcan 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 ofrandomAccessiblewhich should be iterated.randomAccessible- theRandomAccessiblethat should be iterated.
-
-
Method Detail
-
getEfficientIterableInterval
public static <S> IterableInterval<S> getEfficientIterableInterval(Interval interval, RandomAccessible<S> randomAccessible)
Create anIterableIntervalthat iterates anIntervalof aRandomAccessible. If possible, this should return an optimized cursor. If not, falls back to creating anIterableRandomAccessibleInterval.- Parameters:
interval- the interval ofrandomAccessiblewhich should be iterated.randomAccessible- theRandomAccessiblethat should be iterated.- Returns:
- an
IterableIntervalthat iteratesintervalofrandomAccessible.
-
buildIterableInterval
public IterableInterval<T> buildIterableInterval()
Create anIterableIntervalon theIntervalspecified in the constructor of theRandomAccessiblespecified in the constructor.
-
-