Class VolatileARGBType
- java.lang.Object
-
- net.imglib2.Volatile<N>
-
- net.imglib2.type.volatiles.AbstractVolatileNumericType<N,T>
-
- net.imglib2.type.volatiles.AbstractVolatileNativeNumericType<ARGBType,VolatileARGBType>
-
- net.imglib2.type.volatiles.VolatileARGBType
-
- All Implemented Interfaces:
NativeType<VolatileARGBType>,NumericType<VolatileARGBType>,Add<VolatileARGBType>,Div<VolatileARGBType>,Mul<VolatileARGBType>,MulFloatingPoint,Pow<VolatileARGBType>,PowFloatingPoint,SetOne,SetZero,Sub<VolatileARGBType>,ValueEquals<VolatileARGBType>,Type<VolatileARGBType>
public class VolatileARGBType extends AbstractVolatileNativeNumericType<ARGBType,VolatileARGBType>
AVolatilevariant ofUnsignedShortType. It uses an underlyingUnsignedShortTypethat maps into aVolatileShortAccess.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVolatileARGBType.WrappedARGBType
-
Field Summary
Fields Modifier and Type Field Description protected NativeImg<?,? extends VolatileIntAccess>imgprivate static NativeTypeFactory<VolatileARGBType,VolatileIntAccess>typeFactory
-
Constructor Summary
Constructors Constructor Description VolatileARGBType()VolatileARGBType(int value)VolatileARGBType(VolatileIntAccess access)VolatileARGBType(NativeImg<?,? extends VolatileIntAccess> img)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolatileARGBTypecopy()VolatileARGBTypecreateVariable()Creates a newTypevariable which can only store one value.VolatileARGBTypeduplicateTypeOnSameNativeImg()Creates a newNativeTypewhich stores in the same physical array.NativeTypeFactory<VolatileARGBType,?>getNativeTypeFactory()voidset(int value)voidupdateContainer(java.lang.Object c)This method is used by an accessor (e.g., aCursor) to request an update of the current data array.-
Methods inherited from class net.imglib2.type.volatiles.AbstractVolatileNativeNumericType
getEntitiesPerPixel, index
-
Methods inherited from class net.imglib2.type.volatiles.AbstractVolatileNumericType
add, div, equals, hashCode, mul, mul, mul, pow, pow, set, setOne, setZero, sub, valueEquals
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.type.NativeType
decIndex, decIndex, getIndex, incIndex, incIndex, updateIndex
-
Methods inherited from interface net.imglib2.type.operators.ValueEquals
valueEquals
-
-
-
-
Field Detail
-
img
protected final NativeImg<?,? extends VolatileIntAccess> img
-
typeFactory
private static final NativeTypeFactory<VolatileARGBType,VolatileIntAccess> typeFactory
-
-
Constructor Detail
-
VolatileARGBType
public VolatileARGBType(NativeImg<?,? extends VolatileIntAccess> img)
-
VolatileARGBType
public VolatileARGBType(VolatileIntAccess access)
-
VolatileARGBType
public VolatileARGBType(int value)
-
VolatileARGBType
public VolatileARGBType()
-
-
Method Detail
-
set
public void set(int value)
-
updateContainer
public void updateContainer(java.lang.Object c)
Description copied from interface:NativeTypeThis method is used by an accessor (e.g., aCursor) to request an update of the current data array.As an example consider a
CellCursormoving on aCellImg. The cursor maintains aNativeTypewhich provides access to the image data. When the cursor moves from one cell to the next, the underlying data array of theNativeTypemust be switched to the data array of the new cell.To achieve this, the
CellCursorcallsupdateContainer()with itself as the argument.updateContainer()in turn will callNativeImg.update(Object)on it's container, passing along the reference to the cursor. In this example, the container would be aCellImg. While theNativeTypedoes not know about the type of the cursor, the container does.CellImgknows that it is passed aCellCursorinstance, which can be used to figure out the current cell and the underlying data array, which is then returned to theNativeType.The idea behind this concept is maybe not obvious. The
NativeTypeknows which basic type is used (float, int, byte, ...). However, it does not know how the data is stored (ArrayImg,CellImg, ...). This prevents the need for multiple implementations ofNativeType.- Parameters:
c- reference to an accessor which can be passed on to the container (which will know what to do with it).
-
duplicateTypeOnSameNativeImg
public VolatileARGBType duplicateTypeOnSameNativeImg()
Description copied from interface:NativeTypeCreates a newNativeTypewhich stores in the same physical array. This is only used internally.- Returns:
- a new
NativeTypeinstance working on the sameNativeImg
-
createVariable
public VolatileARGBType createVariable()
Description copied from interface:TypeCreates a newTypevariable which can only store one value.- Returns:
- a new
Typevariable
-
copy
public VolatileARGBType copy()
Description copied from interface:Type- Returns:
- a new
Typevariable
-
getNativeTypeFactory
public NativeTypeFactory<VolatileARGBType,?> getNativeTypeFactory()
-
-