Class VolatileDoubleType
- java.lang.Object
-
- net.imglib2.Volatile<R>
-
- net.imglib2.type.volatiles.AbstractVolatileRealType<R,T>
-
- net.imglib2.type.volatiles.AbstractVolatileNativeRealType<DoubleType,VolatileDoubleType>
-
- net.imglib2.type.volatiles.VolatileDoubleType
-
- All Implemented Interfaces:
java.lang.Comparable<VolatileDoubleType>,NativeType<VolatileDoubleType>,ComplexType<VolatileDoubleType>,NumericType<VolatileDoubleType>,RealType<VolatileDoubleType>,Add<VolatileDoubleType>,Div<VolatileDoubleType>,Mul<VolatileDoubleType>,MulFloatingPoint,Pow<VolatileDoubleType>,PowFloatingPoint,SetOne,SetZero,Sub<VolatileDoubleType>,ValueEquals<VolatileDoubleType>,Type<VolatileDoubleType>
public class VolatileDoubleType extends AbstractVolatileNativeRealType<DoubleType,VolatileDoubleType>
AVolatilevariant ofDoubleType. It uses an underlyingDoubleTypethat maps into aVolatileDoubleAccess.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classVolatileDoubleType.WrappedDoubleType
-
Field Summary
Fields Modifier and Type Field Description protected NativeImg<?,? extends VolatileDoubleAccess>imgprivate static NativeTypeFactory<VolatileDoubleType,VolatileDoubleAccess>typeFactory
-
Constructor Summary
Constructors Constructor Description VolatileDoubleType()VolatileDoubleType(double value)VolatileDoubleType(VolatileDoubleAccess access)VolatileDoubleType(NativeImg<?,? extends VolatileDoubleAccess> img)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VolatileDoubleTypecopy()VolatileDoubleTypecreateVariable()Creates a newTypevariable which can only store one value.VolatileDoubleTypeduplicateTypeOnSameNativeImg()Creates a newNativeTypewhich stores in the same physical array.NativeTypeFactory<VolatileDoubleType,?>getNativeTypeFactory()voidset(double 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.AbstractVolatileNativeRealType
getEntitiesPerPixel, index
-
Methods inherited from class net.imglib2.type.volatiles.AbstractVolatileRealType
add, compareTo, complexConjugate, dec, div, equals, getBitsPerPixel, getImaginaryDouble, getImaginaryFloat, getMaxValue, getMinIncrement, getMinValue, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getRealDouble, getRealFloat, hashCode, inc, mul, mul, mul, pow, pow, set, setComplexNumber, setComplexNumber, setImaginary, setImaginary, setOne, setReal, setReal, 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 VolatileDoubleAccess> img
-
typeFactory
private static final NativeTypeFactory<VolatileDoubleType,VolatileDoubleAccess> typeFactory
-
-
Constructor Detail
-
VolatileDoubleType
public VolatileDoubleType(NativeImg<?,? extends VolatileDoubleAccess> img)
-
VolatileDoubleType
public VolatileDoubleType(VolatileDoubleAccess access)
-
VolatileDoubleType
public VolatileDoubleType(double value)
-
VolatileDoubleType
public VolatileDoubleType()
-
-
Method Detail
-
set
public void set(double 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 VolatileDoubleType 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 VolatileDoubleType createVariable()
Description copied from interface:TypeCreates a newTypevariable which can only store one value.- Returns:
- a new
Typevariable
-
copy
public VolatileDoubleType copy()
Description copied from interface:Type- Returns:
- a new
Typevariable
-
getNativeTypeFactory
public NativeTypeFactory<VolatileDoubleType,?> getNativeTypeFactory()
-
-