Package net.imglib2.type.numeric.integer
Class Unsigned2BitType
- java.lang.Object
-
- net.imglib2.type.AbstractBitType<T>
-
- net.imglib2.type.numeric.integer.AbstractIntegerBitType<Unsigned2BitType>
-
- net.imglib2.type.numeric.integer.Unsigned2BitType
-
- All Implemented Interfaces:
java.lang.Comparable<Unsigned2BitType>,NativeType<Unsigned2BitType>,ComplexType<Unsigned2BitType>,IntegerType<Unsigned2BitType>,NumericType<Unsigned2BitType>,RealType<Unsigned2BitType>,Add<Unsigned2BitType>,Div<Unsigned2BitType>,Mul<Unsigned2BitType>,MulFloatingPoint,Pow<Unsigned2BitType>,PowFloatingPoint,SetOne,SetZero,Sub<Unsigned2BitType>,ValueEquals<Unsigned2BitType>,Type<Unsigned2BitType>
public class Unsigned2BitType extends AbstractIntegerBitType<Unsigned2BitType>
ATypewith a bit depth of 2. The performance of this type is traded off for the gain in memory storage.
-
-
Field Summary
Fields Modifier and Type Field Description private static longmaskprivate static NativeTypeFactory<Unsigned2BitType,LongAccess>typeFactory-
Fields inherited from class net.imglib2.type.AbstractBitType
dataAccess, i, img, nBits
-
-
Constructor Summary
Constructors Constructor Description Unsigned2BitType()Unsigned2BitType(long value)Unsigned2BitType(LongAccess access)Unsigned2BitType(NativeImg<?,? extends LongAccess> bitStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Unsigned2BitTypecopy()Unsigned2BitTypecreateVariable()Creates a newTypevariable which can only store one value.Unsigned2BitTypeduplicateTypeOnSameNativeImg()Creates a newNativeTypewhich stores in the same physical array.longget()NativeTypeFactory<Unsigned2BitType,LongAccess>getNativeTypeFactory()voidset(long value)-
Methods inherited from class net.imglib2.type.numeric.integer.AbstractIntegerBitType
add, compareTo, complexConjugate, dec, div, equals, getBigInteger, getBitsPerPixel, getImaginaryDouble, getImaginaryFloat, getInteger, getIntegerLong, getMaxValue, getMinIncrement, getMinValue, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getRealDouble, getRealFloat, hashCode, inc, mul, mul, mul, pow, pow, set, setBigInteger, setComplexNumber, setComplexNumber, setImaginary, setImaginary, setInteger, setInteger, setOne, setReal, setReal, setZero, sub, toString, valueEquals
-
Methods inherited from class net.imglib2.type.AbstractBitType
getEntitiesPerPixel, index, updateContainer
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.imglib2.type.NativeType
decIndex, decIndex, getIndex, incIndex, incIndex, updateIndex
-
-
-
-
Field Detail
-
mask
private static final long mask
- See Also:
- Constant Field Values
-
typeFactory
private static final NativeTypeFactory<Unsigned2BitType,LongAccess> typeFactory
-
-
Constructor Detail
-
Unsigned2BitType
public Unsigned2BitType(NativeImg<?,? extends LongAccess> bitStorage)
-
Unsigned2BitType
public Unsigned2BitType(long value)
-
Unsigned2BitType
public Unsigned2BitType(LongAccess access)
-
Unsigned2BitType
public Unsigned2BitType()
-
-
Method Detail
-
duplicateTypeOnSameNativeImg
public Unsigned2BitType duplicateTypeOnSameNativeImg()
Description copied from interface:NativeTypeCreates a newNativeTypewhich stores in the same physical array. This is only used internally.- Returns:
- a new
NativeTypeinstance working on the sameNativeImg
-
getNativeTypeFactory
public NativeTypeFactory<Unsigned2BitType,LongAccess> getNativeTypeFactory()
- Specified by:
getNativeTypeFactoryin interfaceNativeType<Unsigned2BitType>- Specified by:
getNativeTypeFactoryin classAbstractBitType<Unsigned2BitType>
-
get
public long get()
- Specified by:
getin classAbstractIntegerBitType<Unsigned2BitType>
-
set
public void set(long value)
- Specified by:
setin classAbstractIntegerBitType<Unsigned2BitType>
-
createVariable
public Unsigned2BitType createVariable()
Description copied from interface:TypeCreates a newTypevariable which can only store one value.- Returns:
- a new
Typevariable
-
copy
public Unsigned2BitType copy()
Description copied from interface:Type- Returns:
- a new
Typevariable
-
-