OpendTect  6.3
coltabmapper.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Bert
8  Date: Sep 2007 / Mar 2017
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "coltabmappersetup.h"
14 #include "datadistribution.h"
15 
16 
17 namespace ColTab
18 {
19 
33 mExpClass(General) Mapper : public SharedObject
34 {
35 public:
36 
39 
40  Mapper();
41  Mapper(RangeType);
42  Mapper(const MapperSetup&);
44 
45  MapperSetup& setup() { return *setup_; }
46  const MapperSetup& setup() const { return *setup_; }
47  DistribType& distribution() { return *distrib_; }
48  const DistribType& distribution() const { return *distrib_; }
49 
50  RangeType getRange() const;
51 
52  PosType relPosition(ValueType) const;
53  PosType seqPosition(ValueType) const;
54  int colIndex(ValueType,int nrcolors) const;
55 
56  static ChangeType cMappingChange() { return 2; }
57 
58 protected:
59 
60  ~Mapper();
61 
64 
65  void setNotifs();
66  static PosType getLinRelPos(const RangeType&,ValueType);
67  PosType getHistEqRelPos(const RangeType&,ValueType) const;
68  void determineRange() const;
69 
70  void setupChgCB(CallBacker*);
71  void distribChgCB(CallBacker*);
72 
73 };
74 
75 
76 } // namespace ColTab
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
DistribType & distribution()
Definition: coltabmapper.h:47
int ChangeType
Definition: monitorable.h:80
Definition: sharedobject.h:18
RefMan< DistribType > distrib_
Definition: coltabmapper.h:63
MapperSetup::RangeType RangeType
Definition: coltabmapper.h:37
Maps data values to color sequence positions: [0,1].
Definition: coltabmapper.h:33
MapperSetup & setup()
Definition: coltabmapper.h:45
#define mDeclMonitorableAssignment(clss)
like mDeclAbstractMonitorableAssignment but for non-abstract subclasses. Implements the clone() metho...
Definition: monitor.h:111
const DistribType & distribution() const
Definition: coltabmapper.h:48
float ValueType
Definition: coltab.h:23
DataDistribution< ValueType > DistribType
Definition: coltabmapper.h:38
Parameters for the colortable Mapper.
Definition: coltabmappersetup.h:27
const MapperSetup & setup() const
Definition: coltabmapper.h:46
RefMan< MapperSetup > setup_
Definition: coltabmapper.h:62
Definition: coltab.h:20
Sharable data distribution. Sampling defaults to 0 step 1.
Definition: datadistribution.h:42
float PosType
Definition: coltab.h:24
static ChangeType cMappingChange()
Definition: coltabmapper.h:56
Definition: ptrman.h:200

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