- java.lang.Object
-
- bdv.img.cache.CreateInvalidVolatileCell<A>
-
- Type Parameters:
A- access type
- All Implemented Interfaces:
net.imglib2.cache.volatiles.CreateInvalid<Long,net.imglib2.img.cell.Cell<A>>
public class CreateInvalidVolatileCell<A> extends Object implements net.imglib2.cache.volatiles.CreateInvalid<Long,net.imglib2.img.cell.Cell<A>>
ACreateInvalidthat produces empty cells ofVolatileArrayDataAccesstypeA, with the correct dimensions, etc.The same
VolatileArrayDataAccessis re-used for many cells. If a Cell needs a bigger access, we allocate a new one and then re-use that, and so on.Usually,
CreateInvalidVolatileCellshould be created through static helper methodsget(CellGrid, Fraction, PrimitiveType, boolean)orget(CellGrid, NativeType, boolean)to get the desired primitive type and dirty variant.- Author:
- Tobias Pietzsch
-
-
Constructor Summary
Constructors Constructor Description CreateInvalidVolatileCell(net.imglib2.img.cell.CellGrid grid, net.imglib2.util.Fraction entitiesPerPixel, EmptyArrayCreator<A> creator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description net.imglib2.img.cell.Cell<A>createInvalid(Long key)static <A extends net.imglib2.img.basictypeaccess.volatiles.VolatileArrayDataAccess<A>>
CreateInvalidVolatileCell<A>get(net.imglib2.img.cell.CellGrid grid, net.imglib2.util.Fraction entitiesPerPixel, net.imglib2.type.PrimitiveType primitiveType, boolean dirty)static <T extends net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.volatiles.VolatileArrayDataAccess<A>>
CreateInvalidVolatileCell<A>get(net.imglib2.img.cell.CellGrid grid, T type, boolean dirty)
-
-
-
Constructor Detail
-
CreateInvalidVolatileCell
public CreateInvalidVolatileCell(net.imglib2.img.cell.CellGrid grid, net.imglib2.util.Fraction entitiesPerPixel, EmptyArrayCreator<A> creator)
-
-
Method Detail
-
createInvalid
public net.imglib2.img.cell.Cell<A> createInvalid(Long key) throws Exception
- Specified by:
createInvalidin interfacenet.imglib2.cache.volatiles.CreateInvalid<Long,net.imglib2.img.cell.Cell<A>>- Throws:
Exception
-
get
public static <T extends net.imglib2.type.NativeType<T>,A extends net.imglib2.img.basictypeaccess.volatiles.VolatileArrayDataAccess<A>> CreateInvalidVolatileCell<A> get(net.imglib2.img.cell.CellGrid grid, T type, boolean dirty) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
get
public static <A extends net.imglib2.img.basictypeaccess.volatiles.VolatileArrayDataAccess<A>> CreateInvalidVolatileCell<A> get(net.imglib2.img.cell.CellGrid grid, net.imglib2.util.Fraction entitiesPerPixel, net.imglib2.type.PrimitiveType primitiveType, boolean dirty) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-