OpendTect-6_4  6.4
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ColTab::Sequence Class Reference

Maps from [0,1] -> Color. More...

Inheritance diagram for ColTab::Sequence:
[legend]

Public Types

enum  Type { System, User, Edited }
 

Public Member Functions

 Sequence ()
 
 Sequence (const char *)
 Find by name in SeqMgr. More...
 
 Sequence (const Sequence &)
 
 ~Sequence ()
 
Sequenceoperator= (const Sequence &)
 
bool operator== (const Sequence &) const
 
bool operator!= (const Sequence &) const
 
bool isSys () const
 
Type type () const
 
void setType (Type tp)
 
Color color (float pos) const
 0 <= pos <= 1 More...
 
bool isEmpty () const
 
int size () const
 
float position (int idx) const
 
unsigned char r (int idx) const
 
unsigned char g (int idx) const
 
unsigned char b (int idx) const
 
int transparencySize () const
 
Geom::Point2D< float > transparency (int idx) const
 
float transparencyAt (float) const
 
void setTransparency (Geom::Point2D< float >)
 
void changeTransparency (int, Geom::Point2D< float >)
 
void removeTransparencies ()
 
void removeTransparencyAt (int)
 
bool hasTransparency () const
 
int nrSegments () const
 
void setNrSegments (int n)
 
bool isSegmentized () const
 
void changeColor (int, unsigned char, unsigned char, unsigned char)
 
void changePos (int, float)
 
int setColor (float pos, unsigned char, unsigned char, unsigned char)
 
void removeColor (int)
 
void removeAllColors ()
 
void flipColor ()
 
void flipTransparency ()
 
void fillPar (IOPar &) const
 
bool usePar (const IOPar &)
 
const ColorundefColor () const
 
void setUndefColor (Color c)
 
const ColormarkColor () const
 
void setMarkColor (Color c)
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static const char * sKeyValCol ()
 
static const char * sKeyMarkColor ()
 
static const char * sKeyUdfColor ()
 
static const char * sKeyTransparency ()
 
static const char * sKeyCtbl ()
 
static const char * sKeyNrSegments ()
 
static const char * sKeyRainbow ()
 

Public Attributes

Notifier< SequencecolorChanged
 
Notifier< SequencetransparencyChanged
 
Notifier< SequencetoBeRemoved
 

Protected Member Functions

void triggerAll ()
 
float snapToSegmentCenter (float) const
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

TypeSet< float > x_
 
TypeSet< unsigned char > r_
 
TypeSet< unsigned char > g_
 
TypeSet< unsigned char > b_
 
TypeSet< Geom::Point2D< float > > tr_
 
Color undefcolor_
 
Color markcolor_
 
Type type_
 
int nrsegments_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Detailed Description

Maps from [0,1] -> Color.

Standard color sequences ('Color tables') are read at program start, including the 'user defined' ones. Users can overrule the standard ones.

Sequences cannot be scaled, try the Mapper.

Member Enumeration Documentation

Enumerator
System 
User 
Edited 

Constructor & Destructor Documentation

ColTab::Sequence::Sequence ( )
ColTab::Sequence::Sequence ( const char *  )

Find by name in SeqMgr.

ColTab::Sequence::Sequence ( const Sequence )
ColTab::Sequence::~Sequence ( )

Member Function Documentation

unsigned char ColTab::Sequence::b ( int  idx) const
inline
void ColTab::Sequence::changeColor ( int  ,
unsigned  char,
unsigned  char,
unsigned  char 
)
void ColTab::Sequence::changePos ( int  ,
float   
)
void ColTab::Sequence::changeTransparency ( int  ,
Geom::Point2D< float >   
)
Color ColTab::Sequence::color ( float  pos) const

0 <= pos <= 1

void ColTab::Sequence::fillPar ( IOPar ) const
void ColTab::Sequence::flipColor ( )
void ColTab::Sequence::flipTransparency ( )
unsigned char ColTab::Sequence::g ( int  idx) const
inline
bool ColTab::Sequence::hasTransparency ( ) const
bool ColTab::Sequence::isEmpty ( ) const
inline
bool ColTab::Sequence::isSegmentized ( ) const
inline
bool ColTab::Sequence::isSys ( ) const
inline
const Color& ColTab::Sequence::markColor ( ) const
inline
int ColTab::Sequence::nrSegments ( ) const
inline
bool ColTab::Sequence::operator!= ( const Sequence ) const
Sequence& ColTab::Sequence::operator= ( const Sequence )
bool ColTab::Sequence::operator== ( const Sequence ) const
float ColTab::Sequence::position ( int  idx) const
inline
unsigned char ColTab::Sequence::r ( int  idx) const
inline
void ColTab::Sequence::removeAllColors ( )
void ColTab::Sequence::removeColor ( int  )
void ColTab::Sequence::removeTransparencies ( )
void ColTab::Sequence::removeTransparencyAt ( int  )
int ColTab::Sequence::setColor ( float  pos,
unsigned  char,
unsigned  char,
unsigned  char 
)
Parameters
posInsert or change
void ColTab::Sequence::setMarkColor ( Color  c)
inline
void ColTab::Sequence::setNrSegments ( int  n)
inline

nrsegments > 0 divide the ctab in equally wide nrsegments == 0 no segmentation nrsegments == -1 constant color between markers.

void ColTab::Sequence::setTransparency ( Geom::Point2D< float >  )

x goes from 0 to 1, trans from 0 to 255

void ColTab::Sequence::setType ( Type  tp)
inline
void ColTab::Sequence::setUndefColor ( Color  c)
inline
int ColTab::Sequence::size ( ) const
inline
static const char* ColTab::Sequence::sKeyCtbl ( )
static
static const char* ColTab::Sequence::sKeyMarkColor ( )
static
static const char* ColTab::Sequence::sKeyNrSegments ( )
static
static const char* ColTab::Sequence::sKeyRainbow ( )
static
static const char* ColTab::Sequence::sKeyTransparency ( )
static
static const char* ColTab::Sequence::sKeyUdfColor ( )
static
static const char* ColTab::Sequence::sKeyValCol ( )
static
float ColTab::Sequence::snapToSegmentCenter ( float  ) const
protected
Geom::Point2D<float> ColTab::Sequence::transparency ( int  idx) const
inline
float ColTab::Sequence::transparencyAt ( float  ) const
int ColTab::Sequence::transparencySize ( ) const
inline
void ColTab::Sequence::triggerAll ( )
inlineprotected
Type ColTab::Sequence::type ( ) const
inline
const Color& ColTab::Sequence::undefColor ( ) const
inline
bool ColTab::Sequence::usePar ( const IOPar )

Member Data Documentation

TypeSet<unsigned char> ColTab::Sequence::b_
protected
Notifier<Sequence> ColTab::Sequence::colorChanged
TypeSet<unsigned char> ColTab::Sequence::g_
protected
Color ColTab::Sequence::markcolor_
protected
int ColTab::Sequence::nrsegments_
protected
TypeSet<unsigned char> ColTab::Sequence::r_
protected
Notifier<Sequence> ColTab::Sequence::toBeRemoved
TypeSet< Geom::Point2D<float> > ColTab::Sequence::tr_
protected
Notifier<Sequence> ColTab::Sequence::transparencyChanged
Type ColTab::Sequence::type_
protected
Color ColTab::Sequence::undefcolor_
protected
TypeSet<float> ColTab::Sequence::x_
protected

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