Package net.imglib2.img.cell
Class LazyCellImg<T extends NativeType<T>,A>
- java.lang.Object
-
- net.imglib2.img.AbstractImg<T>
-
- net.imglib2.img.AbstractNativeImg<T,A>
-
- net.imglib2.img.cell.AbstractCellImg<T,A,Cell<A>,LazyCellImg.LazyCells<Cell<A>>>
-
- net.imglib2.img.cell.LazyCellImg<T,A>
-
- Type Parameters:
T
- the pixel typeA
- the underlying native access type
- All Implemented Interfaces:
java.lang.Iterable<T>
,Dimensions
,EuclideanSpace
,Img<T>
,NativeImg<T,A>
,Interval
,IterableInterval<T>
,IterableRealInterval<T>
,RandomAccessible<T>
,RandomAccessibleInterval<T>
,RealInterval
public class LazyCellImg<T extends NativeType<T>,A> extends AbstractCellImg<T,A,Cell<A>,LazyCellImg.LazyCells<Cell<A>>>
AAbstractCellImg
that obtains its Cells lazily when they are accessed. Cells are obtained by aLazyCellImg.Get
method that is provided by the user. Typically this is some kind of cache.- Author:
- Tobias Pietzsch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LazyCellImg.Get<T>
static class
LazyCellImg.LazyCells<T>
-
Nested classes/interfaces inherited from class net.imglib2.img.cell.AbstractCellImg
AbstractCellImg.CellImgSampler<C>
-
-
Field Summary
-
Fields inherited from class net.imglib2.img.cell.AbstractCellImg
cells, grid
-
Fields inherited from class net.imglib2.img.AbstractNativeImg
entitiesPerPixel, linkedType, numEntities
-
Fields inherited from class net.imglib2.img.AbstractImg
dimension, max, n, numPixels
-
-
Constructor Summary
Constructors Constructor Description LazyCellImg(CellGrid grid, Fraction entitiesPerPixel, LazyCellImg.Get<Cell<A>> get)
LazyCellImg(CellGrid grid, T type, LazyCellImg.Get<Cell<A>> get)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Img<T>
copy()
ImgFactory<T>
factory()
Get aImgFactory
that createsImg
s of the same kind as this one.static void
linkType(NativeType t, NativeImg img)
Reflection hack because there is noT NativeType <T>.create(NativeImg<?, A>)
method in ImgLib2 Note that for this method to be introduced, NativeType would need an additional generic parameter A that specifies the accepted family of access objects that can be used in the NativeImg...-
Methods inherited from class net.imglib2.img.cell.AbstractCellImg
copyDataTo, cursor, getCellGrid, getCells, iterationOrder, localizingCursor, randomAccess, update
-
Methods inherited from class net.imglib2.img.AbstractNativeImg
createLinkedType, setLinkedType
-
Methods inherited from class net.imglib2.img.AbstractImg
dimension, dimensions, firstElement, iterator, max, max, max, min, min, min, numDimensions, numElements, randomAccess, realMax, realMax, realMax, realMin, realMin, realMin, size, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.Dimensions
dimension, dimensions
-
Methods inherited from interface net.imglib2.EuclideanSpace
numDimensions
-
Methods inherited from interface net.imglib2.IterableRealInterval
firstElement, size
-
Methods inherited from interface net.imglib2.RandomAccessible
randomAccess
-
-
-
-
Constructor Detail
-
LazyCellImg
public LazyCellImg(CellGrid grid, T type, LazyCellImg.Get<Cell<A>> get)
-
LazyCellImg
public LazyCellImg(CellGrid grid, Fraction entitiesPerPixel, LazyCellImg.Get<Cell<A>> get)
-
-
Method Detail
-
factory
public ImgFactory<T> factory()
Description copied from interface:Img
Get aImgFactory
that createsImg
s of the same kind as this one. This is useful to create Imgs for temporary storage in generic methods where the specific Img type is unknown. Note, that the factory can be used even if all references to this Img have been invalidated.- Returns:
- a factory for Imgs of the same kind as this one.
-
linkType
public static void linkType(NativeType t, NativeImg img) throws java.lang.NoSuchMethodException, java.lang.SecurityException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException
Reflection hack because there is noT NativeType <T>.create(NativeImg<?, A>)
method in ImgLib2 Note that for this method to be introduced, NativeType would need an additional generic parameter A that specifies the accepted family of access objects that can be used in the NativeImg... big change- Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
-
-