public class BitType extends IntegerTypeImpl<BitType> implements BooleanType<BitType>, RealType<BitType>
| Constructor and Description |
|---|
BitType() |
BitType(boolean value) |
BitType(DirectAccessContainer<BitType,? extends BitAccess> bitStorage) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(BitType c) |
void |
and(BitType c) |
int |
compareTo(BitType c) |
BitType |
copy()
|
BitType[] |
createArray1D(int size1)
Creates a 1d array of the generic
Type |
BitType[][] |
createArray2D(int size1,
int size2)
Creates a 2d array of the generic
Type |
BitType[][][] |
createArray3D(int size1,
int size2,
int size3)
Creates a 3d array of the generic
Type |
DirectAccessContainer<BitType,? extends BitAccess> |
createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory,
int[] dim)
The
Type creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. |
BitType |
createVariable()
Creates a new
Type which can only store one value. |
void |
dec() |
void |
div(BitType c) |
BitType |
duplicateTypeOnSameDirectAccessContainer()
Creates a new
Type which stores in the same physical array. |
boolean |
get() |
BitTypeDisplay |
getDefaultDisplay(Image<BitType> image)
|
int |
getInteger() |
long |
getIntegerLong() |
double |
getMaxValue() |
double |
getMinValue() |
void |
inc() |
void |
mul(BitType c) |
void |
mul(double c) |
void |
mul(float c) |
void |
not() |
void |
or(BitType c) |
void |
set(BitType c)
Sets the value of another
Type. |
void |
set(boolean value) |
void |
setInteger(int f) |
void |
setInteger(long f) |
void |
setOne() |
void |
setZero() |
void |
sub(BitType c) |
String |
toString() |
void |
updateContainer(Cursor<?> c)
|
void |
xor(BitType c) |
getMinIncrement, getRealDouble, getRealFloat, setReal, setRealdecIndex, decIndex, getComplexDouble, getComplexFloat, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, incIndex, incIndex, setComplex, setComplex, updateIndexcomplexConjugate, getPreferredRealPrecision, setComplexNumber, setComplexNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMinIncrementcomplexConjugate, getComplexDouble, getComplexFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getPreferredRealPrecision, getRealDouble, getRealFloat, setComplex, setComplex, setComplexNumber, setComplexNumber, setReal, setRealdecIndex, decIndex, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateIndexpublic BitType(DirectAccessContainer<BitType,? extends BitAccess> bitStorage)
public BitType(boolean value)
public BitType()
public DirectAccessContainer<BitType,? extends BitAccess> createSuitableDirectAccessContainer(DirectAccessContainerFactory storageFactory, int[] dim)
TypeType creates the DirectAccessContainer used for storing image data; based on the given storage strategy and its size. It
basically only decides here which BasicType it uses (float, int, byte, bit, ...) and how many entities per pixel it needs
(e.g. 2 floats per pixel for a complex number). This enables the separation of Image and the basic types.createSuitableDirectAccessContainer in interface Type<BitType>storageFactory - - Which storage strategy is useddim - - the dimensionsType knowns the BasicType it contains.public void updateContainer(Cursor<?> c)
TypeCursors to update the data current data array
of the Type, for example when moving from one Cell to the next.
If it is only an Array the Cursors never have to call that function.
The idea behind this concept is maybe not obvious. The Type knows which basic type
is used (float, int, byte, ...) but does not know how it is stored (Array, CellDirectAccessContainer, ...) to
prevent multiple implementations of Type.
That's why Type asks the DataAccess to give the actual basic array by passing the Cursor
that calls the method. The DataAccess is also an Array, CellDirectAccessContainer, ... which
can then communicate with the ArrayCursor, CellCursor, ... and return the current basic type array.
A typical implementation of this method looks like that (this is the FloatType implementation):
float[] v = floatStorage.getCurrentStorageArray( c );updateContainer in interface Type<BitType>c - - the Cursor gives a link to itself so that the Type
tell its DataAccess to get the new basic type array.public BitType duplicateTypeOnSameDirectAccessContainer()
TypeType which stores in the same physical array. This is only used internally.duplicateTypeOnSameDirectAccessContainer in interface Type<BitType>Type instance working on the same DirectAccessContainerpublic BitTypeDisplay getDefaultDisplay(Image<BitType> image)
TypeType creates the default Display for displaying the image contents. Only Type can do this as in Image
the Type is only a Generic. Later the user can create its own Displays if wanted.
This could be basically a static function.getDefaultDisplay in interface Type<BitType>getDefaultDisplay in class IntegerTypeImpl<BitType>image - - the image to create the Display forDisplaypublic boolean get()
get in interface BooleanType<BitType>public void set(boolean value)
set in interface BooleanType<BitType>public int getInteger()
getInteger in interface IntegerType<BitType>public long getIntegerLong()
getIntegerLong in interface IntegerType<BitType>public void setInteger(int f)
setInteger in interface IntegerType<BitType>public void setInteger(long f)
setInteger in interface IntegerType<BitType>public double getMaxValue()
getMaxValue in interface RealType<BitType>public double getMinValue()
getMinValue in interface RealType<BitType>public void set(BitType c)
TypeType.public void and(BitType c)
and in interface BooleanType<BitType>public void or(BitType c)
or in interface BooleanType<BitType>public void xor(BitType c)
xor in interface BooleanType<BitType>public void not()
not in interface BooleanType<BitType>public void add(BitType c)
add in interface NumericType<BitType>add in class RealTypeImpl<BitType>public void div(BitType c)
div in interface NumericType<BitType>div in class RealTypeImpl<BitType>public void mul(BitType c)
mul in interface NumericType<BitType>mul in class RealTypeImpl<BitType>public void sub(BitType c)
sub in interface NumericType<BitType>sub in class RealTypeImpl<BitType>public void mul(float c)
mul in interface NumericType<BitType>mul in class RealTypeImpl<BitType>public void mul(double c)
mul in interface NumericType<BitType>mul in class RealTypeImpl<BitType>public void setOne()
setOne in interface NumericType<BitType>setOne in class IntegerTypeImpl<BitType>public void setZero()
setZero in interface NumericType<BitType>setZero in class IntegerTypeImpl<BitType>public void inc()
public void dec()
public int compareTo(BitType c)
compareTo in interface Comparable<BitType>compareTo in class IntegerTypeImpl<BitType>public BitType[] createArray1D(int size1)
TypeTypecreateArray1D in interface Type<BitType>size1 - - the size of the arraypublic BitType[][] createArray2D(int size1, int size2)
TypeTypecreateArray2D in interface Type<BitType>size1 - - the size of the arraysize2 - - the size of the arraypublic BitType[][][] createArray3D(int size1, int size2, int size3)
TypeTypecreateArray3D in interface Type<BitType>size1 - - the size of the arraysize2 - - the size of the arraysize3 - - the size of the arraypublic BitType createVariable()
TypeType which can only store one value.createVariable in interface Type<BitType>Type instancepublic String toString()
toString in class IntegerTypeImpl<BitType>Copyright © 2015–2021 Fiji. All rights reserved.