Package com.openinventor.imageviz
Class SbChannelList
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.imageviz.SbChannelList
-
public class SbChannelList extends Inventor
List of channel to extract. Specify a list of channel to extract. For instance: {0, 1, 2} represent 3 first channels.SbChannelList
is an ordered set. Channels are present only one time and are sorted by order.Channels can be accessed with operator[]. Number of channel can be accessed with
getNumChannel()
.Note: Because it is an ordered set, for a given
SoImageDataAdapter
if channelList.getNumChannel() == image.getNumChannel(), this imply that channelList contains all the channels of image.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SbChannelList(long nbChannel)
Construct channelList corresponding to all channel from 0 to n-1: {0, 1, 2, ..., n-1}.SbChannelList(long n, int[] channels)
SbChannelList
(1, {0}) means extract only the 1st channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumChannel()
Return number of channel to extract.int
getValueAt(int channelId)
void
setValue(SbChannelList copyFrom)
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SbChannelList
public SbChannelList(long nbChannel)
Construct channelList corresponding to all channel from 0 to n-1: {0, 1, 2, ..., n-1}.
-
SbChannelList
public SbChannelList(long n, int[] channels)
SbChannelList
(1, {0}) means extract only the 1st channel.SbChannelList
(3, {0, 1, 2}) means extract the 3 first channels. For performances reasons, the given list must be an ordered set. Each element must appears only 1 time and must be in order. If it is not the case, an exception error will be thrown.example of invalid arguments:
SbChannelList
(3, {1, 1, 2})SbChannelList
(3, {3, 2, 1})- Parameters:
n
- number of elements in channels array.channels
- and ordered set of int listing channel indices.
-
-
Method Detail
-
getValueAt
public int getValueAt(int channelId)
-
setValue
public void setValue(SbChannelList copyFrom)
-
getNumChannel
public int getNumChannel()
Return number of channel to extract.
-
-