Package net.imglib2
Class AbstractInterval
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractInterval
-
- All Implemented Interfaces:
Dimensions
,EuclideanSpace
,Interval
,RealInterval
- Direct Known Subclasses:
FinalInterval
,IntervalIterator
,IntervalView
,PointSampleList
,RandomAccessibleIntervalCursor
,StackView
public abstract class AbstractInterval extends AbstractEuclideanSpace implements Interval
Implementation of theInterval
interface.- Author:
- Tobias Pietzsch, Stephan Preibisch
-
-
Field Summary
Fields Modifier and Type Field Description protected long[]
max
protected long[]
min
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Constructor Description AbstractInterval(int n)
Creates an n-dimensionalAbstractInterval
with min and max = 0n.AbstractInterval(long[] dimensions)
Creates an Interval with the boundaries [0, dimensions-1]AbstractInterval(long[] min, long[] max)
Creates an Interval with the boundaries [min, max] (both including)AbstractInterval(Dimensions dimensions)
Creates an Interval with the boundaries [0, dimensions-1]AbstractInterval(Interval interval)
Creates aAbstractInterval
from anotherInterval
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
dimension(int d)
Get the number of pixels in a given dimension d.void
dimensions(long[] dimensions)
Write the number of pixels in each dimension into long[].long
max(int d)
Get the maximum in dimension d.void
max(long[] maximum)
Write the maximum of each dimension into long[].void
max(Positionable m)
Sets aPositionable
to the maximum of thisInterval
long
min(int d)
Get the minimum in dimension d.void
min(long[] minimum)
Write the minimum of each dimension into long[].void
min(Positionable m)
Sets aPositionable
to the minimum of thisInterval
void
realMax(double[] maximum)
Write the maximum of each dimension into double[].double
realMax(int d)
Get the maximum in dimension d.void
realMax(RealPositionable m)
Sets aRealPositionable
to the maximum of thisInterval
void
realMin(double[] minimum)
Write the minimum of each dimension into double[].double
realMin(int d)
Get the minimum in dimension d.void
realMin(RealPositionable minimum)
Sets aRealPositionable
to the minimum of thisInterval
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
-
-
-
Constructor Detail
-
AbstractInterval
public AbstractInterval(int n)
Creates an n-dimensionalAbstractInterval
with min and max = 0n.- Parameters:
n
- number of dimensions
-
AbstractInterval
public AbstractInterval(Interval interval)
Creates aAbstractInterval
from anotherInterval
- Parameters:
interval
- - anotherInterval
-
AbstractInterval
public AbstractInterval(Dimensions dimensions)
Creates an Interval with the boundaries [0, dimensions-1]- Parameters:
dimensions
- - the size of the interval
-
AbstractInterval
public AbstractInterval(long[] min, long[] max)
Creates an Interval with the boundaries [min, max] (both including)- Parameters:
min
- - the position of the first elements in each dimensionmax
- - the position of the last elements in each dimension
-
AbstractInterval
public AbstractInterval(long[] dimensions)
Creates an Interval with the boundaries [0, dimensions-1]- Parameters:
dimensions
- - the size of the interval
-
-
Method Detail
-
realMin
public double realMin(int d)
Description copied from interface:RealInterval
Get the minimum in dimension d.- Specified by:
realMin
in interfaceRealInterval
- Parameters:
d
- dimension- Returns:
- minimum in dimension d.
-
realMin
public void realMin(double[] minimum)
Description copied from interface:RealInterval
Write the minimum of each dimension into double[].- Specified by:
realMin
in interfaceRealInterval
-
realMin
public void realMin(RealPositionable minimum)
Description copied from interface:RealInterval
Sets aRealPositionable
to the minimum of thisInterval
- Specified by:
realMin
in interfaceRealInterval
-
realMax
public double realMax(int d)
Description copied from interface:RealInterval
Get the maximum in dimension d.- Specified by:
realMax
in interfaceRealInterval
- Parameters:
d
- dimension- Returns:
- maximum in dimension d.
-
realMax
public void realMax(double[] maximum)
Description copied from interface:RealInterval
Write the maximum of each dimension into double[].- Specified by:
realMax
in interfaceRealInterval
-
realMax
public void realMax(RealPositionable m)
Description copied from interface:RealInterval
Sets aRealPositionable
to the maximum of thisInterval
- Specified by:
realMax
in interfaceRealInterval
-
min
public long min(int d)
Description copied from interface:Interval
Get the minimum in dimension d.
-
min
public void min(long[] minimum)
Description copied from interface:Interval
Write the minimum of each dimension into long[].
-
min
public void min(Positionable m)
Description copied from interface:Interval
Sets aPositionable
to the minimum of thisInterval
-
max
public long max(int d)
Description copied from interface:Interval
Get the maximum in dimension d.
-
max
public void max(long[] maximum)
Description copied from interface:Interval
Write the maximum of each dimension into long[].
-
max
public void max(Positionable m)
Description copied from interface:Interval
Sets aPositionable
to the maximum of thisInterval
-
dimensions
public void dimensions(long[] dimensions)
Description copied from interface:Dimensions
Write the number of pixels in each dimension into long[].- Specified by:
dimensions
in interfaceDimensions
-
dimension
public long dimension(int d)
Description copied from interface:Dimensions
Get the number of pixels in a given dimension d.- Specified by:
dimension
in interfaceDimensions
-
-