Package net.imglib2.img
Class AbstractImg<T>
java.lang.Object
net.imglib2.img.AbstractImg<T>
- All Implemented Interfaces:
Iterable<T>,Dimensions,EuclideanSpace,Img<T>,Interval,IterableInterval<T>,IterableRealInterval<T>,RandomAccessible<T>,RandomAccessibleInterval<T>,RealInterval
- Direct Known Subclasses:
AbstractListImg,AbstractLongListImg,AbstractNativeImg
TODO
- Author:
- Stephan Preibisch, Stephan Saalfeld
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongdimension(int d) Get the number of pixels in a given dimension d.voiddimensions(long[] s) Write the number of pixels in each dimension into long[].Get the first element of thisIterableRealInterval.iterator()longmax(int d) Get the maximum in dimension d.voidmax(long[] m) 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[] m) Write the minimum of each dimension into long[].voidmin(Positionable m) Sets aPositionableto the minimum of thisIntervalintGets the space's number of dimensions.static longnumElements(long[] dim) randomAccess(Interval interval) Create a random access sampler for integer coordinates.voidrealMax(double[] m) Write the maximum of each dimension into double[].doublerealMax(int d) Get the maximum in dimension d.voidSets aRealPositionableto the maximum of thisIntervalvoidrealMin(double[] m) Write the minimum of each dimension into double[].doublerealMin(int d) Get the minimum in dimension d.voidSets aRealPositionableto the minimum of thisIntervallongsize()Returns the number of elements in thisFunction.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.imglib2.IterableInterval
cursor, localizingCursorMethods inherited from interface net.imglib2.IterableRealInterval
iterationOrderMethods inherited from interface net.imglib2.RandomAccessible
randomAccess
-
Field Details
-
n
protected final int n -
numPixels
protected long numPixels -
dimension
protected final long[] dimension -
max
protected final long[] max
-
-
Constructor Details
-
AbstractImg
public AbstractImg(long[] size)
-
-
Method Details
-
iterator
-
firstElement
Description copied from interface:IterableRealIntervalGet the first element of thisIterableRealInterval. This is a shortcut forcursor().next(). This can be used to create a new variable of type T usingfirstElement().createVariable(), which is useful in generic methods to store temporary results, e.g., a running sum over pixels in theIterableRealInterval.- Specified by:
firstElementin interfaceIterableRealInterval<T>- Returns:
- the first element in iteration order.
-
numElements
public static long numElements(long[] dim) -
numDimensions
public int numDimensions()Description copied from interface:EuclideanSpaceGets the space's number of dimensions.- Specified by:
numDimensionsin interfaceEuclideanSpace
-
dimensions
public void dimensions(long[] s) Description copied from interface:DimensionsWrite the number of pixels in each dimension into long[].- Specified by:
dimensionsin interfaceDimensions- Parameters:
s-
-
dimension
public long dimension(int d) Description copied from interface:DimensionsGet the number of pixels in a given dimension d.- Specified by:
dimensionin interfaceDimensions- Parameters:
d-
-
size
public long size()Description copied from interface:IterableRealIntervalReturns the number of elements in this
Function.- Specified by:
sizein interfaceIterableRealInterval<T>- Returns:
- number of elements
-
toString
-
realMax
public double realMax(int d) Description copied from interface:RealIntervalGet the maximum in dimension d.- Specified by:
realMaxin interfaceRealInterval- Parameters:
d- dimension- Returns:
- maximum in dimension d.
-
realMax
public void realMax(double[] m) Description copied from interface:RealIntervalWrite the maximum of each dimension into double[].- Specified by:
realMaxin interfaceRealInterval- Parameters:
m-
-
realMax
Description copied from interface:RealIntervalSets aRealPositionableto the maximum of thisInterval- Specified by:
realMaxin interfaceRealInterval- Parameters:
m-
-
realMin
public double realMin(int d) Description copied from interface:RealIntervalGet the minimum in dimension d.- Specified by:
realMinin interfaceRealInterval- Parameters:
d- dimension- Returns:
- minimum in dimension d.
-
realMin
public void realMin(double[] m) Description copied from interface:RealIntervalWrite the minimum of each dimension into double[].- Specified by:
realMinin interfaceRealInterval- Parameters:
m-
-
realMin
Description copied from interface:RealIntervalSets aRealPositionableto the minimum of thisInterval- Specified by:
realMinin interfaceRealInterval- Parameters:
m-
-
max
public long max(int d) Description copied from interface:IntervalGet the maximum in dimension d. -
max
public void max(long[] m) Description copied from interface:IntervalWrite the maximum of each dimension into long[]. -
max
Description copied from interface:IntervalSets aPositionableto the maximum of thisInterval -
min
public void min(long[] m) Description copied from interface:IntervalWrite the minimum of each dimension into long[]. -
min
public long min(int d) Description copied from interface:IntervalGet the minimum in dimension d. -
min
Description copied from interface:IntervalSets aPositionableto the minimum of thisInterval -
randomAccess
Description copied from interface:RandomAccessibleCreate a random access sampler for integer coordinates.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.- Specified by:
randomAccessin interfaceRandomAccessible<T>- Parameters:
interval- in which interval you intend to use the random access.- Returns:
- random access sampler
-