Package net.imglib2.type.label
Class BasePairBitType
- All Implemented Interfaces:
Comparable<BasePairBitType>
,BasePairType<BasePairBitType>
,NativeType<BasePairBitType>
,ValueEquals<BasePairBitType>
,Type<BasePairBitType>
public class BasePairBitType
extends AbstractBit64Type<BasePairBitType>
implements BasePairType<BasePairBitType>
Representation of base pairs using 3 bits per entry, supported characters: gap, N, A, T, G, C, U
Bases are handled using the
BasePairBitType.Base
enumeration.- Author:
- Stephan Preibisch, Stephan Saalfeld
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class net.imglib2.type.AbstractBitType
dataAccess, i, img, nBits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte
int
void
copy()
NativeImg<BasePairBitType,
? extends LongAccess> createSuitableNativeImg
(NativeImgFactory<BasePairBitType> storageFactory, long[] dim) TheNativeType
creates theNativeImg
used for storing image data; based on the given storage strategy and its size.Creates a newType
variable which can only store one value.Creates a newNativeType
which stores in the same physical array.get()
void
Sets the value of anotherType
.void
set
(BasePairBitType.Base base) toString()
boolean
Methods inherited from class net.imglib2.type.AbstractBit64Type
getBits, setBits
Methods inherited from class net.imglib2.type.AbstractBitType
decIndex, decIndex, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateContainer, updateIndex
-
Constructor Details
-
BasePairBitType
-
BasePairBitType
-
BasePairBitType
public BasePairBitType()
-
-
Method Details
-
createSuitableNativeImg
public NativeImg<BasePairBitType,? extends LongAccess> createSuitableNativeImg(NativeImgFactory<BasePairBitType> 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.- Specified by:
createSuitableNativeImg
in interfaceNativeType<BasePairBitType>
- Parameters:
storageFactory
- which storage strategy is useddim
- the dimensions- Returns:
- the instantiated
NativeImg
where only theType
knows the BasicType it contains.
-
duplicateTypeOnSameNativeImg
Description copied from interface:NativeType
Creates a newNativeType
which stores in the same physical array. This is only used internally.- Specified by:
duplicateTypeOnSameNativeImg
in interfaceNativeType<BasePairBitType>
- Returns:
- a new
NativeType
instance working on the sameNativeImg
-
set
- Specified by:
set
in interfaceBasePairType<BasePairBitType>
-
get
- Specified by:
get
in interfaceBasePairType<BasePairBitType>
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BasePairBitType>
-
complement
public void complement()- Specified by:
complement
in interfaceBasePairType<BasePairBitType>
-
baseToValue
public byte baseToValue()- Specified by:
baseToValue
in interfaceBasePairType<BasePairBitType>
-
set
Description copied from interface:Type
Sets the value of anotherType
.- Specified by:
set
in interfaceType<BasePairBitType>
- Parameters:
c
- the new value
-
createVariable
Description copied from interface:Type
Creates a newType
variable which can only store one value.- Specified by:
createVariable
in interfaceType<BasePairBitType>
- Returns:
- a new
Type
variable
-
copy
Description copied from interface:Type
- Specified by:
copy
in interfaceType<BasePairBitType>
- Returns:
- a new
Type
variable
-
toString
-
valueEquals
- Specified by:
valueEquals
in interfaceValueEquals<BasePairBitType>
-