public class FloatType extends AbstractRealType<FloatType> implements NativeType<FloatType>
| Modifier and Type | Field and Description |
|---|---|
protected FloatAccess |
dataAccess |
protected NativeImg<?,? extends FloatAccess> |
img |
| Constructor and Description |
|---|
FloatType() |
FloatType(float value) |
FloatType(FloatAccess access) |
FloatType(NativeImg<?,? extends FloatAccess> floatStorage) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(FloatType c) |
int |
compareTo(FloatType other) |
FloatType |
copy()
|
FloatType |
createVariable()
Creates a new
Type variable which can only store one value. |
void |
dec() |
void |
div(FloatType c) |
FloatType |
duplicateTypeOnSameNativeImg()
Creates a new
NativeType which stores in the same physical array. |
static boolean |
equals(float a,
float b) |
boolean |
equals(Object obj) |
float |
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<FloatType,FloatAccess> |
getNativeTypeFactory() |
double |
getRealDouble() |
float |
getRealFloat() |
int |
hashCode() |
void |
inc() |
Index |
index()
Get the (modifiable) index into the current data array.
|
void |
mul(double c) |
void |
mul(float c) |
void |
mul(FloatType c) |
void |
set(float f) |
void |
set(FloatType c)
Sets the value of another
Type. |
void |
setOne() |
void |
setReal(double real) |
void |
setReal(float real) |
void |
setZero() |
void |
sub(FloatType c) |
void |
updateContainer(Object c)
This method is used by an accessor (e.g., a
Cursor) to request an
update of the current data array. |
boolean |
valueEquals(FloatType other) |
getImaginaryDouble, getImaginaryFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, pow, pow, setImaginary, setImaginary, toStringcomplexConjugate, setComplexNumber, setComplexNumberclone, finalize, getClass, notify, notifyAll, wait, wait, waitdecIndex, decIndex, getIndex, incIndex, incIndex, updateIndexcomplexConjugate, setComplexNumber, setComplexNumberprotected final NativeImg<?,? extends FloatAccess> img
protected FloatAccess dataAccess
public FloatType(NativeImg<?,? extends FloatAccess> floatStorage)
public FloatType(float value)
public FloatType(FloatAccess access)
public FloatType()
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<FloatType>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<FloatType>public FloatType duplicateTypeOnSameNativeImg()
NativeTypeNativeType which stores in the same physical array.
This is only used internally.duplicateTypeOnSameNativeImg in interface NativeType<FloatType>NativeType instance working on the same
NativeImgpublic NativeTypeFactory<FloatType,FloatAccess> getNativeTypeFactory()
getNativeTypeFactory in interface NativeType<FloatType>public float get()
public void set(float f)
public float getRealFloat()
getRealFloat in interface ComplexType<FloatType>public double getRealDouble()
getRealDouble in interface ComplexType<FloatType>public void setReal(float real)
setReal in interface ComplexType<FloatType>public void setReal(double real)
setReal in interface ComplexType<FloatType>public double getMaxValue()
getMaxValue in interface RealType<FloatType>public double getMinValue()
getMinValue in interface RealType<FloatType>public double getMinIncrement()
getMinIncrement in interface RealType<FloatType>public void mul(float c)
mul in interface MulFloatingPointmul in class AbstractRealType<FloatType>public void mul(double c)
mul in interface MulFloatingPointmul in class AbstractRealType<FloatType>public void add(FloatType c)
public void div(FloatType c)
public void mul(FloatType c)
public void sub(FloatType c)
public void set(FloatType c)
TypeType.public void setOne()
setOne in interface SetOnesetOne in class AbstractRealType<FloatType>public void setZero()
setZero in interface SetZerosetZero in class AbstractRealType<FloatType>public void inc()
public void dec()
public FloatType createVariable()
TypeType variable which can only store one value.createVariable in interface Type<FloatType>Type variablepublic Fraction getEntitiesPerPixel()
NativeTypegetEntitiesPerPixel in interface NativeType<FloatType>public int getBitsPerPixel()
getBitsPerPixel in interface RealType<FloatType>public int compareTo(FloatType other)
compareTo in interface Comparable<FloatType>compareTo in class AbstractRealType<FloatType>public boolean valueEquals(FloatType other)
valueEquals in interface ValueEquals<FloatType>valueEquals in class AbstractRealType<FloatType>public boolean equals(Object obj)
equals in class AbstractRealType<FloatType>public int hashCode()
hashCode in class AbstractRealType<FloatType>public static boolean equals(float a,
float b)
Copyright © 2015–2022 ImgLib2. All rights reserved.