public class ImgView<T extends Type<T>> extends IterableRandomAccessibleInterval<T> implements Img<T>, SubIntervalIterable<T>
RandomAccessibleInterval
to be treated as an Img
.sourceInterval
Constructor and Description |
---|
ImgView(RandomAccessibleInterval<T> in,
ImgFactory<T> fac)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Img<T> |
copy() |
Cursor<T> |
cursor()
Returns a
RealCursor that iterates with optimal speed without
calculating the location at each iteration step. |
Cursor<T> |
cursor(Interval interval)
|
ImgFactory<T> |
factory()
Get a
ImgFactory that creates Img s of the same kind as
this one. |
Cursor<T> |
localizingCursor()
Returns a
RealLocalizable Iterator that calculates its
location at each iteration step. |
Cursor<T> |
localizingCursor(Interval interval)
|
Object |
subIntervalIterationOrder(Interval interval)
Returns the iteration order given the interval.
|
boolean |
supportsOptimizedCursor(Interval interval)
|
static <T extends Type<T>> |
wrap(RandomAccessibleInterval<T> accessible)
Represent an arbitrary
RandomAccessibleInterval as an
Img , with a suitable ImgFactory for its size and type,
created by
Util.getSuitableImgFactory(net.imglib2.Dimensions, Object) . |
static <T extends Type<T>> |
wrap(RandomAccessibleInterval<T> accessible,
ImgFactory<T> factory)
Represent an arbitrary
RandomAccessibleInterval as an
Img . |
create, firstElement, iterationOrder, iterator, randomAccess, randomAccess, size
dimension, dimensions, max, max, max, min, min, min
getSource, numDimensions, realMax, realMax, realMax, realMin, realMin, realMin
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAt, getAt, getAt, randomAccess, randomAccess
firstElement, iterationOrder, size
forEach, iterator, spliterator
dimension, max, max, max, maxAsLongArray, maxAsPoint, min, min, min, minAsLongArray, minAsPoint, realMax, realMin
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
allPositive, allPositive, dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositive
numDimensions
@Deprecated public ImgView(RandomAccessibleInterval<T> in, ImgFactory<T> fac)
Img
which is defined by a given Interval, but still is an
Img
.
Deprecation: Use
wrap(RandomAccessibleInterval, ImgFactory)
to represent a
RandomAccessibleInterval as an Imgin
- Source interval for the viewfac
- T Factory to create imgpublic ImgFactory<T> factory()
Img
ImgFactory
that creates Img
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.public Cursor<T> cursor()
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.
cursor
in interface IterableInterval<T extends Type<T>>
cursor
in interface IterableRealInterval<T extends Type<T>>
cursor
in class IterableRandomAccessibleInterval<T extends Type<T>>
public Cursor<T> localizingCursor()
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.
localizingCursor
in interface IterableInterval<T extends Type<T>>
localizingCursor
in interface IterableRealInterval<T extends Type<T>>
localizingCursor
in class IterableRandomAccessibleInterval<T extends Type<T>>
public boolean supportsOptimizedCursor(Interval interval)
SubIntervalIterable
supportsOptimizedCursor
in interface SubIntervalIterable<T extends Type<T>>
interval
- to be checkedCursor
can be optimized given the
Interval
public Object subIntervalIterationOrder(Interval interval)
SubIntervalIterable
subIntervalIterationOrder
in interface SubIntervalIterable<T extends Type<T>>
interval
- Interval
over which to iterateIterableRealInterval
public Cursor<T> cursor(Interval interval)
SubIntervalIterable
public Cursor<T> localizingCursor(Interval interval)
SubIntervalIterable
localizingCursor
in interface SubIntervalIterable<T extends Type<T>>
interval
- Interval
over which to iterateCursor
public static <T extends Type<T>> Img<T> wrap(RandomAccessibleInterval<T> accessible)
RandomAccessibleInterval
as an
Img
, with a suitable ImgFactory
for its size and type,
created by
Util.getSuitableImgFactory(net.imglib2.Dimensions, Object)
.accessible
- RandomAccessibleInterval which will be wrapped with an ImgViewUtil.getSuitableImgFactory(net.imglib2.Dimensions, Object)
public static <T extends Type<T>> Img<T> wrap(RandomAccessibleInterval<T> accessible, ImgFactory<T> factory)
RandomAccessibleInterval
as an
Img
.accessible
- RandomAccessibleInterval which will be wrapped with an ImgViewfactory
- ImgFactory returned by factory()
Copyright © 2015–2022 ImgLib2. All rights reserved.