public interface CompoundDataFormat extends DataFormat
HObject
Modifier and Type | Method and Description |
---|---|
int |
getMemberCount()
Returns the number of members of the compound data object.
|
int[] |
getMemberDims(int i)
Returns the dimension sizes of the i-th member.
|
String[] |
getMemberNames()
Returns the names of the members of the compound data object.
|
int[] |
getMemberOrders()
Returns array containing the total number of elements of the members of the
compound data object.
|
Datatype[] |
getMemberTypes()
Returns an array of datatype objects of the compound members.
|
int |
getSelectedMemberCount()
Returns the number of selected members of the compound data object.
|
int[] |
getSelectedMemberOrders()
Returns array containing the total number of elements of the selected members
of the compound data object.
|
Datatype[] |
getSelectedMemberTypes()
Returns an array of datatype objects of the selected compound members.
|
boolean |
isMemberSelected(int idx)
Checks if a member of the compound data object is selected for read/write.
|
void |
selectMember(int idx)
Selects the i-th member for read/write.
|
void |
setAllMemberSelection(boolean selectAll)
Selects/deselects all members.
|
clearData, convertFromUnsignedC, convertToUnsignedC, getCompression, getData, getDatatype, getDims, getFillValue, getHeight, getOriginalClass, getRank, getSelectedDims, getSelectedIndex, getStartDims, getStride, getWidth, init, isInited, read, setData, write, write
int getMemberCount()
int getSelectedMemberCount()
For example, in a compound datatype of {int A, float B, char[] C}, users can choose to retrieve only {A, C} from the data object. In this case, getSelectedMemberCount() returns two.
String[] getMemberNames()
For example, for a compound datatype of {int A, float B, char[] C} getMemberNames() returns ["A", "B", "C"}.
boolean isMemberSelected(int idx)
idx
- the index of compound member.void selectMember(int idx)
idx
- the index of compound member.void setAllMemberSelection(boolean selectAll)
selectAll
- The indicator to select or deselect all members. If true, all
members are selected for read/write. If false, no member is
selected for read/write.int[] getMemberOrders()
For example, a compound dataset COMP has members of A, B and C as
COMP { int A; float B[5]; double C[2][3]; }getMemberOrders() will return an integer array of {1, 5, 6} to indicate that member A has one element, member B has 5 elements, and member C has 6 elements.
int[] getSelectedMemberOrders()
For example, a compound dataset COMP has members of A, B and C as
COMP { int A; float B[5]; double C[2][3]; }If A and B are selected, getSelectedMemberOrders() returns an array of {1, 5}
int[] getMemberDims(int i)
For example, a compound dataset COMP has members of A, B and C as
COMP { int A; float B[5]; double C[2][3]; }getMemberDims(2) returns an array of {2, 3}, while getMemberDims(1) returns an array of {5}, and getMemberDims(0) returns null.
i
- the i-th memberDatatype[] getMemberTypes()
Each member of a compound data object has its own datatype. The datatype of a member can be atomic or other compound datatype (nested compound). The datatype objects are setup at init().
Datatype[] getSelectedMemberTypes()
Copyright © 2018. All Rights Reserved.