OpendTect  6.3
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
ColTab::Table Class Reference

Table of colors at regular value positions. More...

Public Types

typedef TypeSet< ColorSetType
 

Public Member Functions

 Table (const Sequence &, int sz, SeqUseMode)
 
 Table (const Sequence &, int sz, const Mapper &)
 
 Table (const SetType &, SamplingType)
 
int size () const
 
Color color (int idx) const
 
SamplingType sampling () const
 
int indexFor (ValueType) const
 no udf protection More...
 
Color colorAt (ValueType) const
 no udf protection More...
 
Color snappedColorAt (ValueType val) const
 

Protected Member Functions

void setColor (const Sequence &, const Mapper &, int)
 

Protected Attributes

SetType cols_
 
SamplingType sampling_
 

Private Member Functions

void createTable (const Sequence &seq, const Mapper &, int)
 

Friends

class TableFiller
 

Detailed Description

Table of colors at regular value positions.

You usually create the table from a Sequence and a Mapper. The Mapper::seqPosition() and Sequence::color() calls can be quite costly. For standard jobs involving a lot of data you cannot afford that. So, you need to pre-calculate a fixed number of exact colors and snap to those, or, if you can want to and you can afford it, interpolate. So, you use this class.

The indexFor() and getColorAt() functions do not check on undef or rubbish being passed. Check this yourself and take appropriate action. You can pass values outside the range though (returns first or last index or color).

Member Typedef Documentation

Constructor & Destructor Documentation

ColTab::Table::Table ( const Sequence ,
int  sz,
SeqUseMode   
)
ColTab::Table::Table ( const Sequence ,
int  sz,
const Mapper  
)
ColTab::Table::Table ( const SetType ,
SamplingType   
)

Member Function Documentation

Color ColTab::Table::color ( int  idx) const
inline
Color ColTab::Table::colorAt ( ValueType  ) const

no udf protection

void ColTab::Table::createTable ( const Sequence seq,
const Mapper ,
int   
)
private
int ColTab::Table::indexFor ( ValueType  ) const

no udf protection

SamplingType ColTab::Table::sampling ( ) const
inline
void ColTab::Table::setColor ( const Sequence ,
const Mapper ,
int   
)
protected
int ColTab::Table::size ( ) const
inline
Color ColTab::Table::snappedColorAt ( ValueType  val) const
inline

Friends And Related Function Documentation

friend class TableFiller
friend

Member Data Documentation

SetType ColTab::Table::cols_
protected
SamplingType ColTab::Table::sampling_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017