Package net.imglib2.type.numeric.integer
Class UnsignedIntType
- java.lang.Object
-
- net.imglib2.type.numeric.complex.AbstractComplexType<T>
-
- net.imglib2.type.numeric.real.AbstractRealType<T>
-
- net.imglib2.type.numeric.integer.AbstractIntegerType<T>
-
- net.imglib2.type.numeric.integer.GenericIntType<UnsignedIntType>
-
- net.imglib2.type.numeric.integer.UnsignedIntType
-
- All Implemented Interfaces:
java.lang.Comparable<UnsignedIntType>
,NativeType<UnsignedIntType>
,ComplexType<UnsignedIntType>
,IntegerType<UnsignedIntType>
,NumericType<UnsignedIntType>
,RealType<UnsignedIntType>
,Add<UnsignedIntType>
,Div<UnsignedIntType>
,Mul<UnsignedIntType>
,MulFloatingPoint
,SetOne
,SetZero
,Sub<UnsignedIntType>
,ValueEquals<UnsignedIntType>
,Type<UnsignedIntType>
public class UnsignedIntType extends GenericIntType<UnsignedIntType>
TODO- Author:
- Stephan Preibisch, Stephan Saalfeld
-
-
Field Summary
-
Fields inherited from class net.imglib2.type.numeric.integer.GenericIntType
dataAccess, img
-
-
Constructor Summary
Constructors Constructor Description UnsignedIntType()
UnsignedIntType(long value)
UnsignedIntType(IntAccess access)
UnsignedIntType(NativeImg<?,? extends IntAccess> img)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(UnsignedIntType c)
int
compareTo(UnsignedIntType c)
UnsignedIntType
copy()
NativeImg<UnsignedIntType,? extends IntAccess>
createSuitableNativeImg(NativeImgFactory<UnsignedIntType> storageFactory, long[] dim)
TheNativeType
creates theNativeImg
used for storing image data; based on the given storage strategy and its size.UnsignedIntType
createVariable()
Creates a newType
variable which can only store one value.void
dec()
void
div(UnsignedIntType c)
UnsignedIntType
duplicateTypeOnSameNativeImg()
Creates a newNativeType
which stores in the same physical array.long
get()
java.math.BigInteger
getBigInteger()
static int
getCodedSignedInt(long unsignedInt)
static int
getCodedSignedIntChecked(long unsignedInt)
int
getInteger()
long
getIntegerLong()
double
getMaxValue()
double
getMinValue()
static long
getUnsignedInt(int signedInt)
int
hashCode()
void
inc()
void
mul(double c)
void
mul(float c)
void
mul(UnsignedIntType c)
void
set(long f)
void
setBigInteger(java.math.BigInteger b)
void
setInteger(int f)
void
setInteger(long f)
void
setOne()
void
setZero()
void
sub(UnsignedIntType c)
java.lang.String
toString()
-
Methods inherited from class net.imglib2.type.numeric.integer.GenericIntType
decIndex, decIndex, getBitsPerPixel, getEntitiesPerPixel, getIndex, getInt, getValue, incIndex, incIndex, set, setInt, setValue, updateContainer, updateIndex, valueEquals
-
Methods inherited from class net.imglib2.type.numeric.integer.AbstractIntegerType
getMinIncrement, getRealDouble, getRealFloat, setReal, setReal
-
Methods inherited from class net.imglib2.type.numeric.real.AbstractRealType
equals, getImaginaryDouble, getImaginaryFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, setImaginary, setImaginary
-
Methods inherited from class net.imglib2.type.numeric.complex.AbstractComplexType
complexConjugate, setComplexNumber, setComplexNumber
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.type.numeric.ComplexType
complexConjugate, getImaginaryDouble, getImaginaryFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, setComplexNumber, setComplexNumber, setImaginary, setImaginary
-
-
-
-
Method Detail
-
getCodedSignedIntChecked
public static int getCodedSignedIntChecked(long unsignedInt)
-
getCodedSignedInt
public static int getCodedSignedInt(long unsignedInt)
-
getUnsignedInt
public static long getUnsignedInt(int signedInt)
-
createSuitableNativeImg
public NativeImg<UnsignedIntType,? extends IntAccess> createSuitableNativeImg(NativeImgFactory<UnsignedIntType> storageFactory, long[] dim)
Description copied from interface:NativeType
TheNativeType
creates theNativeImg
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 containers and the basic types.
-
duplicateTypeOnSameNativeImg
public UnsignedIntType duplicateTypeOnSameNativeImg()
Description copied from interface:NativeType
Creates a newNativeType
which stores in the same physical array. This is only used internally.- Returns:
- a new
NativeType
instance working on the sameNativeImg
-
mul
public void mul(float c)
- Specified by:
mul
in interfaceMulFloatingPoint
- Overrides:
mul
in classGenericIntType<UnsignedIntType>
-
mul
public void mul(double c)
- Specified by:
mul
in interfaceMulFloatingPoint
- Overrides:
mul
in classGenericIntType<UnsignedIntType>
-
add
public void add(UnsignedIntType c)
- Specified by:
add
in interfaceAdd<UnsignedIntType>
- Overrides:
add
in classGenericIntType<UnsignedIntType>
-
div
public void div(UnsignedIntType c)
- Specified by:
div
in interfaceDiv<UnsignedIntType>
- Overrides:
div
in classGenericIntType<UnsignedIntType>
-
mul
public void mul(UnsignedIntType c)
- Specified by:
mul
in interfaceMul<UnsignedIntType>
- Overrides:
mul
in classGenericIntType<UnsignedIntType>
-
sub
public void sub(UnsignedIntType c)
- Specified by:
sub
in interfaceSub<UnsignedIntType>
- Overrides:
sub
in classGenericIntType<UnsignedIntType>
-
setOne
public void setOne()
- Specified by:
setOne
in interfaceSetOne
- Overrides:
setOne
in classGenericIntType<UnsignedIntType>
-
setZero
public void setZero()
- Specified by:
setZero
in interfaceSetZero
- Overrides:
setZero
in classGenericIntType<UnsignedIntType>
-
inc
public void inc()
- Specified by:
inc
in interfaceRealType<UnsignedIntType>
- Overrides:
inc
in classGenericIntType<UnsignedIntType>
-
dec
public void dec()
- Specified by:
dec
in interfaceRealType<UnsignedIntType>
- Overrides:
dec
in classGenericIntType<UnsignedIntType>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classGenericIntType<UnsignedIntType>
-
get
public long get()
-
set
public void set(long f)
-
getInteger
public int getInteger()
-
getIntegerLong
public long getIntegerLong()
-
getBigInteger
public java.math.BigInteger getBigInteger()
-
setInteger
public void setInteger(int f)
-
setInteger
public void setInteger(long f)
-
setBigInteger
public void setBigInteger(java.math.BigInteger b)
-
getMaxValue
public double getMaxValue()
-
getMinValue
public double getMinValue()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classGenericIntType<UnsignedIntType>
-
compareTo
public int compareTo(UnsignedIntType c)
- Specified by:
compareTo
in interfacejava.lang.Comparable<UnsignedIntType>
- Overrides:
compareTo
in classGenericIntType<UnsignedIntType>
-
createVariable
public UnsignedIntType createVariable()
Description copied from interface:Type
Creates a newType
variable which can only store one value.- Returns:
- a new
Type
variable
-
copy
public UnsignedIntType copy()
Description copied from interface:Type
- Returns:
- a new
Type
variable
-
-