OpendTect  6.3
coltabmappersetup.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 / Feb 2017
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "coltab.h"
14 #include "sharedobject.h"
15 
16 
17 namespace ColTab
18 {
19 
28 {
29 public:
30 
32 
33  MapperSetup();
34  MapperSetup(const RangeType&);
36 
37  // Use a fixed range, or obtain range by some form of clipping?
38  mImplSimpleMonitoredGet( isFixed,bool,isfixed_);
39  mImplSimpleMonitoredGet( range,RangeType,range_);
40  void setNotFixed();
41  void setFixedRange(RangeType);
42 
43  // Use Histogram equalisation?
44  mImplSimpleMonitoredGetSet(inline,doHistEq,setDoHistEq,
45  bool,dohisteq_,cDoHistEqChange());
46 
47  // Do we, and how do we segment?
48  mImplSimpleMonitoredGetSet(inline,nrSegs,setNrSegs,
49  int,nrsegs_,cSegChange());
50  // How do we use the Sequence?
51  mImplSimpleMonitoredGetSet(inline,seqUseMode,setSeqUseMode,
52  SeqUseMode,sequsemode_,cUseModeChange());
53 
54 
55  // The parameters for auto-scaling
56  mImplSimpleMonitoredGetSet(inline,clipRate,setClipRate,
57  ClipRatePair,cliprate_,cAutoScaleChange());
58  mImplSimpleMonitoredGetSet(inline,guessSymmetry,setGuessSymmetry,
59  bool,guesssymmetry_,cAutoScaleChange());
60  mImplSimpleMonitoredGetSet(inline,symMidVal,setSymMidVal,
61  ValueType,symmidval_,cAutoScaleChange());
62 
63  bool hasSegmentation() const
64  { return nrSegs() != 0; }
65 
66  bool isMappingChange(ChangeType) const;
67 
68  void fillPar(IOPar&) const;
69  void usePar(const IOPar&);
70 
71  static const char* sKeyRange() { return "Range"; }
72  static const char* sKeyClipRate() { return "Clip Rate"; }
73  static const char* sKeyAutoSym() { return "Auto Sym"; }
74  static const char* sKeySymMidVal() { return "Sym Mid Value"; }
75  static const char* sKeyFlipSeq() { return "Flip seq"; }
76  static const char* sKeyCycleSeq() { return "Cycle seq"; }
77 
78  static ChangeType cIsFixedChange() { return 2; }
79  static ChangeType cRangeChange() { return 3; }
80  static ChangeType cDoHistEqChange() { return 4; }
81  static ChangeType cAutoScaleChange() { return 5; }
82  static ChangeType cSegChange() { return 6; }
83  static ChangeType cUseModeChange() { return 7; }
84 
86 
87 protected:
88 
89  virtual ~MapperSetup();
90 
91  bool isfixed_;
92  bool dohisteq_;
93  RangeType range_;
97  int nrsegs_;
99 
100  friend class Mapper;
101  void setCalculatedRange(const RangeType&) const;
102 
103 };
104 
105 } // namespace ColTab
SeqUseMode sequsemode_
Definition: coltabmappersetup.h:98
#define mExpClass(module)
Definition: commondefs.h:157
int ChangeType
Definition: monitorable.h:80
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:200
Definition: sharedobject.h:18
#define mImplSimpleMonitoredGet(fnnm, typ, memb)
Defines simple MT-safe copyable member get.
Definition: monitor.h:21
Maps data values to color sequence positions: [0,1].
Definition: coltabmapper.h:33
#define mDeclMonitorableAssignment(clss)
like mDeclAbstractMonitorableAssignment but for non-abstract subclasses. Implements the clone() metho...
Definition: monitor.h:111
bool guesssymmetry_
Definition: coltabmappersetup.h:95
static const char * sKeyCycleSeq()
Definition: coltabmappersetup.h:76
static const char * sKeyFlipSeq()
Definition: coltabmappersetup.h:75
Notifier< MapperSetup > rangeCalculated
Definition: coltabmappersetup.h:85
Class to help setup a callback handling.
Definition: notify.h:121
int nrsegs_
Definition: coltabmappersetup.h:97
static ChangeType cSegChange()
Definition: coltabmappersetup.h:82
ClipRatePair cliprate_
Definition: coltabmappersetup.h:94
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:53
bool dohisteq_
Definition: coltabmappersetup.h:92
#define mImplSimpleMonitoredGetSet(pfx, fnnmget, fnnmset, typ, memb, chgtyp)
Defines simple MT-safe copyable member access.
Definition: monitor.h:39
bool hasSegmentation() const
Definition: coltabmappersetup.h:63
float ValueType
Definition: coltab.h:23
static const char * sKeyRange()
Definition: coltabmappersetup.h:71
static ChangeType cDoHistEqChange()
Definition: coltabmappersetup.h:80
Parameters for the colortable Mapper.
Definition: coltabmappersetup.h:27
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:187
static const char * sKeyAutoSym()
Definition: coltabmappersetup.h:73
static ChangeType cUseModeChange()
Definition: coltabmappersetup.h:83
static const char * sKeyClipRate()
Definition: coltabmappersetup.h:72
SeqUseMode
Definition: coltab.h:27
std::pair< float, float > ClipRatePair
Definition: coltab.h:26
static ChangeType cRangeChange()
Definition: coltabmappersetup.h:79
static ChangeType cAutoScaleChange()
Definition: coltabmappersetup.h:81
bool isfixed_
Definition: coltabmappersetup.h:91
Interval< ValueType > RangeType
Definition: coltabmappersetup.h:31
Definition: coltab.h:20
ValueType symmidval_
Definition: coltabmappersetup.h:96
RangeType range_
Definition: coltabmappersetup.h:93
static const char * sKeySymMidVal()
Definition: coltabmappersetup.h:74
static ChangeType cIsFixedChange()
Definition: coltabmappersetup.h:78

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