Class VoxelDataType
Object
VoxelDataType
- Direct Known Subclasses:
FloatVoxelType,SignedVoxelType,UnsignedVoxelType
The type of data that a single voxel represents in an image or related buffer.
- Author:
- Owen Feehan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longA placeholder value formaxValueorminValueif the true maximum or minimum value cannot be expressed as a long. -
Constructor Summary
ConstructorsConstructorDescriptionVoxelDataType(int bitDepth, String typeIdentifier, long maxValue, long minValue) Creates a newVoxelDataTypeinstance. -
Method Summary
Modifier and TypeMethodDescriptionintbitDepth()The number of bits required to represent a voxel.booleaninthashCode()abstract booleanWhether the data-type represents an integer or floating-point?abstract booleanWhether the data-type is unsigned?longmaxValue()The maximum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long.longminValue()The minimum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long.intThe number of bytes needed to represent this data-type.final StringtoString()
-
Field Details
-
VALUE_NOT_COMPATIBLE
public static final long VALUE_NOT_COMPATIBLEA placeholder value formaxValueorminValueif the true maximum or minimum value cannot be expressed as a long.- See Also:
-
-
Constructor Details
-
VoxelDataType
Creates a newVoxelDataTypeinstance.- Parameters:
bitDepth- The number of bits required to represent a voxel.typeIdentifier- A string to uniquely and compactly describe this type.maxValue- The maximum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long.minValue- The minimum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long.
-
-
Method Details
-
equals
-
hashCode
-
isInteger
public abstract boolean isInteger()Whether the data-type represents an integer or floating-point?- Returns:
- true if the data-type represents integers only, false if it is float-point.
-
isUnsigned
public abstract boolean isUnsigned()Whether the data-type is unsigned?- Returns:
- true if the data-type is unsigned, false if it is signed.
-
toString
-
numberBytes
public int numberBytes()The number of bytes needed to represent this data-type.- Returns:
- the number of bytes.
-
bitDepth
public int bitDepth()The number of bits required to represent a voxel. -
maxValue
public long maxValue()The maximum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long. -
minValue
public long minValue()The minimum value this type can represent, orVALUE_NOT_COMPATIBLEif it cannot be represented in a long.
-