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, Typed<T>, 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.-
Field Summary
FieldsFields inherited from class 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) Represent an arbitraryRandomAccessibleIntervalas anImg, with a suitableImgFactoryfor its size and type, created byUtil.getSuitableImgFactory(net.imglib2.Dimensions, Object).wrap(RandomAccessibleInterval<T> accessible, ImgFactory<T> factory) Represent an arbitraryRandomAccessibleIntervalas anImg.Methods inherited from class IterableRandomAccessibleInterval
create, getType, iterationOrder, randomAccess, randomAccess, sizeMethods inherited from class AbstractWrappedInterval
dimension, dimensions, max, max, max, min, min, minMethods inherited from class AbstractWrappedRealInterval
getSource, numDimensions, realMax, realMax, realMax, realMin, realMin, realMinMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Dimensions
dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPointMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Interval
dimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMinMethods inherited from interface IterableInterval
localizingSpliterator, spliteratorMethods inherited from interface IterableRealInterval
firstElement, getType, iterator, parallelStream, streamMethods inherited from interface RandomAccessible
getAt, getAt, getAt, randomAccess, randomAccessMethods inherited from interface RandomAccessibleInterval
iterationOrder, sizeMethods inherited from interface RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
-
Field Details
-
factory
-
ii
-
-
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>>- Specified by:
cursorin interfaceRandomAccessibleInterval<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>>- Specified by:
localizingCursorin interfaceRandomAccessibleInterval<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
-
localizingCursor
Description copied from interface:SubIntervalIterable- Specified by:
localizingCursorin interfaceSubIntervalIterable<T extends Type<T>>- Parameters:
interval-Intervalover which to iterate- Returns:
Cursor
-
wrap
Represent an arbitraryRandomAccessibleIntervalas anImg, with a suitableImgFactoryfor its size and type, created byUtil.getSuitableImgFactory(net.imglib2.Dimensions, Object).- Parameters:
accessible- RandomAccessibleInterval which will be wrapped with an ImgView- Returns:
- RandomAccessibleInterval represented as an Img
- See Also:
-
wrap
public static <T extends Type<T>> Img<T> wrap(RandomAccessibleInterval<T> accessible, ImgFactory<T> factory) Represent an arbitraryRandomAccessibleIntervalas anImg.- Parameters:
accessible- RandomAccessibleInterval which will be wrapped with an ImgViewfactory- ImgFactory returned byfactory()- Returns:
- RandomAccessibleInterval represented as an Img
-