Package net.imglib2.img
Class ImgView<T extends Type<T>>
java.lang.Object
net.imglib2.AbstractWrappedRealInterval<I>
net.imglib2.AbstractWrappedInterval<RandomAccessibleInterval<T>>
net.imglib2.view.IterableRandomAccessibleInterval<T>
net.imglib2.img.ImgView<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 aRealCursor
that iterates with optimal speed without calculating the location at each iteration step.factory()
Get aImgFactory
that createsImg
s of the same kind as this one.Returns aRealLocalizable
Iterator
that calculates its location at each iteration step.localizingCursor
(Interval interval) subIntervalIterationOrder
(Interval interval) Returns the iteration order given the interval.boolean
supportsOptimizedCursor
(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, size
Methods inherited from class net.imglib2.AbstractWrappedInterval
dimension, dimensions, max, max, max, min, min, min
Methods inherited from class net.imglib2.AbstractWrappedRealInterval
getSource, numDimensions, realMax, realMax, realMax, realMin, realMin, realMin
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.imglib2.Dimensions
dimension, dimensions
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface net.imglib2.IterableRealInterval
firstElement, iterationOrder, size
Methods inherited from interface net.imglib2.RandomAccessible
randomAccess, randomAccess
-
Constructor Details
-
ImgView
Deprecated.View onImg
which 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:Img
Get aImgFactory
that createsImg
s 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:IterableRealInterval
Returns a
RealCursor
that 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:
cursor
in interfaceIterableInterval<T extends Type<T>>
- Specified by:
cursor
in interfaceIterableRealInterval<T extends Type<T>>
- Overrides:
cursor
in classIterableRandomAccessibleInterval<T extends Type<T>>
- Returns:
- fast iterating iterator
-
localizingCursor
Description copied from interface:IterableRealInterval
Returns a
RealLocalizable
Iterator
that 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:
localizingCursor
in interfaceIterableInterval<T extends Type<T>>
- Specified by:
localizingCursor
in interfaceIterableRealInterval<T extends Type<T>>
- Overrides:
localizingCursor
in classIterableRandomAccessibleInterval<T extends Type<T>>
- Returns:
- fast localizing iterator
-
supportsOptimizedCursor
Description copied from interface:SubIntervalIterable
- Specified by:
supportsOptimizedCursor
in interfaceSubIntervalIterable<T extends Type<T>>
- Parameters:
interval
- to be checked- Returns:
- true if a
Cursor
can be optimized given theInterval
-
subIntervalIterationOrder
Description copied from interface:SubIntervalIterable
Returns the iteration order given the interval.- Specified by:
subIntervalIterationOrder
in interfaceSubIntervalIterable<T extends Type<T>>
- Parameters:
interval
-Interval
over which to iterate- Returns:
- the iteration order object @see
IterableRealInterval
-
cursor
Description copied from interface:SubIntervalIterable
-
localizingCursor
Description copied from interface:SubIntervalIterable
- Specified by:
localizingCursor
in interfaceSubIntervalIterable<T extends Type<T>>
- Parameters:
interval
-Interval
over 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
-