public class ComplexFloatType extends AbstractComplexType<ComplexFloatType> implements NativeType<ComplexFloatType>
Modifier and Type | Field and Description |
---|---|
protected FloatAccess |
dataAccess |
protected NativeImg<?,? extends FloatAccess> |
img |
Constructor and Description |
---|
ComplexFloatType() |
ComplexFloatType(FloatAccess access) |
ComplexFloatType(float r,
float i) |
ComplexFloatType(NativeImg<?,? extends FloatAccess> complexfloatStorage) |
Modifier and Type | Method and Description |
---|---|
void |
add(ComplexFloatType c) |
void |
complexConjugate() |
ComplexFloatType |
copy()
|
ComplexFloatType |
createVariable()
Creates a new
Type variable which can only store one value. |
void |
div(ComplexFloatType c) |
ComplexFloatType |
duplicateTypeOnSameNativeImg()
Creates a new
NativeType which stores in the same physical array. |
boolean |
equals(Object obj) |
Fraction |
getEntitiesPerPixel()
Get the number of entities in the storage array required to store one
pixel value.
|
double |
getImaginaryDouble() |
float |
getImaginaryFloat() |
NativeTypeFactory<ComplexFloatType,FloatAccess> |
getNativeTypeFactory() |
double |
getRealDouble() |
float |
getRealFloat() |
int |
hashCode() |
Index |
index()
Get the (modifiable) index into the current data array.
|
void |
mul(ComplexFloatType t) |
void |
set(ComplexFloatType c)
Sets the value of another
Type . |
void |
set(float r,
float i) |
void |
setImaginary(double i) |
void |
setImaginary(float i) |
void |
setReal(double r) |
void |
setReal(float r) |
void |
sub(ComplexFloatType c) |
void |
switchRealComplex() |
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(ComplexFloatType t) |
getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, mul, mul, pow, pow, setComplexNumber, setComplexNumber, setOne, setZero, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
decIndex, decIndex, getIndex, incIndex, incIndex, updateIndex
protected final NativeImg<?,? extends FloatAccess> img
protected FloatAccess dataAccess
public ComplexFloatType(NativeImg<?,? extends FloatAccess> complexfloatStorage)
public ComplexFloatType(float r, float i)
public ComplexFloatType(FloatAccess access)
public ComplexFloatType()
public void updateContainer(Object c)
NativeType
Cursor
) 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<ComplexFloatType>
c
- reference to an accessor which can be passed on to the
container (which will know what to do with it).public Index index()
NativeType
index
in interface NativeType<ComplexFloatType>
public ComplexFloatType duplicateTypeOnSameNativeImg()
NativeType
NativeType
which stores in the same physical array.
This is only used internally.duplicateTypeOnSameNativeImg
in interface NativeType<ComplexFloatType>
NativeType
instance working on the same
NativeImg
public NativeTypeFactory<ComplexFloatType,FloatAccess> getNativeTypeFactory()
getNativeTypeFactory
in interface NativeType<ComplexFloatType>
public float getRealFloat()
getRealFloat
in interface ComplexType<ComplexFloatType>
public double getRealDouble()
getRealDouble
in interface ComplexType<ComplexFloatType>
public float getImaginaryFloat()
getImaginaryFloat
in interface ComplexType<ComplexFloatType>
public double getImaginaryDouble()
getImaginaryDouble
in interface ComplexType<ComplexFloatType>
public void setReal(float r)
setReal
in interface ComplexType<ComplexFloatType>
public void setReal(double r)
setReal
in interface ComplexType<ComplexFloatType>
public void setImaginary(float i)
setImaginary
in interface ComplexType<ComplexFloatType>
public void setImaginary(double i)
setImaginary
in interface ComplexType<ComplexFloatType>
public void set(float r, float i)
public void add(ComplexFloatType c)
add
in interface Add<ComplexFloatType>
add
in class AbstractComplexType<ComplexFloatType>
public void div(ComplexFloatType c)
div
in interface Div<ComplexFloatType>
div
in class AbstractComplexType<ComplexFloatType>
public void mul(ComplexFloatType t)
mul
in interface Mul<ComplexFloatType>
mul
in class AbstractComplexType<ComplexFloatType>
public void sub(ComplexFloatType c)
sub
in interface Sub<ComplexFloatType>
sub
in class AbstractComplexType<ComplexFloatType>
public void complexConjugate()
complexConjugate
in interface ComplexType<ComplexFloatType>
complexConjugate
in class AbstractComplexType<ComplexFloatType>
public void switchRealComplex()
public void set(ComplexFloatType c)
Type
Type
.set
in interface Type<ComplexFloatType>
set
in class AbstractComplexType<ComplexFloatType>
c
- the new valuepublic ComplexFloatType createVariable()
Type
Type
variable which can only store one value.createVariable
in interface Type<ComplexFloatType>
Type
variablepublic ComplexFloatType copy()
Type
copy
in interface Type<ComplexFloatType>
Type
variablepublic Fraction getEntitiesPerPixel()
NativeType
getEntitiesPerPixel
in interface NativeType<ComplexFloatType>
public boolean valueEquals(ComplexFloatType t)
valueEquals
in interface ValueEquals<ComplexFloatType>
valueEquals
in class AbstractComplexType<ComplexFloatType>
public boolean equals(Object obj)
equals
in class AbstractComplexType<ComplexFloatType>
public int hashCode()
hashCode
in class AbstractComplexType<ComplexFloatType>
Copyright © 2015–2022 ImgLib2. All rights reserved.