SbChannelList Class Reference

ImageViz List of channel to extract. More...

#include <ImageViz/SbChannelList.h>

List of all members.

Public Member Functions

 SbChannelList (size_t n, const uint32_t channels[])
 SbChannelList (size_t nbChannel)
uint32_t operator[] (uint32_t channelId) const
uint32_t getNumChannel () const


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

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.

Constructor & Destructor Documentation

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})

n number of elements in channels array.
channels and ordered set of int listing channel indices.
SbChannelList::SbChannelList ( size_t  nbChannel  ) 

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

.., n-1}

Member Function Documentation

uint32_t SbChannelList::getNumChannel (  )  const

Return number of channel to extract.

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

Access specified channel id.

Throw exception if channelId > getNumChannel()

Friends And Related Function Documentation

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

Inequality comparison operator.

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

Equality comparison operator.

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

Open Inventor Toolkit reference manual, generated on 16 Jul 2020
Copyright © Thermo Fisher Scientific All rights reserved.