public class Views extends Object
RandomAccessibles.
A view is itself a RandomAccessible or
RandomAccessibleInterval that provides accessors
that transform coordinates on-the-fly without copying the underlying data.
Consecutive transformations are concatenated and simplified to provide
optimally efficient accessors. Note, that accessors provided by a view are
read/write. Changing pixels in a view changes the underlying image data.| Constructor and Description |
|---|
Views() |
| Modifier and Type | Method and Description |
|---|---|
static <T> MixedTransformView<T> |
addDimension(RandomAccessible<T> randomAccessible)
Create view which adds a dimension to the source
RandomAccessible
. |
static <T> IntervalView<T> |
addDimension(RandomAccessibleInterval<T> interval,
long minOfNewDim,
long maxOfNewDim)
Create view which adds a dimension to the source
RandomAccessibleInterval. |
static <T> CompositeView<T,? extends GenericComposite<T>> |
collapse(RandomAccessible<T> source)
Collapse the nth dimension of an n
-dimensional
RandomAccessible<T> into an (n
-1)-dimensional RandomAccessible<GenericComposite
<T>> |
static <T> CompositeIntervalView<T,? extends GenericComposite<T>> |
collapse(RandomAccessibleInterval<T> source)
Collapse the nth dimension of an n
-dimensional
RandomAccessibleInterval<T> into an (
n-1)-dimensional RandomAccessibleInterval<
GenericComposite<T>> |
static <T extends NumericType<T>> |
collapseNumeric(RandomAccessible<T> source,
int numChannels)
Collapse the nth dimension of an n
-dimensional
RandomAccessible<T extends NumericType
<T>> into an (n-1)-dimensional RandomAccessible
<NumericComposite<T>> |
static <T extends NumericType<T>> |
collapseNumeric(RandomAccessibleInterval<T> source)
Collapse the nth dimension of an n
-dimensional
RandomAccessibleInterval<T extends
NumericType<T>> into an (n-1)-dimensional
RandomAccessibleInterval<NumericComposite<T>> |
static <T extends RealType<T>> |
collapseReal(RandomAccessible<T> source,
int numChannels)
Collapse the nth dimension of an n
-dimensional
RandomAccessible<T extends RealType
<T>> into an (n-1)-dimensional RandomAccessible
<RealComposite<T>> |
static <T extends RealType<T>> |
collapseReal(RandomAccessibleInterval<T> source)
Collapse the nth dimension of an n
-dimensional
RandomAccessibleInterval<T extends
RealType<T>> into an (n-1)-dimensional
RandomAccessibleInterval<RealComposite<T>> |
static <T> RandomAccessibleInterval<T> |
concatenate(int concatenationAxis,
List<? extends RandomAccessibleInterval<T>> sources)
Concatenate a list of
RandomAccessibleInterval along the provided
concatenationAxis. |
static <T> RandomAccessibleInterval<T> |
concatenate(int concatenationAxis,
RandomAccessibleInterval<T>... sources)
Concatenate an array of
RandomAccessibleInterval along the
provided concatenationAxis. |
static <T> RandomAccessibleInterval<T> |
concatenate(int concatenationAxis,
StackView.StackAccessMode mode,
List<? extends RandomAccessibleInterval<T>> sources)
Concatenate a list of
RandomAccessibleInterval along the provided
concatenationAxis. |
static <T> RandomAccessibleInterval<T> |
concatenate(int concatenationAxis,
StackView.StackAccessMode mode,
RandomAccessibleInterval<T>... sources)
Concatenate an array of
RandomAccessibleInterval along the
provided concatenationAxis. |
static <T> RandomAccessibleInterval<T> |
dropSingletonDimensions(RandomAccessibleInterval<T> source)
Removes all unit dimensions (dimensions with size one) from the
RandomAccessibleInterval
|
static <T,F extends RandomAccessibleInterval<T>> |
expand(F source,
OutOfBoundsFactory<T,? super F> oob,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T> IntervalView<T> |
expandBorder(RandomAccessibleInterval<T> source,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T> IntervalView<T> |
expandMirrorDouble(RandomAccessibleInterval<T> source,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T> IntervalView<T> |
expandMirrorSingle(RandomAccessibleInterval<T> source,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T> IntervalView<T> |
expandPeriodic(RandomAccessibleInterval<T> source,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends RealType<T>> |
expandRandom(RandomAccessibleInterval<T> source,
double min,
double max,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends BooleanType<T>> |
expandValue(RandomAccessibleInterval<T> source,
boolean value,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends RealType<T>> |
expandValue(RandomAccessibleInterval<T> source,
double value,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends RealType<T>> |
expandValue(RandomAccessibleInterval<T> source,
float value,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends IntegerType<T>> |
expandValue(RandomAccessibleInterval<T> source,
int value,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends IntegerType<T>> |
expandValue(RandomAccessibleInterval<T> source,
long value,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T> IntervalView<T> |
expandValue(RandomAccessibleInterval<T> source,
T t,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T extends Type<T>> |
expandValue(RandomAccessibleInterval<T> source,
T t,
long... border)
Deprecated.
use
expandValue with unbounded type parameter T |
static <T extends NumericType<T>> |
expandZero(RandomAccessibleInterval<T> source,
long... border)
Expand a RandomAccessibleInterval as specified by border.
|
static <T,F extends RandomAccessibleInterval<T>> |
extend(F source,
OutOfBoundsFactory<T,? super F> factory)
Extend a RandomAccessibleInterval with an out-of-bounds strategy.
|
static <T,F extends RandomAccessibleInterval<T>> |
extendBorder(F source)
Extend a RandomAccessibleInterval with an out-of-bounds strategy to
repeat border pixels.
|
static <T,F extends RandomAccessibleInterval<T>> |
extendMirrorDouble(F source)
Extend a RandomAccessibleInterval with a mirroring out-of-bounds
strategy.
|
static <T,F extends RandomAccessibleInterval<T>> |
extendMirrorSingle(F source)
Extend a RandomAccessibleInterval with a mirroring out-of-bounds
strategy.
|
static <T,F extends RandomAccessibleInterval<T>> |
extendPeriodic(F source)
Extend a RandomAccessibleInterval with a periodic out-of-bounds strategy.
|
static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> |
extendRandom(F source,
double min,
double max)
Extend a RandomAccessibleInterval with a random-value out-of-bounds
strategy.
|
static <T extends BooleanType<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
boolean value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
double value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
float value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends IntegerType<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
int value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends IntegerType<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
long value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends Type<T>,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
T value)
Deprecated.
use
extendValue with unbounded type parameter T |
static <T,F extends RandomAccessibleInterval<T>> |
extendValue(F source,
T value)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy.
|
static <T extends NumericType<T>,F extends RandomAccessibleInterval<T>> |
extendZero(F source)
Extend a RandomAccessibleInterval with a constant-value out-of-bounds
strategy where the constant value is the zero-element of the data type.
|
static <T> IterableInterval<T> |
flatIterable(RandomAccessibleInterval<T> randomAccessibleInterval)
Return an
IterableInterval having FlatIterationOrder. |
static <T> MixedTransformView<T> |
hyperSlice(RandomAccessible<T> view,
int d,
long pos)
take a (n-1)-dimensional slice of a n-dimensional view, fixing
d-component of coordinates to pos.
|
static <T> IntervalView<T> |
hyperSlice(RandomAccessibleInterval<T> view,
int d,
long pos)
take a (n-1)-dimensional slice of a n-dimensional view, fixing
d-component of coordinates to pos.
|
static <T> RandomAccessible<? extends RandomAccessible<T>> |
hyperSlices(RandomAccessible<T> source,
int... axes)
Provide an (n + m)-dimensional
RandomAccessible of T as
an m-dimensional RandomAccessible of
n-dimensional RandomAccessibles of T. |
static <T,F extends EuclideanSpace> |
interpolate(F source,
InterpolatorFactory<T,F> factory)
Returns a
RealRandomAccessible using interpolation |
static <T> IntervalView<T> |
interval(RandomAccessible<T> randomAccessible,
Interval interval)
Define an interval on a RandomAccessible.
|
static <T> IntervalView<T> |
interval(RandomAccessible<T> randomAccessible,
long[] min,
long[] max)
Define an interval on a RandomAccessible.
|
static <T> MixedTransformView<T> |
invertAxis(RandomAccessible<T> randomAccessible,
int d)
Invert the d-axis.
|
static <T> IntervalView<T> |
invertAxis(RandomAccessibleInterval<T> interval,
int d)
Invert the d-axis.
|
static boolean |
isZeroMin(Interval interval)
test whether the source interval starts at (0,0,...,0)
|
static <T> IterableInterval<T> |
iterable(RandomAccessibleInterval<T> randomAccessibleInterval)
Return an
IterableInterval. |
static <T> RandomAccessible<T> |
moveAxis(RandomAccessible<T> image,
int fromAxis,
int toAxis)
Create view with permuted axes.
|
static <T> RandomAccessibleInterval<T> |
moveAxis(RandomAccessibleInterval<T> image,
int fromAxis,
int toAxis)
Create view with permuted axes.
|
static <T> MixedTransformView<T> |
offset(RandomAccessible<T> randomAccessible,
long... offset)
Deprecated.
Please use
translateInverse(RandomAccessible, long...)
instead. |
static <T> IntervalView<T> |
offset(RandomAccessibleInterval<T> interval,
long... offset)
Deprecated.
Please use
translateInverse(RandomAccessibleInterval, long...)
instead. |
static <T> IntervalView<T> |
offsetInterval(RandomAccessible<T> randomAccessible,
Interval interval)
Define an interval on a RandomAccessible and translate it such that the
min corner is at the origin.
|
static <T> IntervalView<T> |
offsetInterval(RandomAccessible<T> randomAccessible,
long[] offset,
long[] dimension)
Define an interval on a RandomAccessible and translate it such that the
min corner is at the origin.
|
static <A,B> RandomAccessible<Pair<A,B>> |
pair(RandomAccessible<A> sourceA,
RandomAccessible<B> sourceB)
|
static <T> MixedTransformView<T> |
permute(RandomAccessible<T> randomAccessible,
int fromAxis,
int toAxis)
Create view with permuted axes.
|
static <T> IntervalView<T> |
permute(RandomAccessibleInterval<T> interval,
int fromAxis,
int toAxis)
Create view with permuted axes.
|
static <T> IntervalView<T> |
permuteCoordinateInverse(RandomAccessibleInterval<T> source,
int[] permutation,
int d)
Deprecated.
|
static <T> IntervalView<T> |
permuteCoordinates(RandomAccessibleInterval<T> source,
int[] permutation)
Bijective permutation of the integer coordinates in each dimension of a
RandomAccessibleInterval. |
static <T> IntervalView<T> |
permuteCoordinates(RandomAccessibleInterval<T> source,
int[] permutation,
int d)
Bijective permutation of the integer coordinates of one dimension of a
RandomAccessibleInterval. |
static <T> IntervalView<T> |
permuteCoordinatesInverse(RandomAccessibleInterval<T> source,
int[] permutation)
Inverse Bijective permutation of the integer coordinates in each
dimension of a
RandomAccessibleInterval. |
static <T> IntervalView<T> |
permuteCoordinatesInverse(RandomAccessibleInterval<T> source,
int[] permutation,
int d)
Inverse bijective permutation of the integer coordinates of one dimension
of a
RandomAccessibleInterval. |
static <T> RandomAccessibleOnRealRandomAccessible<T> |
raster(RealRandomAccessible<T> source)
Turns a
RealRandomAccessible into a RandomAccessible,
providing RandomAccess at integer coordinates. |
static <T> MixedTransformView<T> |
rotate(RandomAccessible<T> randomAccessible,
int fromAxis,
int toAxis)
Create view that is rotated by 90 degrees.
|
static <T> IntervalView<T> |
rotate(RandomAccessibleInterval<T> interval,
int fromAxis,
int toAxis)
Create view that is rotated by 90 degrees.
|
static <T> IntervalView<T> |
shear(RandomAccessible<T> source,
Interval interval,
int shearDimension,
int referenceDimension)
Positive shear transform of a RandomAccessible using
ShearTransform, i.e. |
static <T> TransformView<T> |
shear(RandomAccessible<T> source,
int shearDimension,
int referenceDimension)
Positive shear transform of a RandomAccessible using
ShearTransform, i.e. |
static <T> RandomAccessibleInterval<T> |
stack(List<? extends RandomAccessibleInterval<T>> hyperslices)
Form a (n+1)-dimensional
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals. |
static <T> RandomAccessibleInterval<T> |
stack(RandomAccessibleInterval<T>... hyperslices)
Form a (n+1)-dimensional
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals. |
static <T> RandomAccessibleInterval<T> |
stack(StackView.StackAccessMode stackAccessMode,
List<? extends RandomAccessibleInterval<T>> hyperslices)
Form a (n+1)-dimensional
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals. |
static <T> RandomAccessibleInterval<T> |
stack(StackView.StackAccessMode stackAccessMode,
RandomAccessibleInterval<T>... hyperslices)
Form a (n+1)-dimensional
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals. |
static <T> SubsampleView<T> |
subsample(RandomAccessible<T> source,
long... steps)
Sample only every stepdth value of a
source
RandomAccessible. |
static <T> SubsampleView<T> |
subsample(RandomAccessible<T> source,
long step)
Sample only every stepth value of a source
RandomAccessible. |
static <T> SubsampleIntervalView<T> |
subsample(RandomAccessibleInterval<T> source,
long... steps)
Sample only every stepdth value of a
source
RandomAccessibleInterval. |
static <T> SubsampleIntervalView<T> |
subsample(RandomAccessibleInterval<T> source,
long step)
Sample only every stepth value of a source
RandomAccessibleInterval. |
static <T> MixedTransformView<T> |
translate(RandomAccessible<T> randomAccessible,
long... translation)
Translate the source view by the given translation vector.
|
static <T> IntervalView<T> |
translate(RandomAccessibleInterval<T> interval,
long... translation)
Translate the source view by the given translation vector.
|
static <T> MixedTransformView<T> |
translateInverse(RandomAccessible<T> randomAccessible,
long... translation)
Translate the source view by the given inverse translation vector.
|
static <T> IntervalView<T> |
translateInverse(RandomAccessibleInterval<T> interval,
long... translation)
Translate the source view by the given inverse translation vector.
|
static <T> IntervalView<T> |
unshear(RandomAccessible<T> source,
Interval interval,
int shearDimension,
int referenceDimension)
Negative shear transform of a RandomAccessible using
InverseShearTransform, i.e. |
static <T> TransformView<T> |
unshear(RandomAccessible<T> source,
int shearDimension,
int referenceDimension)
Negative shear transform of a RandomAccessible using
InverseShearTransform, i.e. |
static <T> IntervalView<T> |
zeroMin(RandomAccessibleInterval<T> interval)
Translate the source such that the upper left corner is at the origin
|
public static <T,F extends EuclideanSpace> RealRandomAccessible<T> interpolate(F source, InterpolatorFactory<T,F> factory)
RealRandomAccessible using interpolationsource - the EuclideanSpace to be interpolatedfactory - the InterpolatorFactory to provide interpolators for
sourcepublic static <T> RandomAccessibleOnRealRandomAccessible<T> raster(RealRandomAccessible<T> source)
RealRandomAccessible into a RandomAccessible,
providing RandomAccess at integer coordinates.source - the RealRandomAccessible to be rasterized.RandomAccessibleOnRealRandomAccessible wrapping source.interpolate(net.imglib2.EuclideanSpace,
net.imglib2.interpolation.InterpolatorFactory)public static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extend(F source, OutOfBoundsFactory<T,? super F> factory)
source - the interval to extend.factory - the out-of-bounds strategy.public static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendMirrorSingle(F source)
source - the interval to extend.OutOfBoundsMirrorSingleBoundarypublic static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendMirrorDouble(F source)
source - the interval to extend.OutOfBoundsMirrorDoubleBoundarypublic static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, T value)
source - the interval to extend.OutOfBoundsConstantValue@Deprecated public static <T extends Type<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, T value)
extendValue with unbounded type parameter Tsource - the interval to extend.OutOfBoundsConstantValuepublic static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, float value)
source - the interval to extend.value - the extension valueOutOfBoundsConstantValuepublic static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, double value)
source - the interval to extend.value - the extension valueOutOfBoundsConstantValuepublic static <T extends IntegerType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, int value)
source - the interval to extend.value - the extension valueOutOfBoundsConstantValuepublic static <T extends IntegerType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, long value)
source - the interval to extend.value - the extension valueOutOfBoundsConstantValuepublic static <T extends BooleanType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendValue(F source, boolean value)
source - the interval to extend.value - the extension valueOutOfBoundsConstantValuepublic static <T extends NumericType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendZero(F source)
source - the interval to extend.OutOfBoundsConstantValuepublic static <T extends RealType<T>,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendRandom(F source, double min, double max)
source - the interval to extend.min - the minimal random valuemax - the maximal random valueOutOfBoundsRandomValuepublic static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendPeriodic(F source)
source - the interval to extend.OutOfBoundsPeriodicpublic static <T,F extends RandomAccessibleInterval<T>> ExtendedRandomAccessibleInterval<T,F> extendBorder(F source)
source - the interval to extend.OutOfBoundsBorderpublic static <T> IntervalView<T> interval(RandomAccessible<T> randomAccessible, long[] min, long[] max)
randomAccessible - the sourcemin - lower bound of intervalmax - upper bound of intervalpublic static <T> IntervalView<T> interval(RandomAccessible<T> randomAccessible, Interval interval)
randomAccessible - the sourceinterval - interval boundaries.public static <T> MixedTransformView<T> rotate(RandomAccessible<T> randomAccessible, int fromAxis, int toAxis)
public static <T> IntervalView<T> rotate(RandomAccessibleInterval<T> interval, int fromAxis, int toAxis)
public static <T> MixedTransformView<T> permute(RandomAccessible<T> randomAccessible, int fromAxis, int toAxis)
public static <T> IntervalView<T> permute(RandomAccessibleInterval<T> interval, int fromAxis, int toAxis)
public static <T> RandomAccessible<T> moveAxis(RandomAccessible<T> image, int fromAxis, int toAxis)
public static <T> RandomAccessibleInterval<T> moveAxis(RandomAccessibleInterval<T> image, int fromAxis, int toAxis)
public static <T> MixedTransformView<T> translate(RandomAccessible<T> randomAccessible, long... translation)
randomAccessible - the sourcetranslation - translation vector of the source view. The pixel at x
in the source view becomes (x + translation) in the
resulting view.public static <T> IntervalView<T> translate(RandomAccessibleInterval<T> interval, long... translation)
interval - the sourcetranslation - translation vector of the source view. The pixel at x
in the source view becomes (x + translation) in the
resulting view.public static <T> MixedTransformView<T> translateInverse(RandomAccessible<T> randomAccessible, long... translation)
The effect is that the pixel at translation in
randomAccessible is at the origin in the resulting view.
randomAccessible - the sourcetranslation - inverse translation vector of the source view. The pixel at
x in the source view becomes (x -
translation) in the resulting view.public static <T> IntervalView<T> translateInverse(RandomAccessibleInterval<T> interval, long... translation)
The effect is that the pixel at translation in interval
is at the origin in the resulting view.
interval - the sourcetranslation - inverse translation vector of the source view. The pixel at
x in the source view becomes (x -
translation) in the resulting view.@Deprecated public static <T> MixedTransformView<T> offset(RandomAccessible<T> randomAccessible, long... offset)
translateInverse(RandomAccessible, long...)
instead.randomAccessible - the sourceoffset - offset of the source view. The pixel at offset becomes the
origin of resulting view.@Deprecated public static <T> IntervalView<T> offset(RandomAccessibleInterval<T> interval, long... offset)
translateInverse(RandomAccessibleInterval, long...)
instead.interval - the sourceoffset - offset of the source view. The pixel at offset becomes the
origin of resulting view.public static <T> IntervalView<T> zeroMin(RandomAccessibleInterval<T> interval)
interval - the source.public static <T> MixedTransformView<T> hyperSlice(RandomAccessible<T> view, int d, long pos)
public static <T> IntervalView<T> hyperSlice(RandomAccessibleInterval<T> view, int d, long pos)
public static <T> MixedTransformView<T> addDimension(RandomAccessible<T> randomAccessible)
RandomAccessible
.
The additional dimension is the last dimension. For example, an XYZ view
is created for an XY source. When accessing an XYZ sample in the view,
the final coordinate is discarded and the source XY sample is accessed.randomAccessible - the sourcepublic static <T> IntervalView<T> addDimension(RandomAccessibleInterval<T> interval, long minOfNewDim, long maxOfNewDim)
RandomAccessibleInterval. The Interval boundaries in the
additional dimension are set to the specified values.
The additional dimension is the last dimension. For example, an XYZ view
is created for an XY source. When accessing an XYZ sample in the view,
the final coordinate is discarded and the source XY sample is accessed.interval - the sourceminOfNewDim - Interval min in the additional dimension.maxOfNewDim - Interval max in the additional dimension.public static <T> MixedTransformView<T> invertAxis(RandomAccessible<T> randomAccessible, int d)
randomAccessible - the sourced - the axis to invertpublic static <T> IntervalView<T> invertAxis(RandomAccessibleInterval<T> interval, int d)
interval - the sourced - the axis to invertpublic static <T> IntervalView<T> offsetInterval(RandomAccessible<T> randomAccessible, long[] offset, long[] dimension)
randomAccessible - the sourceoffset - offset of min corner.dimension - size of the interval.public static <T> IntervalView<T> offsetInterval(RandomAccessible<T> randomAccessible, Interval interval)
randomAccessible - the sourceinterval - the interval on source that should be cut out and translated
to the origin.public static boolean isZeroMin(Interval interval)
interval - - the Interval to testpublic static <T> IterableInterval<T> iterable(RandomAccessibleInterval<T> randomAccessibleInterval)
IterableInterval. If the passed
RandomAccessibleInterval is already an IterableInterval
then it is returned directly (this is the case for Img). If not,
then an IterableRandomAccessibleInterval is created.randomAccessibleInterval - the sourceIterableIntervalpublic static <T> IterableInterval<T> flatIterable(RandomAccessibleInterval<T> randomAccessibleInterval)
IterableInterval having FlatIterationOrder. If
the passed RandomAccessibleInterval is already an
IterableInterval with FlatIterationOrder then it is
returned directly (this is the case for ArrayImg). If not, then
an IterableRandomAccessibleInterval is created.randomAccessibleInterval - the sourceIterableInterval with FlatIterationOrderpublic static <T> CompositeIntervalView<T,? extends GenericComposite<T>> collapse(RandomAccessibleInterval<T> source)
RandomAccessibleInterval<T> into an (
n-1)-dimensional RandomAccessibleInterval<
GenericComposite<T>>source - the sourceCompositeIntervalView of
GenericCompositespublic static <T extends RealType<T>> CompositeIntervalView<T,RealComposite<T>> collapseReal(RandomAccessibleInterval<T> source)
RandomAccessibleInterval<T extends
RealType<T>> into an (n-1)-dimensional
RandomAccessibleInterval<RealComposite<T>>source - the sourceCompositeIntervalView of
RealCompositespublic static <T extends NumericType<T>> CompositeIntervalView<T,NumericComposite<T>> collapseNumeric(RandomAccessibleInterval<T> source)
RandomAccessibleInterval<T extends
NumericType<T>> into an (n-1)-dimensional
RandomAccessibleInterval<NumericComposite<T>>source - the sourceCompositeIntervalView of
NumericCompositespublic static <T> CompositeView<T,? extends GenericComposite<T>> collapse(RandomAccessible<T> source)
RandomAccessible<T> into an (n
-1)-dimensional RandomAccessible<GenericComposite
<T>>source - the sourceCompositeView of
GenericCompositespublic static <T extends RealType<T>> CompositeView<T,RealComposite<T>> collapseReal(RandomAccessible<T> source, int numChannels)
RandomAccessible<T extends RealType
<T>> into an (n-1)-dimensional RandomAccessible
<RealComposite<T>>source - the sourcenumChannels - the number of channels that the RealComposite will
consider when performing calculationsCompositeView of
RealCompositespublic static <T extends NumericType<T>> CompositeView<T,NumericComposite<T>> collapseNumeric(RandomAccessible<T> source, int numChannels)
RandomAccessible<T extends NumericType
<T>> into an (n-1)-dimensional RandomAccessible
<NumericComposite<T>>source - the sourcenumChannels - the number of channels that the NumericComposite will
consider when performing calculationsCompositeView of
NumericCompositespublic static <T> SubsampleIntervalView<T> subsample(RandomAccessibleInterval<T> source, long step)
RandomAccessibleInterval. This is effectively an integer scaling
and zero offset transformation.source - the sourcestep - the subsampling step sizeRandomAccessibleInterval with its origin
coordinates at zeropublic static <T> SubsampleIntervalView<T> subsample(RandomAccessibleInterval<T> source, long... steps)
RandomAccessibleInterval. This is effectively an integer
scaling and zero offset transformation.source - the sourcesteps - the subsampling step sizesRandomAccessibleInterval with its origin
coordinates at zeropublic static <T> SubsampleView<T> subsample(RandomAccessible<T> source, long step)
RandomAccessible. This is effectively an integer scaling
transformation.source - the sourcestep - the subsampling step sizeRandomAccessiblepublic static <T> SubsampleView<T> subsample(RandomAccessible<T> source, long... steps)
RandomAccessible. This is effectively an integer scaling
transformation.source - the sourcesteps - the subsampling step sizesRandomAccessiblepublic static <T> RandomAccessibleInterval<T> dropSingletonDimensions(RandomAccessibleInterval<T> source)
source - the sourcepublic static <T> RandomAccessibleInterval<T> stack(List<? extends RandomAccessibleInterval<T>> hyperslices)
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals.hyperslices - a list of n-dimensional
RandomAccessibleInterval of identical sizes.RandomAccessibleInterval
where the final dimension is the index of the hyperslice.@SafeVarargs public static <T> RandomAccessibleInterval<T> stack(RandomAccessibleInterval<T>... hyperslices)
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals.hyperslices - a list of n-dimensional
RandomAccessibleInterval of identical sizes.RandomAccessibleInterval
where the final dimension is the index of the hyperslice.public static <T> RandomAccessibleInterval<T> stack(StackView.StackAccessMode stackAccessMode, List<? extends RandomAccessibleInterval<T>> hyperslices)
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals.stackAccessMode - describes how a RandomAccess on the (n+1)
-dimensional StackView maps position changes into
position changes of the underlying n-dimensional
RandomAccesses.hyperslices - a list of n-dimensional
RandomAccessibleInterval of identical sizes.RandomAccessibleInterval
where the final dimension is the index of the hyperslice.public static <T> RandomAccessibleInterval<T> stack(StackView.StackAccessMode stackAccessMode, RandomAccessibleInterval<T>... hyperslices)
RandomAccessibleInterval by
stacking n-dimensional RandomAccessibleIntervals.stackAccessMode - describes how a RandomAccess on the (n+1)
-dimensional StackView maps position changes into
position changes of the underlying n-dimensional
RandomAccesses.hyperslices - a list of n-dimensional
RandomAccessibleInterval of identical sizes.RandomAccessibleInterval
where the final dimension is the index of the hyperslice.public static <T> TransformView<T> shear(RandomAccessible<T> source, int shearDimension, int referenceDimension)
ShearTransform, i.e. c[ shearDimension ] = c[ shearDimension ] +
c[ referenceDimension ]source - input, e.g. extended RandomAccessibleIntervalshearDimension - dimension to be shearedreferenceDimension - reference dimension for shearTransformView containing the result.public static <T> TransformView<T> unshear(RandomAccessible<T> source, int shearDimension, int referenceDimension)
InverseShearTransform, i.e. c[ shearDimension ] = c[
shearDimension ] - c[ referenceDimension ]source - input, e.g. extended RandomAccessibleIntervalshearDimension - dimension to be shearedreferenceDimension - reference dimension for shearTransformView containing the result.public static <T> IntervalView<T> shear(RandomAccessible<T> source, Interval interval, int shearDimension, int referenceDimension)
ShearTransform, i.e. c[ shearDimension ] = c[ shearDimension ] +
c[ referenceDimension ]source - input, e.g. extended RandomAccessibleIntervalinterval - original intervalshearDimension - dimension to be shearedreferenceDimension - reference dimension for shearIntervalView containing the result. The returned
interval's dimension are determined by applying the
ShearTransform.transform(net.imglib2.transform.integer.BoundingBox) method on the input interval.public static <T> IntervalView<T> unshear(RandomAccessible<T> source, Interval interval, int shearDimension, int referenceDimension)
InverseShearTransform, i.e. c[ shearDimension ] = c[
shearDimension ] - c[ referenceDimension ]source - input, e.g. extended RandomAccessibleIntervalinterval - original intervalshearDimension - dimension to be shearedreferenceDimension - reference dimension for shearIntervalView containing the result. The returned
interval's dimension are determined by applying the
ShearTransform.transform(net.imglib2.transform.integer.BoundingBox) method on the input interval.public static <T> IntervalView<T> permuteCoordinates(RandomAccessibleInterval<T> source, int[] permutation)
RandomAccessibleInterval.source - must be an n-dimensional hypercube with each
dimension being of the same size as the permutation arraypermutation - must be a bijective permutation over its index set, i.e. for a
LUT of length n, the sorted content the array must be
[0,...,n-1] which is the index set of the LUT.IntervalView of permuted source.public static <T> IntervalView<T> permuteCoordinates(RandomAccessibleInterval<T> source, int[] permutation, int d)
RandomAccessibleInterval.source - must have dimension(dimension) == permutation.lengthpermutation - must be a bijective permutation over its index set, i.e. for a
LUT of length n, the sorted content the array must be
[0,...,n-1] which is the index set of the LUT.d - dimension index to be permutedIntervalView of permuted source.public static <T> IntervalView<T> permuteCoordinatesInverse(RandomAccessibleInterval<T> source, int[] permutation)
RandomAccessibleInterval.source - must be an n-dimensional hypercube with each
dimension being of the same size as the permutation arraypermutation - must be a bijective permutation over its index set, i.e. for a
LUT of length n, the sorted content the array must be
[0,...,n-1] which is the index set of the LUT.IntervalView of permuted source.@Deprecated public static <T> IntervalView<T> permuteCoordinateInverse(RandomAccessibleInterval<T> source, int[] permutation, int d)
permuteCoordinatesInverse(RandomAccessibleInterval, int[], int)RandomAccessibleInterval.source - must have dimension(dimension) == permutation.lengthpermutation - must be a bijective permutation over its index set, i.e. for a
lut of length n, the sorted content the array must be
[0,...,n-1] which is the index set of the lut.d - dimension index to be permutedIntervalView of permuted source.public static <T> IntervalView<T> permuteCoordinatesInverse(RandomAccessibleInterval<T> source, int[] permutation, int d)
RandomAccessibleInterval.source - must have dimension(dimension) == permutation.lengthpermutation - must be a bijective permutation over its index set, i.e. for a
lut of length n, the sorted content the array must be
[0,...,n-1] which is the index set of the lut.d - dimension index to be permutedIntervalView of permuted source.public static <A,B> RandomAccessible<Pair<A,B>> pair(RandomAccessible<A> sourceA, RandomAccessible<B> sourceB)
sourceA - sourceB - public static <T> RandomAccessible<? extends RandomAccessible<T>> hyperSlices(RandomAccessible<T> source, int... axes)
RandomAccessible of T as
an m-dimensional RandomAccessible of
n-dimensional RandomAccessibles of T.source - axes - the axes to become the inner axes (embedded into the
co-domain)public static <T,F extends RandomAccessibleInterval<T>> IntervalView<T> expand(F source, OutOfBoundsFactory<T,? super F> oob, long... border)
OutOfBoundsFactory oob.source - the interval to expand.oob - the out-of-bounds strategy.RandomAccessibleInterval source as
specified by oob and border.public static <T> IntervalView<T> expandMirrorSingle(RandomAccessibleInterval<T> source, long... border)
source - the interval to expand.RandomAccessibleInterval source as
specified by border.public static <T> IntervalView<T> expandMirrorDouble(RandomAccessibleInterval<T> source, long... border)
source - the interval to expand.RandomAccessibleInterval source as
specified by border.public static <T> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, T t, long... border)
source - the interval to expand.t - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.@Deprecated public static <T extends Type<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, T t, long... border)
expandValue with unbounded type parameter Tsource - the interval to expand.t - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends RealType<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, float value, long... border)
source - the interval to expand.value - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends RealType<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, double value, long... border)
source - the interval to expand.value - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends IntegerType<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, int value, long... border)
source - the interval to expand.value - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends IntegerType<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, long value, long... border)
source - the interval to expand.value - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends BooleanType<T>> IntervalView<T> expandValue(RandomAccessibleInterval<T> source, boolean value, long... border)
source - the interval to expand.value - Constant extension of source.RandomAccessibleInterval source as
specified by t and border.public static <T extends NumericType<T>> IntervalView<T> expandZero(RandomAccessibleInterval<T> source, long... border)
source - the interval to expand.RandomAccessibleInterval source as
specified by border.public static <T extends RealType<T>> IntervalView<T> expandRandom(RandomAccessibleInterval<T> source, double min, double max, long... border)
source - the interval to expand.min - the minimal random valuemax - the maximal random valueRandomAccessibleInterval source as
specified by min, max, and border.public static <T> IntervalView<T> expandPeriodic(RandomAccessibleInterval<T> source, long... border)
source - the interval to expand.RandomAccessibleInterval source as
specified by border.public static <T> IntervalView<T> expandBorder(RandomAccessibleInterval<T> source, long... border)
source - the interval to expand.RandomAccessibleInterval source as
specified by border.@SafeVarargs public static <T> RandomAccessibleInterval<T> concatenate(int concatenationAxis, RandomAccessibleInterval<T>... sources)
RandomAccessibleInterval along the
provided concatenationAxis. The random access behaves as
defined by StackView.StackAccessMode.DEFAULT.concatenationAxis - Concatenate along this axis.sources - RandomAccessibleIntervals to be concatenated.RandomAccessibleInterval of concatenated sources.public static <T> RandomAccessibleInterval<T> concatenate(int concatenationAxis, List<? extends RandomAccessibleInterval<T>> sources)
RandomAccessibleInterval along the provided
concatenationAxis. The random access behaves as defined by
StackView.StackAccessMode.DEFAULT.concatenationAxis - Concatenate along this axis.sources - RandomAccessibleIntervals to be concatenated.RandomAccessibleInterval of concatenated sources.@SafeVarargs public static <T> RandomAccessibleInterval<T> concatenate(int concatenationAxis, StackView.StackAccessMode mode, RandomAccessibleInterval<T>... sources)
RandomAccessibleInterval along the
provided concatenationAxis. See
StackView.StackAccessMode for behaviors of RandomAccess.concatenationAxis - Concatenate along this axis.mode - Defines how random accesses are moved. See
StackView.StackAccessMode for behaviors of
RandomAccess.sources - RandomAccessibleIntervals to be concatenated.RandomAccessibleInterval of concatenated sources.public static <T> RandomAccessibleInterval<T> concatenate(int concatenationAxis, StackView.StackAccessMode mode, List<? extends RandomAccessibleInterval<T>> sources)
RandomAccessibleInterval along the provided
concatenationAxis. See StackView.StackAccessMode for
behaviors of RandomAccess.concatenationAxis - Concatenate along this axis.mode - Defines how random accesses are moved. See
StackView.StackAccessMode for behaviors of
RandomAccess.sources - RandomAccessibleIntervals to be concatenated.RandomAccessibleInterval of concatenated sources.Copyright © 2015–2022 ImgLib2. All rights reserved.