Package net.imglib2
Class FinalInterval
- java.lang.Object
-
- net.imglib2.AbstractEuclideanSpace
-
- net.imglib2.AbstractInterval
-
- net.imglib2.FinalInterval
-
- All Implemented Interfaces:
Dimensions,EuclideanSpace,Interval,RealInterval
public final class FinalInterval extends AbstractInterval
Implementation of theIntervalinterface.
-
-
Field Summary
-
Fields inherited from class net.imglib2.AbstractInterval
max, min
-
Fields inherited from class net.imglib2.AbstractEuclideanSpace
n
-
-
Constructor Summary
Constructors Modifier Constructor Description FinalInterval(long... dimensions)Creates an Interval with the boundaries [0, dimensions-1]FinalInterval(long[] min, long[] max)Creates an Interval with the boundaries [min, max] (both including)protectedFinalInterval(long[] min, long[] max, boolean copy)Creates an Interval with the boundaries [min, max] (both including)FinalInterval(Dimensions dimensions)Creates an Interval with the boundaries [0, dimensions-1]FinalInterval(Interval interval)Creates an Interval from anotherIntervalFinalInterval(Localizable min, Localizable max)Creates an Interval with the boundaries [min, max] (both including)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FinalIntervalcreateMinMax(long... minmax)Create aFinalIntervalfrom a parameter list comprising minimum and maximum coordinates.static FinalIntervalcreateMinSize(long... minsize)Create aFinalIntervalfrom a parameter list comprising minimum coordinates and size.static FinalIntervalcreateMinSize(long[] min, long[] size)Create an Interval with the given minimum coordinates and size.booleanequals(java.lang.Object obj)inthashCode()static FinalIntervalwrap(long[] min, long[] max)Create an Interval that stores its min and max in the provided arrays.-
Methods inherited from class net.imglib2.AbstractInterval
dimension, dimensions, max, max, max, min, min, min, realMax, realMax, realMax, realMin, realMin, realMin, toString
-
Methods inherited from class net.imglib2.AbstractEuclideanSpace
numDimensions
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.Dimensions
dimensions, dimensionsAsLongArray, dimensionsAsPoint
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.Interval
maxAsLongArray, maxAsPoint, minAsLongArray, minAsPoint
-
Methods inherited from interface net.imglib2.RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint
-
-
-
-
Constructor Detail
-
FinalInterval
public FinalInterval(Interval interval)
Creates an Interval from anotherInterval- Parameters:
interval- anotherInterval
-
FinalInterval
public FinalInterval(Dimensions dimensions)
Creates an Interval with the boundaries [0, dimensions-1]- Parameters:
dimensions- the size of the interval
-
FinalInterval
protected FinalInterval(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.
-
FinalInterval
public FinalInterval(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
-
FinalInterval
public FinalInterval(Localizable min, Localizable 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
-
FinalInterval
public FinalInterval(long... dimensions)
Creates an Interval with the boundaries [0, dimensions-1]- Parameters:
dimensions- the size of the interval
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
createMinSize
public static FinalInterval createMinSize(long... minsize)
Create aFinalIntervalfrom a parameter list comprising minimum coordinates and size. For example, to create a 2D interval from (10, 10) to (20, 40) use createMinSize( 10, 10, 11, 31 ).- Parameters:
minsize- a list of 2*n parameters to create a n -dimensional interval. The first n parameters specify the minimum of the interval, the next n parameters specify the dimensions of the interval.- Returns:
- interval with the specified boundaries
-
createMinMax
public static FinalInterval createMinMax(long... minmax)
Create aFinalIntervalfrom a parameter list comprising minimum and maximum coordinates. For example, to create a 2D interval from (10, 10) to (20, 40) use createMinMax( 10, 10, 20, 40 ).- Parameters:
minmax- a list of 2*n parameters to create a n -dimensional interval. The first n parameters specify the minimum of the interval, the next n parameters specify the maximum of the interval.- Returns:
- interval with the specified boundaries
-
createMinSize
public static FinalInterval createMinSize(long[] min, long[] size)
Create an Interval with the given minimum coordinates and size.- Parameters:
min- the minimum of the intervalsize- the dimensions of the interval- Returns:
- interval with the specified boundaries
-
wrap
public static FinalInterval wrap(long[] min, long[] max)
Create an Interval that stores its min and max in the provided arrays.- Parameters:
min- array for storing the position of the first elements in each dimensionmax- array for storing the the position of the last elements in each dimension
-
-