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
,SetOne
,SetZero
,Sub<Unsigned2BitType>
,ValueEquals<Unsigned2BitType>
,Type<Unsigned2BitType>
public class Unsigned2BitType extends AbstractIntegerBitType<Unsigned2BitType>
AType
with a bit depth of 2. The performance of this type is traded off for the gain in memory storage.- Author:
- Albert Cardona
-
-
Field Summary
-
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 Unsigned2BitType
copy()
NativeImg<Unsigned2BitType,? extends LongAccess>
createSuitableNativeImg(NativeImgFactory<Unsigned2BitType> storageFactory, long[] dim)
TheNativeType
creates theNativeImg
used for storing image data; based on the given storage strategy and its size.Unsigned2BitType
createVariable()
Creates a newType
variable which can only store one value.Unsigned2BitType
duplicateTypeOnSameNativeImg()
Creates a newNativeType
which stores in the same physical array.long
get()
void
set(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, set, setBigInteger, setComplexNumber, setComplexNumber, setImaginary, setImaginary, setInteger, setInteger, setOne, setReal, setReal, setZero, sub, toString, valueEquals
-
Methods inherited from class net.imglib2.type.AbstractBitType
decIndex, decIndex, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateContainer, updateIndex
-
-
-
-
Constructor Detail
-
Unsigned2BitType
public Unsigned2BitType(NativeImg<?,? extends LongAccess> bitStorage)
-
Unsigned2BitType
public Unsigned2BitType(long value)
-
Unsigned2BitType
public Unsigned2BitType(LongAccess access)
-
Unsigned2BitType
public Unsigned2BitType()
-
-
Method Detail
-
createSuitableNativeImg
public NativeImg<Unsigned2BitType,? extends LongAccess> createSuitableNativeImg(NativeImgFactory<Unsigned2BitType> 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 Unsigned2BitType 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
-
get
public long get()
- Specified by:
get
in classAbstractIntegerBitType<Unsigned2BitType>
-
set
public void set(long value)
- Specified by:
set
in classAbstractIntegerBitType<Unsigned2BitType>
-
createVariable
public Unsigned2BitType createVariable()
Description copied from interface:Type
Creates a newType
variable which can only store one value.- Returns:
- a new
Type
variable
-
copy
public Unsigned2BitType copy()
Description copied from interface:Type
- Returns:
- a new
Type
variable
-
-