OpendTect  6.6
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 Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 Sequence ()
 
 Sequence (const char *)
 Find by name in SeqMgr. More...
 
 Sequence (const Sequence &)
 
 ~Sequence ()
 
unsigned char b (int idx) const
 
void changeColor (int, unsigned char, unsigned char, unsigned char)
 
void changePos (int, float)
 
void changeTransparency (int, Geom::Point2D< float >)
 
Color color (float pos) const
 0 <= pos <= 1 More...
 
void fillPar (IOPar &) const
 
void flipColor ()
 
void flipTransparency ()
 
unsigned char g (int idx) const
 
bool hasTransparency () const
 
bool isEmpty () const
 
bool isSegmentized () const
 
bool isSys () const
 
const ColormarkColor () const
 
int nrSegments () const
 
bool operator!= (const Sequence &) const
 
Sequenceoperator= (const Sequence &)
 
bool operator== (const Sequence &) const
 
float position (int idx) const
 
unsigned char r (int idx) const
 
void removeAllColors ()
 
void removeColor (int)
 
void removeTransparencies ()
 
void removeTransparencyAt (int)
 
int setColor (float pos, unsigned char, unsigned char, unsigned char)
 Inserts or changes color. More...
 
void setMarkColor (Color c)
 
void setNrSegments (int n)
 
void setTransparency (Geom::Point2D< float >)
 
void setType (Type tp)
 
void setUndefColor (Color c)
 
void simplify ()
 
int size () const
 
Geom::Point2D< float > transparency (int idx) const
 
float transparencyAt (float) const
 
int transparencySize () const
 
Type type () const
 
const ColorundefColor () const
 
bool usePar (const IOPar &)
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static const char * sKeyCtbl ()
 
static const char * sKeyMarkColor ()
 
static const char * sKeyNrSegments ()
 
static const char * sKeyRainbow ()
 
static const char * sKeyTransparency ()
 
static const char * sKeyUdfColor ()
 
static const char * sKeyValCol ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

Notifier< SequencecolorChanged
 
Notifier< SequencetoBeRemoved
 
Notifier< SequencetransparencyChanged
 

Protected Member Functions

float snapToSegmentCenter (float) const
 
void triggerAll ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

TypeSet< unsigned char > b_
 
TypeSet< unsigned char > g_
 
Color markcolor_
 
int nrsegments_
 
TypeSet< unsigned char > r_
 
TypeSet< Geom::Point2D< float > > tr_
 
Type type_
 
Color undefcolor_
 
TypeSet< float > x_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

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

◆ Type

Enumerator
System 
User 
Edited 

Constructor & Destructor Documentation

◆ Sequence() [1/3]

ColTab::Sequence::Sequence ( )

◆ Sequence() [2/3]

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

Find by name in SeqMgr.

◆ Sequence() [3/3]

ColTab::Sequence::Sequence ( const Sequence )

◆ ~Sequence()

ColTab::Sequence::~Sequence ( )

Member Function Documentation

◆ b()

unsigned char ColTab::Sequence::b ( int  idx) const
inline

◆ changeColor()

void ColTab::Sequence::changeColor ( int  ,
unsigned char  ,
unsigned char  ,
unsigned char   
)

◆ changePos()

void ColTab::Sequence::changePos ( int  ,
float   
)

◆ changeTransparency()

void ColTab::Sequence::changeTransparency ( int  ,
Geom::Point2D< float >   
)

◆ color()

Color ColTab::Sequence::color ( float  pos) const

0 <= pos <= 1

◆ fillPar()

void ColTab::Sequence::fillPar ( IOPar ) const

◆ flipColor()

void ColTab::Sequence::flipColor ( )

◆ flipTransparency()

void ColTab::Sequence::flipTransparency ( )

◆ g()

unsigned char ColTab::Sequence::g ( int  idx) const
inline

◆ hasTransparency()

bool ColTab::Sequence::hasTransparency ( ) const

◆ isEmpty()

bool ColTab::Sequence::isEmpty ( ) const
inline

◆ isSegmentized()

bool ColTab::Sequence::isSegmentized ( ) const
inline

◆ isSys()

bool ColTab::Sequence::isSys ( ) const
inline

◆ markColor()

const Color& ColTab::Sequence::markColor ( ) const
inline

◆ nrSegments()

int ColTab::Sequence::nrSegments ( ) const
inline

◆ operator!=()

bool ColTab::Sequence::operator!= ( const Sequence ) const

◆ operator=()

Sequence& ColTab::Sequence::operator= ( const Sequence )

◆ operator==()

bool ColTab::Sequence::operator== ( const Sequence ) const

◆ position()

float ColTab::Sequence::position ( int  idx) const
inline

◆ r()

unsigned char ColTab::Sequence::r ( int  idx) const
inline

◆ removeAllColors()

void ColTab::Sequence::removeAllColors ( )

◆ removeColor()

void ColTab::Sequence::removeColor ( int  )

◆ removeTransparencies()

void ColTab::Sequence::removeTransparencies ( )

◆ removeTransparencyAt()

void ColTab::Sequence::removeTransparencyAt ( int  )

◆ setColor()

int ColTab::Sequence::setColor ( float  pos,
unsigned char  ,
unsigned char  ,
unsigned char   
)

Inserts or changes color.

◆ setMarkColor()

void ColTab::Sequence::setMarkColor ( Color  c)
inline

◆ setNrSegments()

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.

◆ setTransparency()

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

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

◆ setType()

void ColTab::Sequence::setType ( Type  tp)
inline

◆ setUndefColor()

void ColTab::Sequence::setUndefColor ( Color  c)
inline

◆ simplify()

void ColTab::Sequence::simplify ( )

◆ size()

int ColTab::Sequence::size ( ) const
inline

◆ sKeyCtbl()

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

◆ sKeyMarkColor()

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

◆ sKeyNrSegments()

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

◆ sKeyRainbow()

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

◆ sKeyTransparency()

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

◆ sKeyUdfColor()

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

◆ sKeyValCol()

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

◆ snapToSegmentCenter()

float ColTab::Sequence::snapToSegmentCenter ( float  ) const
protected

◆ transparency()

Geom::Point2D<float> ColTab::Sequence::transparency ( int  idx) const
inline

◆ transparencyAt()

float ColTab::Sequence::transparencyAt ( float  ) const

◆ transparencySize()

int ColTab::Sequence::transparencySize ( ) const
inline

◆ triggerAll()

void ColTab::Sequence::triggerAll ( )
inlineprotected

◆ type()

Type ColTab::Sequence::type ( ) const
inline

◆ undefColor()

const Color& ColTab::Sequence::undefColor ( ) const
inline

◆ usePar()

bool ColTab::Sequence::usePar ( const IOPar )

Member Data Documentation

◆ b_

TypeSet<unsigned char> ColTab::Sequence::b_
protected

◆ colorChanged

Notifier<Sequence> ColTab::Sequence::colorChanged

◆ g_

TypeSet<unsigned char> ColTab::Sequence::g_
protected

◆ markcolor_

Color ColTab::Sequence::markcolor_
protected

◆ nrsegments_

int ColTab::Sequence::nrsegments_
protected

◆ r_

TypeSet<unsigned char> ColTab::Sequence::r_
protected

◆ toBeRemoved

Notifier<Sequence> ColTab::Sequence::toBeRemoved

◆ tr_

TypeSet< Geom::Point2D<float> > ColTab::Sequence::tr_
protected

◆ transparencyChanged

Notifier<Sequence> ColTab::Sequence::transparencyChanged

◆ type_

Type ColTab::Sequence::type_
protected

◆ undefcolor_

Color ColTab::Sequence::undefcolor_
protected

◆ x_

TypeSet<float> ColTab::Sequence::x_
protected

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