Package net.imglib2.type.numeric.integer
Class Unsigned4BitType
- java.lang.Object
-
- net.imglib2.type.AbstractBitType<T>
-
- net.imglib2.type.numeric.integer.AbstractIntegerBitType<Unsigned4BitType>
-
- net.imglib2.type.numeric.integer.Unsigned4BitType
-
- All Implemented Interfaces:
java.lang.Comparable<Unsigned4BitType>
,NativeType<Unsigned4BitType>
,ComplexType<Unsigned4BitType>
,IntegerType<Unsigned4BitType>
,NumericType<Unsigned4BitType>
,RealType<Unsigned4BitType>
,Add<Unsigned4BitType>
,Div<Unsigned4BitType>
,Mul<Unsigned4BitType>
,MulFloatingPoint
,SetOne
,SetZero
,Sub<Unsigned4BitType>
,ValueEquals<Unsigned4BitType>
,Type<Unsigned4BitType>
public class Unsigned4BitType extends AbstractIntegerBitType<Unsigned4BitType>
AType
with a bit depth of 4. 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 Unsigned4BitType()
Unsigned4BitType(long value)
Unsigned4BitType(LongAccess access)
Unsigned4BitType(NativeImg<?,? extends LongAccess> bitStorage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Unsigned4BitType
copy()
NativeImg<Unsigned4BitType,? extends LongAccess>
createSuitableNativeImg(NativeImgFactory<Unsigned4BitType> storageFactory, long[] dim)
TheNativeType
creates theNativeImg
used for storing image data; based on the given storage strategy and its size.Unsigned4BitType
createVariable()
Creates a newType
variable which can only store one value.Unsigned4BitType
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
-
Unsigned4BitType
public Unsigned4BitType(NativeImg<?,? extends LongAccess> bitStorage)
-
Unsigned4BitType
public Unsigned4BitType(long value)
-
Unsigned4BitType
public Unsigned4BitType(LongAccess access)
-
Unsigned4BitType
public Unsigned4BitType()
-
-
Method Detail
-
createSuitableNativeImg
public NativeImg<Unsigned4BitType,? extends LongAccess> createSuitableNativeImg(NativeImgFactory<Unsigned4BitType> 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 Unsigned4BitType 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<Unsigned4BitType>
-
set
public void set(long value)
- Specified by:
set
in classAbstractIntegerBitType<Unsigned4BitType>
-
createVariable
public Unsigned4BitType createVariable()
Description copied from interface:Type
Creates a newType
variable which can only store one value.- Returns:
- a new
Type
variable
-
copy
public Unsigned4BitType copy()
Description copied from interface:Type
- Returns:
- a new
Type
variable
-
-