Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SbChannelList Class Reference

ImageViz List of channel to extract. More...

#include <ImageViz/SbChannelList.h>

Public Member Functions

 SbChannelList (size_t n, const uint32_t channels[])
 SbChannelList(1, {0}) means extract only the 1st channel.
 
 SbChannelList (size_t nbChannel)
 Construct channelList corresponding to all channel from 0 to n-1: {0, 1, 2, ..., n-1}.
 
uint32_t operator[] (uint32_t channelId) const
 Access specified channel id.
 
uint32_t getNumChannel () const
 Return number of channel to extract.
 

Friends

bool operator== (const SbChannelList &firstList, const SbChannelList &secondList)
 Equality comparison operator.
 
bool operator!= (const SbChannelList &firstList, const SbChannelList &secondList)
 Inequality comparison operator.
 

Detailed Description

ImageViz 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.

Definition at line 48 of file SbChannelList.h.

Constructor & Destructor Documentation

◆ SbChannelList() [1/2]

SbChannelList::SbChannelList ( size_t  n,
const uint32_t  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
nnumber of elements in channels array.
channelsand ordered set of int listing channel indices.

◆ SbChannelList() [2/2]

SbChannelList::SbChannelList ( size_t  nbChannel)

Construct channelList corresponding to all channel from 0 to n-1: {0, 1, 2, ..., n-1}.

Member Function Documentation

◆ getNumChannel()

uint32_t SbChannelList::getNumChannel ( ) const

Return number of channel to extract.

◆ operator[]()

uint32_t SbChannelList::operator[] ( uint32_t  channelId) const

Access specified channel id.

Throw exception if channelId > getNumChannel()

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const SbChannelList firstList,
const SbChannelList secondList 
)
friend

Inequality comparison operator.

◆ operator==

bool operator== ( const SbChannelList firstList,
const SbChannelList secondList 
)
friend

Equality comparison operator.


The documentation for this class was generated from the following file: