Package net.imglib2.type.numeric.integer
Class UnsignedShortType
- 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.GenericShortType<UnsignedShortType>
-
- net.imglib2.type.numeric.integer.UnsignedShortType
-
- All Implemented Interfaces:
java.lang.Comparable<UnsignedShortType>
,NativeType<UnsignedShortType>
,ComplexType<UnsignedShortType>
,IntegerType<UnsignedShortType>
,NumericType<UnsignedShortType>
,RealType<UnsignedShortType>
,Add<UnsignedShortType>
,Div<UnsignedShortType>
,Mul<UnsignedShortType>
,MulFloatingPoint
,SetOne
,SetZero
,Sub<UnsignedShortType>
,ValueEquals<UnsignedShortType>
,Type<UnsignedShortType>
public class UnsignedShortType extends GenericShortType<UnsignedShortType>
TODO- Author:
- Stephan Preibisch, Stephan Saalfeld
-
-
Field Summary
-
Fields inherited from class net.imglib2.type.numeric.integer.GenericShortType
dataAccess, img
-
-
Constructor Summary
Constructors Constructor Description UnsignedShortType()
UnsignedShortType(int value)
UnsignedShortType(ShortAccess access)
UnsignedShortType(NativeImg<?,? extends ShortAccess> img)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(UnsignedShortType c)
int
compareTo(UnsignedShortType c)
UnsignedShortType
copy()
NativeImg<UnsignedShortType,? extends ShortAccess>
createSuitableNativeImg(NativeImgFactory<UnsignedShortType> storageFactory, long[] dim)
TheNativeType
creates theNativeImg
used for storing image data; based on the given storage strategy and its size.UnsignedShortType
createVariable()
Creates a newType
variable which can only store one value.void
dec()
void
div(UnsignedShortType c)
UnsignedShortType
duplicateTypeOnSameNativeImg()
Creates a newNativeType
which stores in the same physical array.int
get()
java.math.BigInteger
getBigInteger()
static short
getCodedSignedShort(int unsignedShort)
static short
getCodedSignedShortChecked(int unsignedShort)
int
getInteger()
long
getIntegerLong()
double
getMaxValue()
double
getMinValue()
static int
getUnsignedShort(short signedShort)
int
hashCode()
void
inc()
void
mul(double c)
void
mul(float c)
void
mul(UnsignedShortType c)
void
set(int f)
void
setBigInteger(java.math.BigInteger b)
void
setInteger(int f)
void
setInteger(long f)
void
sub(UnsignedShortType c)
java.lang.String
toString()
-
Methods inherited from class net.imglib2.type.numeric.integer.GenericShortType
decIndex, decIndex, getBitsPerPixel, getEntitiesPerPixel, getIndex, getShort, getValue, incIndex, incIndex, set, setOne, setShort, setValue, setZero, 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
-
-
-
-
Constructor Detail
-
UnsignedShortType
public UnsignedShortType(NativeImg<?,? extends ShortAccess> img)
-
UnsignedShortType
public UnsignedShortType(int value)
-
UnsignedShortType
public UnsignedShortType(ShortAccess access)
-
UnsignedShortType
public UnsignedShortType()
-
-
Method Detail
-
getCodedSignedShortChecked
public static short getCodedSignedShortChecked(int unsignedShort)
-
getCodedSignedShort
public static short getCodedSignedShort(int unsignedShort)
-
getUnsignedShort
public static int getUnsignedShort(short signedShort)
-
createSuitableNativeImg
public NativeImg<UnsignedShortType,? extends ShortAccess> createSuitableNativeImg(NativeImgFactory<UnsignedShortType> 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 UnsignedShortType 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 classGenericShortType<UnsignedShortType>
-
mul
public void mul(double c)
- Specified by:
mul
in interfaceMulFloatingPoint
- Overrides:
mul
in classGenericShortType<UnsignedShortType>
-
add
public void add(UnsignedShortType c)
- Specified by:
add
in interfaceAdd<UnsignedShortType>
- Overrides:
add
in classGenericShortType<UnsignedShortType>
-
div
public void div(UnsignedShortType c)
- Specified by:
div
in interfaceDiv<UnsignedShortType>
- Overrides:
div
in classGenericShortType<UnsignedShortType>
-
mul
public void mul(UnsignedShortType c)
- Specified by:
mul
in interfaceMul<UnsignedShortType>
- Overrides:
mul
in classGenericShortType<UnsignedShortType>
-
sub
public void sub(UnsignedShortType c)
- Specified by:
sub
in interfaceSub<UnsignedShortType>
- Overrides:
sub
in classGenericShortType<UnsignedShortType>
-
inc
public void inc()
- Specified by:
inc
in interfaceRealType<UnsignedShortType>
- Overrides:
inc
in classGenericShortType<UnsignedShortType>
-
dec
public void dec()
- Specified by:
dec
in interfaceRealType<UnsignedShortType>
- Overrides:
dec
in classGenericShortType<UnsignedShortType>
-
get
public int get()
-
set
public void set(int 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 classGenericShortType<UnsignedShortType>
-
compareTo
public int compareTo(UnsignedShortType c)
- Specified by:
compareTo
in interfacejava.lang.Comparable<UnsignedShortType>
- Overrides:
compareTo
in classGenericShortType<UnsignedShortType>
-
createVariable
public UnsignedShortType createVariable()
Description copied from interface:Type
Creates a newType
variable which can only store one value.- Returns:
- a new
Type
variable
-
copy
public UnsignedShortType copy()
Description copied from interface:Type
- Returns:
- a new
Type
variable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classGenericShortType<UnsignedShortType>
-
-