public abstract class AbstractBit64Type<T extends AbstractBit64Type<T>> extends AbstractBitType<T>
Type
with arbitrary bit depth up to maximum 64 bits.
The behavior beyond 64 bits is undefined.
To set and get bits, we use longs. Therefore not more than 64 bits are supported. The long is not
supposed to have anything to do with math, it is simply an efficient way to hold an array of bits
The performance of this type is traded off for the gain in memory storage.
The setBits(long)
operation takes have the time as the getBits()
operation.
The performance may degrade very slightly with increasing bit depth, but the decrease is barely noticeable.dataAccess, i, img, nBits
Constructor and Description |
---|
AbstractBit64Type(int nBits) |
AbstractBit64Type(LongAccess access,
int nBits) |
AbstractBit64Type(long value,
int nBits) |
AbstractBit64Type(NativeImg<?,? extends LongAccess> bitStorage,
int nBits) |
Modifier and Type | Method and Description |
---|---|
protected long |
getBits()
Writes the current "subLong" location of the LongAccess into the lower nBits bits of the long value
Note that "long value" does not refer to math, it is just a way to help to return arbitrary values.
|
protected void |
setBits(long value)
Sets the lower nBits bits of the long value into the current "subLong" location of the LongAccess
Note that "long value" does not refer to math, it is just a way to help to set arbitrary values.
|
getEntitiesPerPixel, getNativeTypeFactory, index, updateContainer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decIndex, decIndex, duplicateTypeOnSameNativeImg, getIndex, incIndex, incIndex, updateIndex
copy, createVariable, set
valueEquals
public AbstractBit64Type(NativeImg<?,? extends LongAccess> bitStorage, int nBits)
public AbstractBit64Type(long value, int nBits)
public AbstractBit64Type(LongAccess access, int nBits)
public AbstractBit64Type(int nBits)
protected long getBits()
protected void setBits(long value)
value
- Copyright © 2015–2022 ImgLib2. All rights reserved.