Enum Constant and Description |
---|
BYTE |
DOUBLE |
FLOAT |
INT |
LONG |
SHORT |
UBYTE |
UINT |
ULONG |
UNDEFINED
Deprecated.
Use
null instance instead |
USHORT |
Modifier and Type | Field and Description |
---|---|
static double |
INT_MAX_VALUE |
static float |
INT_MAX_VALUE_F |
static double |
INT_MIN_VALUE |
static float |
INT_MIN_VALUE_F |
static double |
LONG_MAX_VALUE |
static float |
LONG_MAX_VALUE_F |
static double |
LONG_MIN_VALUE |
static float |
LONG_MIN_VALUE_F |
static double |
UBYTE_MAX_VALUE
cached
|
static float |
UBYTE_MAX_VALUE_F |
static double |
UINT_MAX_VALUE |
static float |
UINT_MAX_VALUE_F |
static double |
ULONG_MAX_VALUE |
static float |
ULONG_MAX_VALUE_F |
static double |
USHORT_MAX_VALUE |
static float |
USHORT_MAX_VALUE_F |
Modifier and Type | Method and Description |
---|---|
int |
getBitSize()
Return the size (in bit) of the specified dataType
|
double[] |
getBounds()
Get the bounds
[min,max] for current DataType. |
static DataType |
getDataType(java.lang.Class<?> classType)
Return a DataType from the specified primitive class type
|
static DataType |
getDataType(int oldDataType)
Return a DataType from old dataType.
|
static DataType |
getDataType(int oldDataType,
boolean signed)
Return a DataType from old dataType.
|
static DataType |
getDataType(java.lang.String value)
Return a DataType from the specified string.
|
static DataType |
getDataTypeFromDataBufferType(int dataBufferType)
Return a DataType from the specified DataBuffer type.
|
static DataType |
getDataTypeFromFormatToolsType(int type)
Return a DataType from the specified FormatTools type.
|
static DataType |
getDataTypeFromPixelType(ome.xml.model.enums.PixelType type)
Return a DataType from the specified PixelType.
|
static DataType |
getDataTypeFromVTKType(int vtkType)
Return a DataType from the specified VTK type.
|
double[] |
getDefaultBounds()
Get the default bounds for current DataType.
|
static java.lang.String[] |
getItems(boolean javaTypeOnly,
boolean longString,
boolean wantUndef)
Return all dataType as String items array (can be used for ComboBox).
|
DataType |
getJavaType()
Return the java compatible data type (signed integer type only).
|
double |
getMaxValue()
Return the maximum value for current DataType
|
double |
getMinValue()
Return the minimum value for current DataType
|
int |
getSize()
Return the size (in byte) of the specified dataType
|
boolean |
isFloat()
Return true if this is a float data type
|
boolean |
isInteger()
Return true if this is an integer data type
|
boolean |
isJavaType()
Return true if this is a compatible java data type (signed integer type only)
|
boolean |
isSameJavaType(DataType dataType)
Return true if specified data type has same "basic" type (no sign information) data type
|
boolean |
isSigned()
Return true if this is a signed data type
|
int |
sizeOf()
Deprecated.
Use
getSize() instead |
int |
toDataBufferType()
Return the DataBuffer type corresponding to current DataType
|
java.lang.String |
toLongString()
Convert DataType to long String (long description with bpp information)
|
ome.xml.model.enums.PixelType |
toPixelType()
Return the PixelType corresponding to current DataType
|
java.lang.Class<?> |
toPrimitiveClass()
Return the corresponding primitive class type corresponding to this DataType.
|
java.lang.String |
toString() |
java.lang.String |
toString(boolean longString)
Convert DataType to String.
|
static DataType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final double UBYTE_MAX_VALUE
public static final double USHORT_MAX_VALUE
public static final double UINT_MAX_VALUE
public static final double ULONG_MAX_VALUE
public static final double INT_MIN_VALUE
public static final double LONG_MIN_VALUE
public static final double INT_MAX_VALUE
public static final double LONG_MAX_VALUE
public static final float UBYTE_MAX_VALUE_F
public static final float USHORT_MAX_VALUE_F
public static final float UINT_MAX_VALUE_F
public static final float ULONG_MAX_VALUE_F
public static final float INT_MIN_VALUE_F
public static final float LONG_MIN_VALUE_F
public static final float INT_MAX_VALUE_F
public static final float LONG_MAX_VALUE_F
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static java.lang.String[] getItems(boolean javaTypeOnly, boolean longString, boolean wantUndef)
javaTypeOnly
- Define if we want only java compatible data type (no unsigned integer types)longString
- Define if we want long string format (bpp information)wantUndef
- Define if we want the UNDEFINED data type in the listpublic static DataType getDataType(java.lang.String value)
getDataType("byte")
will return DataType.BYTE
public static DataType getDataType(int oldDataType, boolean signed)
getDataTypeFromOldDataType(TypeUtil.BYTE, false)
will return DataType.UBYTE
public static DataType getDataType(int oldDataType)
getDataType(TypeUtil.BYTE)
will return DataType.BYTE
public static DataType getDataType(java.lang.Class<?> classType)
public static DataType getDataTypeFromVTKType(int vtkType)
getDataTypeFromVTKType(VtkUtil.VTK_INT)
will return DataType.INT
public static DataType getDataTypeFromDataBufferType(int dataBufferType)
getDataTypeFromDataBufferType(DataBuffer.TYPE_BYTE)
will return DataType.UBYTE
public static DataType getDataTypeFromFormatToolsType(int type)
getDataTypeFromFormatToolsType(FormatTools.UINT8)
will return DataType.UBYTE
public static DataType getDataTypeFromPixelType(ome.xml.model.enums.PixelType type)
getDataTypeFromPixelType(FormatTools.UINT8)
will return DataType.UBYTE
public DataType getJavaType()
public double getMinValue()
public double getMaxValue()
public double[] getDefaultBounds()
[0,1]
for Float or Double DataType.public double[] getBounds()
[min,max]
for current DataType.public boolean isJavaType()
public boolean isSigned()
public boolean isFloat()
public boolean isInteger()
public int getSize()
public int getBitSize()
public boolean isSameJavaType(DataType dataType)
public java.lang.Class<?> toPrimitiveClass()
public int toDataBufferType()
public ome.xml.model.enums.PixelType toPixelType()
public java.lang.String toString(boolean longString)
longString
- Define if we want long description (bpp information)public java.lang.String toLongString()