Package net.imglib2.img
Class ImgView<T extends Type<T>>
- All Implemented Interfaces:
Iterable<T>,Dimensions,EuclideanSpace,Img<T>,Interval,IterableInterval<T>,IterableRealInterval<T>,RandomAccessible<T>,RandomAccessibleInterval<T>,RealInterval,View,SubIntervalIterable<T>
public class ImgView<T extends Type<T>>
extends IterableRandomAccessibleInterval<T>
implements Img<T>, SubIntervalIterable<T>
Allows a
RandomAccessibleInterval to be treated as an Img.- Author:
- Tobias Pietzsch, Christian Dietz
-
Field Summary
Fields inherited from class net.imglib2.AbstractWrappedRealInterval
sourceInterval -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()cursor()Returns aRealCursorthat iterates with optimal speed without calculating the location at each iteration step.factory()Get aImgFactorythat createsImgs of the same kind as this one.Returns aRealLocalizableIteratorthat calculates its location at each iteration step.localizingCursor(Interval interval) subIntervalIterationOrder(Interval interval) Returns the iteration order given the interval.booleansupportsOptimizedCursor(Interval interval) wrap(RandomAccessibleInterval<T> accessible, ImgFactory<T> factory) Represent an arbitrary RandomAccessibleInterval as an ImgMethods inherited from class net.imglib2.view.IterableRandomAccessibleInterval
create, firstElement, iterationOrder, iterator, randomAccess, randomAccess, sizeMethods inherited from class net.imglib2.AbstractWrappedInterval
dimension, dimensions, max, max, max, min, min, minMethods inherited from class net.imglib2.AbstractWrappedRealInterval
getSource, numDimensions, realMax, realMax, realMax, realMin, realMin, realMinMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.imglib2.Dimensions
dimension, dimensionsMethods inherited from interface net.imglib2.EuclideanSpace
numDimensionsMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface net.imglib2.IterableRealInterval
firstElement, iterationOrder, sizeMethods inherited from interface net.imglib2.RandomAccessible
randomAccess, randomAccess
-
Constructor Details
-
ImgView
Deprecated.View onImgwhich is defined by a given Interval, but still is anImg. Deprecation: Usewrap(RandomAccessibleInterval, ImgFactory)to represent a RandomAccessibleInterval as an Img- Parameters:
in- Source interval for the viewfac- T Factory to create img
-
-
Method Details
-
factory
Description copied from interface:ImgGet aImgFactorythat createsImgs of the same kind as this one. This is useful to create Imgs for temporary storage in generic methods where the specific Img type is unknown. Note, that the factory can be used even if all references to this Img have been invalidated. -
copy
-
cursor
Description copied from interface:IterableRealIntervalReturns a
RealCursorthat iterates with optimal speed without calculating the location at each iteration step. Localization is performed on demand.Use this where localization is required rarely/ not for each iteration.
- Specified by:
cursorin interfaceIterableInterval<T extends Type<T>>- Specified by:
cursorin interfaceIterableRealInterval<T extends Type<T>>- Overrides:
cursorin classIterableRandomAccessibleInterval<T extends Type<T>>- Returns:
- fast iterating iterator
-
localizingCursor
Description copied from interface:IterableRealIntervalReturns a
RealLocalizableIteratorthat calculates its location at each iteration step. That is, localization is performed with optimal speed.Use this where localization is required often/ for each iteration.
- Specified by:
localizingCursorin interfaceIterableInterval<T extends Type<T>>- Specified by:
localizingCursorin interfaceIterableRealInterval<T extends Type<T>>- Overrides:
localizingCursorin classIterableRandomAccessibleInterval<T extends Type<T>>- Returns:
- fast localizing iterator
-
supportsOptimizedCursor
Description copied from interface:SubIntervalIterable- Specified by:
supportsOptimizedCursorin interfaceSubIntervalIterable<T extends Type<T>>- Parameters:
interval- to be checked- Returns:
- true if a
Cursorcan be optimized given theInterval
-
subIntervalIterationOrder
Description copied from interface:SubIntervalIterableReturns the iteration order given the interval.- Specified by:
subIntervalIterationOrderin interfaceSubIntervalIterable<T extends Type<T>>- Parameters:
interval-Intervalover which to iterate- Returns:
- the iteration order object @see
IterableRealInterval
-
cursor
Description copied from interface:SubIntervalIterable -
localizingCursor
Description copied from interface:SubIntervalIterable- Specified by:
localizingCursorin interfaceSubIntervalIterable<T extends Type<T>>- Parameters:
interval-Intervalover which to iterate- Returns:
Cursor
-
wrap
public static <T extends Type<T>> Img<T> wrap(RandomAccessibleInterval<T> accessible, ImgFactory<T> factory) Represent an arbitrary RandomAccessibleInterval as an Img- Parameters:
accessible- RandomAccessibleInterval which will be wrapped with an ImgViewfactory- ImgFactory returned byfactory()- Returns:
- RandomAccessibleInterval represented as an Img
-