public abstract class AbstractImg<T> extends Object implements Img<T>
| Modifier and Type | Field and Description |
|---|---|
protected long[] |
dimension |
protected long[] |
max |
protected int |
n |
protected long |
numPixels |
| Constructor and Description |
|---|
AbstractImg(long[] size) |
| Modifier and Type | Method and Description |
|---|---|
long |
dimension(int d)
Default implementation of
Dimensions.dimension(int). |
void |
dimensions(long[] s)
Write the number of pixels in each dimension into long[].
|
T |
firstElement()
Get the first element of this
IterableRealInterval. |
Iterator<T> |
iterator() |
long |
max(int d)
Get the maximum in dimension d.
|
void |
max(long[] m)
Write the maximum of each dimension into long[].
|
void |
max(Positionable m)
Sets a
Positionable to the maximum of this Interval |
long |
min(int d)
Get the minimum in dimension d.
|
void |
min(long[] m)
Write the minimum of each dimension into long[].
|
void |
min(Positionable m)
Sets a
Positionable to the minimum of this Interval |
int |
numDimensions()
Gets the space's number of dimensions.
|
static long |
numElements(long[] dim) |
RandomAccess<T> |
randomAccess(Interval interval)
Create a random access sampler for integer coordinates.
|
void |
realMax(double[] m)
Write the maximum of each dimension into double[].
|
double |
realMax(int d)
Default implementation of
RealInterval.realMax(int). |
void |
realMax(RealPositionable m)
Sets a
RealPositionable to the maximum of this Interval |
void |
realMin(double[] m)
Write the minimum of each dimension into double[].
|
double |
realMin(int d)
Default implementation of
RealInterval.realMin(int). |
void |
realMin(RealPositionable m)
Sets a
RealPositionable to the minimum of this Interval |
long |
size()
Returns the number of elements in this
Function. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAt, getAt, getAt, randomAccesscursor, localizingCursoriterationOrderforEach, spliteratormaxAsLongArray, maxAsPoint, minAsLongArray, minAsPointmaxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPointallPositive, allPositive, dimensions, dimensionsAsLongArray, dimensionsAsPoint, verify, verify, verifyAllPositive, verifyAllPositiveprotected final int n
protected long numPixels
protected final long[] dimension
protected final long[] max
public T firstElement()
IterableRealIntervalIterableRealInterval. This is a
shortcut for cursor().next().
This can be used to create a new variable of type T using
firstElement().createVariable(), which is useful in generic
methods to store temporary results, e.g., a running sum over pixels in
the IterableRealInterval.firstElement in interface IterableRealInterval<T>public static long numElements(long[] dim)
public int numDimensions()
EuclideanSpacenumDimensions in interface EuclideanSpacepublic void dimensions(long[] s)
Dimensionsdimensions in interface Dimensionspublic long dimension(int d)
IntervalDimensions.dimension(int).dimension in interface Dimensionsdimension in interface Intervalpublic long size()
IterableRealInterval
Returns the number of elements in this Function.
size in interface IterableRealInterval<T>public double realMax(int d)
IntervalRealInterval.realMax(int).realMax in interface IntervalrealMax in interface RealIntervald - dimensionpublic void realMax(double[] m)
RealIntervalrealMax in interface RealIntervalpublic void realMax(RealPositionable m)
RealIntervalRealPositionable to the maximum of this IntervalrealMax in interface RealIntervalpublic double realMin(int d)
IntervalRealInterval.realMin(int).realMin in interface IntervalrealMin in interface RealIntervald - dimensionpublic void realMin(double[] m)
RealIntervalrealMin in interface RealIntervalpublic void realMin(RealPositionable m)
RealIntervalRealPositionable to the minimum of this IntervalrealMin in interface RealIntervalpublic long max(int d)
Intervalpublic void max(long[] m)
Intervalpublic void max(Positionable m)
IntervalPositionable to the maximum of this Intervalpublic void min(long[] m)
Intervalpublic long min(int d)
Intervalpublic void min(Positionable m)
IntervalPositionable to the minimum of this Intervalpublic RandomAccess<T> randomAccess(Interval interval)
RandomAccessible
The returned random access is intended to be used in the specified
interval only. Thus, the RandomAccessible may provide optimized versions.
If the interval is completely contained in the domain, the random access
is guaranteed to provide the same values as that obtained by
RandomAccessible.randomAccess() within the interval.
randomAccess in interface RandomAccessible<T>interval - in which interval you intend to use the random access.Copyright © 2015–2022 ImgLib2. All rights reserved.