Package net.imglib2.type.label
Class BasePairBitType
- java.lang.Object
-
- net.imglib2.type.AbstractBitType<T>
-
- net.imglib2.type.AbstractBit64Type<BasePairBitType>
-
- net.imglib2.type.label.BasePairBitType
-
- All Implemented Interfaces:
java.lang.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 theBasePairBitType.Base
enumeration.- Author:
- Stephan Preibisch, Stephan Saalfeld
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BasePairBitType.Base
-
Field Summary
-
Fields inherited from class net.imglib2.type.AbstractBitType
dataAccess, i, img, nBits
-
-
Constructor Summary
Constructors Constructor Description BasePairBitType()
BasePairBitType(NativeImg<?,? extends LongAccess> bitStorage)
BasePairBitType(BasePairBitType.Base value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
baseToValue()
int
compareTo(BasePairBitType c)
void
complement()
BasePairBitType
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.BasePairBitType
createVariable()
Creates a newType
variable which can only store one value.BasePairBitType
duplicateTypeOnSameNativeImg()
Creates a newNativeType
which stores in the same physical array.BasePairBitType.Base
get()
void
set(BasePairBitType c)
Sets the value of anotherType
.void
set(BasePairBitType.Base base)
java.lang.String
toString()
boolean
valueEquals(BasePairBitType t)
-
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 Detail
-
BasePairBitType
public BasePairBitType(NativeImg<?,? extends LongAccess> bitStorage)
-
BasePairBitType
public BasePairBitType(BasePairBitType.Base value)
-
BasePairBitType
public BasePairBitType()
-
-
Method Detail
-
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
public BasePairBitType 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
public void set(BasePairBitType.Base base)
- Specified by:
set
in interfaceBasePairType<BasePairBitType>
-
get
public BasePairBitType.Base get()
- Specified by:
get
in interfaceBasePairType<BasePairBitType>
-
compareTo
public int compareTo(BasePairBitType c)
- Specified by:
compareTo
in interfacejava.lang.Comparable<BasePairBitType>
-
complement
public void complement()
- Specified by:
complement
in interfaceBasePairType<BasePairBitType>
-
baseToValue
public byte baseToValue()
- Specified by:
baseToValue
in interfaceBasePairType<BasePairBitType>
-
set
public void set(BasePairBitType c)
Description copied from interface:Type
Sets the value of anotherType
.- Specified by:
set
in interfaceType<BasePairBitType>
- Parameters:
c
- the new value
-
createVariable
public BasePairBitType 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
public BasePairBitType copy()
Description copied from interface:Type
- Specified by:
copy
in interfaceType<BasePairBitType>
- Returns:
- a new
Type
variable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
valueEquals
public boolean valueEquals(BasePairBitType t)
- Specified by:
valueEquals
in interfaceValueEquals<BasePairBitType>
-
-