OpendTect
7.0
|
Set of data points with group selection. More...
Classes | |
class | DataRow |
Data point with group. Group 0 means 'inactive', it can never be selected. More... | |
class | Pos |
Real Coord3D-position storable in BinIDValueSet + trc nr. More... | |
Public Types | |
typedef int | ColID |
typedef int | RowID |
Public Types inherited from DataPack | |
using | ID = DataPackID |
using | MgrID = DataPackMgrID |
Public Types inherited from ObjectWithName | |
typedef OD::String | name_type |
Public Member Functions | |
DataPointSet (bool is2d, bool minimal=false) | |
DataPointSet (const DataPointSet &) | |
DataPointSet (const DataPointSet &, const ::Pos::Filter &) | |
DataPointSet (const PosVecDataSet &, bool is2d, bool minimal=false) | |
DataPointSet (const TypeSet< DataRow > &, const BufferStringSet &valnms, bool is2d, bool minimal=false) | |
DataPointSet (const TypeSet< DataRow > &, const ObjectSet< DataColDef > &, bool is2d, bool minimal=false) | |
virtual | ~DataPointSet () |
void | addCol (const char *nm, const char *ref=0, const UnitOfMeasure *un=0) |
or use dataSet() to add columns More... | |
void | addRow (const DataRow &) |
When finished, you have to call dataChanged() More... | |
BinID | binID (RowID) const override |
BinIDValueSet & | bivSet () |
const BinIDValueSet & | bivSet () const |
int | bivSetIdx (ColID idx) const |
BinIDValueSet::SPos | bvsPos (RowID rid) const |
void | clearData () |
Keeps structure. More... | |
DataColDef & | colDef (ColID i) |
const DataColDef & | colDef (ColID i) const |
const char * | colName (ColID) const |
Coord | coord (RowID) const override |
void | dataChanged () |
DataRow | dataRow (RowID) const |
PosVecDataSet & | dataSet () |
const PosVecDataSet & | dataSet () const |
void | dumpInfo (StringPairSet &) const override |
bool | extractPositions (::Pos::Provider &, const ObjectSet< DataColDef > &, const ::Pos::Filter *f=0, TaskRunner *tr=0, bool filterAccept=true) |
RowID | find (const Pos &) const |
RowID | find (const Pos &, float horradius, float deltaz) const |
RowID | findFirst (const BinID &) const |
RowID | findFirst (const Coord &) const |
RowID | findFirst (const TrcKey &) const |
::Pos::GeomID | geomID (RowID) const |
bool | getRange (TrcKeyZSampling &) const |
RowID | getRowID (BinIDValueSet::SPos) const |
DataPointSet * | getSubselected (int maxsz, const TypeSet< int > *selected_cols=0, bool allow_udf_values=true, const ObjectSet< Interval< float > > *value_ranges=0) const |
float * | getValues (RowID) |
const float * | getValues (RowID) const |
unsigned short | group (RowID) const |
ColID | indexOf (const char *) const |
bool | is2D () const |
bool | isEmpty () const |
bool | isInactive (RowID rid) const |
bool | isMinimal () const |
bool | isSelected (RowID) const |
int | nrActive () const |
int | nrCols () const |
int | nrFixedCols () const |
float | nrKBytes () const override |
DataPointSet & | operator= (const DataPointSet &) |
Pos | pos (RowID) const |
void | purgeInactive () |
void | purgeSelected (bool selected_rows=true) |
void | randomSubselect (int maxsz) |
int | selGroup (RowID) const |
void | setEmpty () |
void | setGroup (RowID, unsigned short) |
void | setInactive (RowID, bool) |
bool | setRow (const DataRow &) |
void | setSelected (RowID, int selgrp) |
bool | setValue (ColID, RowID, float) |
bool | simpleCoords () const override |
If true, coords are always SI().tranform(b) More... | |
int | size () const override |
TrcKey | trcKey (RowID) const |
int | trcNr (RowID) const override |
const UnitOfMeasure * | unit (ColID) const |
bool | validColID (ColID) const |
float | value (ColID, RowID) const |
float | z (RowID) const override |
Public Member Functions inherited from PointDataPack | |
virtual bool | isOrdered () const |
If yes, one can draw a line between the pts. More... | |
Public Member Functions inherited from DataPack | |
virtual const char * | category () const |
FullID | fullID (DataPackMgrID mgrid) const |
DataPackID | id () const |
virtual bool | isOK () const |
DataPack * | obtain () |
void | release () |
Threads::Lock & | updateLock () const |
Public Member Functions inherited from SharedObject | |
SharedObject (const char *nm=nullptr) | |
SharedObject (const SharedObject &) | |
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 |
virtual CallBacker * | trueCaller () |
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 &) |
const name_type & | name () const override |
NamedObject & | operator= (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 |
Public Member Functions inherited from RefCount::Referenced | |
void | addObserver (WeakPtrBase *obs) |
Not for normal use. May become private. More... | |
int | nrRefs () const |
Only for expert use. More... | |
void | ref () const |
bool | refIfReffed () const |
Don't use in production, for debugging. More... | |
void | removeObserver (WeakPtrBase *obs) |
Not for normal use. May become private. More... | |
bool | tryRef () const |
Not for normal use. May become private. More... | |
void | unRef () const |
void | unRefNoDelete () const |
Protected Member Functions | |
void | calcIdxs () |
DataColDef & | gtColDef (ColID) const |
void | init (const TypeSet< DataRow > &, const ObjectSet< DataColDef > &) |
void | initPVDS () |
Protected Member Functions inherited from PointDataPack | |
PointDataPack (const char *categry) | |
~PointDataPack () | |
Protected Member Functions inherited from DataPack | |
DataPack (const char *categry) | |
DataPack (const DataPack &) | |
~DataPack () | |
void | setCategory (const char *c) |
void | setManager (const DataPackMgr *) |
Protected Member Functions inherited from SharedObject | |
virtual | ~SharedObject () |
Protected Member Functions inherited from NamedCallBacker | |
void | sendDelNotif () const |
Protected Member Functions inherited from RefCount::Referenced | |
Referenced () | |
Referenced (const Referenced &) | |
virtual | ~Referenced () |
Referenced & | operator= (const Referenced &) |
Protected Attributes | |
TypeSet< BinIDValueSet::SPos > | bvsidxs_ |
PosVecDataSet & | data_ |
bool | is2d_ |
bool | minimal_ |
const int | nrfixedcols_ |
Protected Attributes inherited from DataPack | |
const BufferString | category_ |
const DataPackID | id_ |
const DataPackMgr * | manager_ = nullptr |
Threads::Lock | updatelock_ |
Protected Attributes inherited from NamedCallBacker | |
Threads::Atomic< bool > | delalreadytriggered_ |
Notifier< NamedCallBacker > | delnotif_ |
Protected Attributes inherited from NamedObject | |
BufferString | name_ |
Static Protected Attributes | |
static const int | groupcol_ |
Additional Inherited Members | |
Static Public Member Functions inherited from DataPack | |
static DataPackID | cNoID () |
static DataPackID | cUdfID () |
static DataPackID | getID (const FullID &fid) |
static const char * | sKeyCategory () |
Static Public Member Functions inherited from SharedObject | |
static Notifier< SharedObject > & | instanceCreated () |
Static Public Member Functions inherited from CallBacker | |
static void | createReceiverForCurrentThread () |
static void | removeReceiverForCurrentThread () |
Static Public Member Functions inherited from RefCount::Referenced | |
static bool | isSane (const Referenced *) |
Static Protected Member Functions inherited from DataPack | |
static DataPackID | getNewID () |
ensures a global data pack ID More... | |
static float | sKb2MbFac () |
1 / 1024 More... | |
Set of data points with group selection.
The idea is to generate a set of data points, which are then put in different groups. The data is transferred into a BinIDValueSet for performance, but a fixed int addressing becomes available.
The design is based on the model that you extract data in some way which should then be quickly accessible. The data set is not meant to be manipulated other than via setSelected() and setGroup().
For data associated with 2D seismics, you can specify that the DataPointSet needs to be 2D; then binid_ consists of GeomID and TrcNr.
Do not mix 2D and 3D.
For large sets, you may not be interested in precise X and Y, and grouping/selection. Then specify the 'minimal' flag on construction.
<>
typedef int DataPointSet::ColID |
typedef int DataPointSet::RowID |
DataPointSet::DataPointSet | ( | const TypeSet< DataRow > & | , |
const ObjectSet< DataColDef > & | , | ||
bool | is2d, | ||
bool | minimal = false |
||
) |
DataPointSet::DataPointSet | ( | const TypeSet< DataRow > & | , |
const BufferStringSet & | valnms, | ||
bool | is2d, | ||
bool | minimal = false |
||
) |
DataPointSet::DataPointSet | ( | const PosVecDataSet & | , |
bool | is2d, | ||
bool | minimal = false |
||
) |
DataPointSet::DataPointSet | ( | const DataPointSet & | , |
const ::Pos::Filter & | |||
) |
DataPointSet::DataPointSet | ( | const DataPointSet & | ) |
|
virtual |
|
explicit |
void DataPointSet::addCol | ( | const char * | nm, |
const char * | ref = 0 , |
||
const UnitOfMeasure * | un = 0 |
||
) |
or use dataSet() to add columns
void DataPointSet::addRow | ( | const DataRow & | ) |
When finished, you have to call dataChanged()
Implements PointDataPack.
BinIDValueSet& DataPointSet::bivSet | ( | ) |
The idea is to manage vectors with the selection mechanism. But if you really must remove vectors, this may be your access point
|
inline |
|
inline |
|
inline |
|
protected |
void DataPointSet::clearData | ( | ) |
Keeps structure.
|
inline |
|
inline |
const char* DataPointSet::colName | ( | ColID | ) | const |
Reimplemented from PointDataPack.
|
inline |
When data modified, you want to call this. all RowIDs may change In case you want to change the definition of a col
|
inline |
To add/remove columns. Never remove the position columns!
|
inline |
|
overridevirtual |
Reimplemented from DataPack.
bool DataPointSet::extractPositions | ( | ::Pos::Provider & | , |
const ObjectSet< DataColDef > & | , | ||
const ::Pos::Filter * | f = 0 , |
||
TaskRunner * | tr = 0 , |
||
bool | filterAccept = true |
||
) |
::Pos::GeomID DataPointSet::geomID | ( | RowID | ) | const |
bool DataPointSet::getRange | ( | TrcKeyZSampling & | ) | const |
RowID DataPointSet::getRowID | ( | BinIDValueSet::SPos | ) | const |
DataPointSet* DataPointSet::getSubselected | ( | int | maxsz, |
const TypeSet< int > * | selected_cols = 0 , |
||
bool | allow_udf_values = true , |
||
const ObjectSet< Interval< float > > * | value_ranges = 0 |
||
) | const |
float* DataPointSet::getValues | ( | RowID | ) |
const float* DataPointSet::getValues | ( | RowID | ) | const |
unsigned short DataPointSet::group | ( | RowID | ) | const |
|
protected |
ColID DataPointSet::indexOf | ( | const char * | ) | const |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
bool DataPointSet::isSelected | ( | RowID | ) | const |
int DataPointSet::nrActive | ( | ) | const |
int DataPointSet::nrCols | ( | ) | const |
|
inline |
|
overridevirtual |
Implements DataPack.
DataPointSet& DataPointSet::operator= | ( | const DataPointSet & | ) |
void DataPointSet::purgeInactive | ( | ) |
void DataPointSet::purgeSelected | ( | bool | selected_rows = true | ) |
void DataPointSet::randomSubselect | ( | int | maxsz | ) |
int DataPointSet::selGroup | ( | RowID | ) | const |
void DataPointSet::setEmpty | ( | ) |
void DataPointSet::setGroup | ( | RowID | , |
unsigned short | |||
) |
void DataPointSet::setInactive | ( | RowID | , |
bool | |||
) |
bool DataPointSet::setRow | ( | const DataRow & | ) |
Can be add or change Returns whether it's an add (see addRow)
void DataPointSet::setSelected | ( | RowID | , |
int | selgrp | ||
) |
|
inlineoverridevirtual |
If true, coords are always SI().tranform(b)
Reimplemented from PointDataPack.
|
inlineoverridevirtual |
Implements PointDataPack.
|
overridevirtual |
Reimplemented from PointDataPack.
const UnitOfMeasure* DataPointSet::unit | ( | ColID | ) | const |
bool DataPointSet::validColID | ( | ColID | ) | const |
|
overridevirtual |
Implements PointDataPack.
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024