public class DoubleType extends AbstractRealType<DoubleType> implements NativeType<DoubleType>
| Modifier and Type | Field and Description |
|---|---|
protected DoubleAccess |
dataAccess |
protected NativeImg<?,? extends DoubleAccess> |
img |
| Constructor and Description |
|---|
DoubleType() |
DoubleType(double value) |
DoubleType(DoubleAccess access) |
DoubleType(NativeImg<?,? extends DoubleAccess> doubleStorage) |
| Modifier and Type | Method and Description |
|---|---|
DoubleType |
copy()
|
DoubleType |
createVariable()
Creates a new
Type variable which can only store one value. |
DoubleType |
duplicateTypeOnSameNativeImg()
Creates a new
NativeType which stores in the same physical array. |
static boolean |
equals(double a,
double b) |
double |
get() |
int |
getBitsPerPixel() |
Fraction |
getEntitiesPerPixel()
Get the number of entities in the storage array required to store one
pixel value.
|
double |
getMaxValue() |
double |
getMinIncrement() |
double |
getMinValue() |
NativeTypeFactory<DoubleType,DoubleAccess> |
getNativeTypeFactory() |
double |
getRealDouble() |
float |
getRealFloat() |
Index |
index()
Get the (modifiable) index into the current data array.
|
void |
set(double f) |
void |
setReal(double real) |
void |
setReal(float real) |
void |
updateContainer(Object c)
This method is used by an accessor (e.g., a
Cursor) to request an
update of the current data array. |
add, compareTo, dec, div, equals, getImaginaryDouble, getImaginaryFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, hashCode, inc, mul, mul, mul, pow, pow, set, setImaginary, setImaginary, setOne, setZero, sub, toString, valueEqualscomplexConjugate, setComplexNumber, setComplexNumberclone, finalize, getClass, notify, notifyAll, wait, wait, waitdecIndex, decIndex, getIndex, incIndex, incIndex, updateIndexvalueEqualscomplexConjugate, setComplexNumber, setComplexNumberprotected final NativeImg<?,? extends DoubleAccess> img
protected DoubleAccess dataAccess
public DoubleType(NativeImg<?,? extends DoubleAccess> doubleStorage)
public DoubleType(double value)
public DoubleType(DoubleAccess access)
public DoubleType()
public void updateContainer(Object c)
NativeTypeCursor) to request an
update of the current data array.
As an example consider a CellCursor moving on a CellImg.
The cursor maintains a NativeType which provides access to the
image data. When the cursor moves from one cell to the next, the
underlying data array of the NativeType must be switched to the
data array of the new cell.
To achieve this, the CellCursor calls updateContainer()
with itself as the argument. updateContainer() in turn will call
NativeImg.update(Object) on it's container, passing along the
reference to the cursor. In this example, the container would be a
CellImg. While the NativeType does not know about the
type of the cursor, the container does. CellImg knows that it is
passed a CellCursor instance, which can be used to figure out the
current cell and the underlying data array, which is then returned to the
NativeType.
The idea behind this concept is maybe not obvious. The NativeType
knows 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 of NativeType
.
updateContainer in interface NativeType<DoubleType>c - reference to an accessor which can be passed on to the
container (which will know what to do with it).public Index index()
NativeTypeindex in interface NativeType<DoubleType>public DoubleType duplicateTypeOnSameNativeImg()
NativeTypeNativeType which stores in the same physical array.
This is only used internally.duplicateTypeOnSameNativeImg in interface NativeType<DoubleType>NativeType instance working on the same
NativeImgpublic NativeTypeFactory<DoubleType,DoubleAccess> getNativeTypeFactory()
getNativeTypeFactory in interface NativeType<DoubleType>public double get()
public void set(double f)
public float getRealFloat()
getRealFloat in interface ComplexType<DoubleType>public double getRealDouble()
getRealDouble in interface ComplexType<DoubleType>public void setReal(float real)
setReal in interface ComplexType<DoubleType>public void setReal(double real)
setReal in interface ComplexType<DoubleType>public double getMaxValue()
getMaxValue in interface RealType<DoubleType>public double getMinValue()
getMinValue in interface RealType<DoubleType>public double getMinIncrement()
getMinIncrement in interface RealType<DoubleType>public DoubleType createVariable()
TypeType variable which can only store one value.createVariable in interface Type<DoubleType>Type variablepublic DoubleType copy()
Typecopy in interface Type<DoubleType>Type variablepublic Fraction getEntitiesPerPixel()
NativeTypegetEntitiesPerPixel in interface NativeType<DoubleType>public int getBitsPerPixel()
getBitsPerPixel in interface RealType<DoubleType>public static boolean equals(double a,
double b)
Copyright © 2015–2022 ImgLib2. All rights reserved.