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
Implementation of the
Interval interface.-
Field Summary
FieldsFields inherited from class AbstractEuclideanSpace
n -
Constructor Summary
ConstructorsConstructorDescriptionAbstractInterval(int n) Creates an n-dimensionalAbstractIntervalwith 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(long[] min, long[] max, boolean copy) 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 aAbstractIntervalfrom anotherIntervalAbstractInterval(Localizable min, Localizable max) Creates an Interval with the boundaries [min, max] (both including) -
Method Summary
Modifier and TypeMethodDescriptionlongdimension(int d) Default implementation ofDimensions.dimension(int).voiddimensions(long[] dimensions) Write the number of pixels in each dimension into long[].longmax(int d) Get the maximum in dimension d.voidmax(long[] maximum) Write the maximum of each dimension into long[].voidmax(Positionable m) Sets aPositionableto the maximum of thisIntervallongmin(int d) Get the minimum in dimension d.voidmin(long[] minimum) Write the minimum of each dimension into long[].voidmin(Positionable m) Sets aPositionableto the minimum of thisIntervalvoidrealMax(double[] maximum) Write the maximum of each dimension into double[].doublerealMax(int d) Default implementation ofRealInterval.realMax(int).voidSets aRealPositionableto the maximum of thisIntervalvoidrealMin(double[] minimum) Write the minimum of each dimension into double[].doublerealMin(int d) Default implementation ofRealInterval.realMin(int).voidrealMin(RealPositionable minimum) Sets aRealPositionableto the minimum of thisIntervaltoString()Methods inherited from class AbstractEuclideanSpace
numDimensionsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Dimensions
dimensions, dimensionsAsLongArray, dimensionsAsPointMethods inherited from interface EuclideanSpace
numDimensionsMethods inherited from interface Interval
maxAsLongArray, maxAsPoint, minAsLongArray, minAsPointMethods inherited from interface RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
-
Field Details
-
min
protected final long[] min -
max
protected final long[] max
-
-
Constructor Details
-
AbstractInterval
public AbstractInterval(int n) Creates an n-dimensionalAbstractIntervalwith min and max = 0n.- Parameters:
n- number of dimensions
-
AbstractInterval
Creates aAbstractIntervalfrom anotherInterval- Parameters:
interval- anotherInterval
-
AbstractInterval
Creates an Interval with the boundaries [0, dimensions-1]- Parameters:
dimensions- the size of the interval
-
AbstractInterval
public AbstractInterval(long[] min, long[] max, boolean copy) 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 dimensioncopy- flag indicating whether min and max arrays should be duplicated.
-
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
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 Details
-
realMin
public double realMin(int d) Description copied from interface:IntervalDefault implementation ofRealInterval.realMin(int).- Specified by:
realMinin interfaceInterval- Specified by:
realMinin interfaceRealInterval- Parameters:
d- dimension- Returns:
- minimum in dimension d.
-
realMin
public void realMin(double[] minimum) Description copied from interface:RealIntervalWrite the minimum of each dimension into double[].- Specified by:
realMinin interfaceRealInterval- Parameters:
minimum-
-
realMin
Description copied from interface:RealIntervalSets aRealPositionableto the minimum of thisInterval- Specified by:
realMinin interfaceRealInterval- Parameters:
minimum-
-
realMax
public double realMax(int d) Description copied from interface:IntervalDefault implementation ofRealInterval.realMax(int).- Specified by:
realMaxin interfaceInterval- Specified by:
realMaxin interfaceRealInterval- Parameters:
d- dimension- Returns:
- maximum in dimension d.
-
realMax
public void realMax(double[] maximum) Description copied from interface:RealIntervalWrite the maximum of each dimension into double[].- Specified by:
realMaxin interfaceRealInterval- Parameters:
maximum-
-
realMax
Description copied from interface:RealIntervalSets aRealPositionableto the maximum of thisInterval- Specified by:
realMaxin interfaceRealInterval- Parameters:
m-
-
min
-
min
-
min
Description copied from interface:IntervalSets aPositionableto the minimum of thisInterval -
max
-
max
-
max
Description copied from interface:IntervalSets aPositionableto the maximum of thisInterval -
dimensions
public void dimensions(long[] dimensions) Description copied from interface:DimensionsWrite the number of pixels in each dimension into long[].- Specified by:
dimensionsin interfaceDimensions- Parameters:
dimensions-
-
dimension
public long dimension(int d) Description copied from interface:IntervalDefault implementation ofDimensions.dimension(int).- Specified by:
dimensionin interfaceDimensions- Specified by:
dimensionin interfaceInterval- Parameters:
d-
-
toString
-