OpendTect  7.0
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
ColTab::Mapper Class Reference

Maps data values to colortable positions: [0,1]. More...

Public Member Functions

 Mapper ()
 defaults maps from [0,1] to [0,1] More...
 
 Mapper (const Mapper &)
 
 Mapper (const Mapper &, bool shareclipper)
 
 ~Mapper ()
 
const ValueSeries< float > * data () const
 
od_int64 dataSize () const
 
bool isFlipped () const
 
Mapperoperator= (const Mapper &)
 
float position (float val) const
 returns position in ColorTable More...
 
const Interval< float > & range () const
 
void setData (const ArrayND< float > &, TaskRunner *=nullptr)
 If data changes, call update() More...
 
void setData (const float *, od_int64 sz, TaskRunner *=nullptr)
 
void setData (const ValueSeries< float > &, TaskRunner *=nullptr)
 
void setFlipped (bool yn)
 
void setRange (const Interval< float > &)
 
void update (bool full=true, TaskRunner *=nullptr)
 If !full, will assume data is unchanged. More...
 

Static Public Member Functions

static int snappedPosition (const Mapper *, float val, int nrsteps, int udfval)
 

Public Attributes

MapperSetup setup_
 

Protected Attributes

const ArrayND< float > * arrnd_ = nullptr
 
DataClipperclipper_
 
bool clipperismine_
 
const float * dataptr_ = nullptr
 
od_int64 datasz_ = -1
 
const ValueSeries< float > * vs_ = nullptr
 

Detailed Description

Maps data values to colortable positions: [0,1].

If nrsegs_ > 0, the mapper will return the centers of the segments only. For example, if nsegs_ == 3, only positions returned are 1/6, 3/6 and 5/6.

<>

Constructor & Destructor Documentation

◆ Mapper() [1/3]

ColTab::Mapper::Mapper ( )

defaults maps from [0,1] to [0,1]

◆ Mapper() [2/3]

ColTab::Mapper::Mapper ( const Mapper )

◆ Mapper() [3/3]

ColTab::Mapper::Mapper ( const Mapper ,
bool  shareclipper 
)

◆ ~Mapper()

ColTab::Mapper::~Mapper ( )

Member Function Documentation

◆ data()

const ValueSeries<float>* ColTab::Mapper::data ( ) const
inline

◆ dataSize()

od_int64 ColTab::Mapper::dataSize ( ) const
inline

◆ isFlipped()

bool ColTab::Mapper::isFlipped ( ) const
inline

◆ operator=()

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

◆ position()

float ColTab::Mapper::position ( float  val) const

returns position in ColorTable

◆ range()

const Interval<float>& ColTab::Mapper::range ( ) const

◆ setData() [1/3]

void ColTab::Mapper::setData ( const ArrayND< float > &  ,
TaskRunner = nullptr 
)

If data changes, call update()

◆ setData() [2/3]

void ColTab::Mapper::setData ( const float *  ,
od_int64  sz,
TaskRunner = nullptr 
)

◆ setData() [3/3]

void ColTab::Mapper::setData ( const ValueSeries< float > &  ,
TaskRunner = nullptr 
)

◆ setFlipped()

void ColTab::Mapper::setFlipped ( bool  yn)
inline

◆ setRange()

void ColTab::Mapper::setRange ( const Interval< float > &  )

◆ snappedPosition()

static int ColTab::Mapper::snappedPosition ( const Mapper ,
float  val,
int  nrsteps,
int  udfval 
)
static

◆ update()

void ColTab::Mapper::update ( bool  full = true,
TaskRunner = nullptr 
)

If !full, will assume data is unchanged.

Member Data Documentation

◆ arrnd_

const ArrayND<float>* ColTab::Mapper::arrnd_ = nullptr
protected

◆ clipper_

DataClipper* ColTab::Mapper::clipper_
protected

◆ clipperismine_

bool ColTab::Mapper::clipperismine_
protected

◆ dataptr_

const float* ColTab::Mapper::dataptr_ = nullptr
protected

◆ datasz_

od_int64 ColTab::Mapper::datasz_ = -1
protected

◆ setup_

MapperSetup ColTab::Mapper::setup_

◆ vs_

const ValueSeries<float>* ColTab::Mapper::vs_ = nullptr
protected

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