Package net.imglib2
Class FinalDimensions
- java.lang.Object
-
- net.imglib2.FinalDimensions
-
- All Implemented Interfaces:
Dimensions,EuclideanSpace
public final class FinalDimensions extends java.lang.Object implements Dimensions
An implementation of dimensionality that can wrap a long[] array. The same principle for wrapping as in Point is used.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long[]dimensions
-
Constructor Summary
Constructors Modifier Constructor Description FinalDimensions(int... dimensions)Create a FinalDimensions with a defined sizeFinalDimensions(long... dimensions)Create a FinalDimensions with a defined sizeprotectedFinalDimensions(long[] dimensions, boolean copy)Protected constructor that can re-use the passed position array.FinalDimensions(Dimensions dimensions)Create a FinalDimensions with a defined size
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longdimension(int d)Get the number of pixels in a given dimension d.voiddimensions(long[] dims)Write the number of pixels in each dimension into long[].booleanequals(java.lang.Object obj)inthashCode()intnumDimensions()Gets the space's number of dimensions.java.lang.StringtoString()static FinalDimensionswrap(long[] dimensions)Create a FinalDimensions object that stores its coordinates in the provided position array.-
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
-
-
-
-
Constructor Detail
-
FinalDimensions
protected FinalDimensions(long[] dimensions, boolean copy)Protected constructor that can re-use the passed position array.- Parameters:
dimensions- array used to store the position.copy- flag indicating whether position array should be duplicated.
-
FinalDimensions
public FinalDimensions(long... dimensions)
Create a FinalDimensions with a defined size- Parameters:
dimensions- the size
-
FinalDimensions
public FinalDimensions(int... dimensions)
Create a FinalDimensions with a defined size- Parameters:
dimensions- the size
-
FinalDimensions
public FinalDimensions(Dimensions dimensions)
Create a FinalDimensions with a defined size- Parameters:
dimensions- the size
-
-
Method Detail
-
numDimensions
public int numDimensions()
Description copied from interface:EuclideanSpaceGets the space's number of dimensions.- Specified by:
numDimensionsin interfaceEuclideanSpace
-
dimensions
public void dimensions(long[] dims)
Description copied from interface:DimensionsWrite the number of pixels in each dimension into long[].- Specified by:
dimensionsin interfaceDimensions
-
dimension
public long dimension(int d)
Description copied from interface:DimensionsGet the number of pixels in a given dimension d.- Specified by:
dimensionin interfaceDimensions
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
wrap
public static FinalDimensions wrap(long[] dimensions)
Create a FinalDimensions object that stores its coordinates in the provided position array.- Parameters:
dimensions- array to use for storing the position.
-
-