OpendTect-6_4  6.4
vismultiattribsurvobj.h
Go to the documentation of this file.
1 #ifndef vismultiattribsurvobj_h
2 #define vismultiattribsurvobj_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: 4-11-2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "vissurveymod.h"
17 #include "vissurvobj.h"
18 #include "visobject.h"
19 
20 namespace visBase
21 {
22  class TextureChannels;
23  class TextureChannel2RGBA;
24 };
25 
26 namespace ColTab { class MapperSetup; class Sequence; }
27 
28 namespace visSurvey
29 {
30 
37  , public SurveyObject
38 {
39 public:
40  bool turnOn(bool yn);
41  bool isOn() const;
42  bool isShown() const;
45 
46  virtual int nrResolutions() const = 0;
47  virtual void setResolution(int,TaskRunner*) = 0;
48  int getResolution() const;
49 
50  bool setChannels2RGBA(visBase::TextureChannel2RGBA*);
51  visBase::TextureChannel2RGBA* getChannels2RGBA();
52  visBase::TextureChannels* getChannels() const { return channels_; }
53 
54  bool canHaveMultipleAttribs() const;
55  bool canAddAttrib(int nrattribstoadd=1) const;
56  bool canRemoveAttrib() const;
57  int nrAttribs() const;
58  bool addAttrib();
59  bool removeAttrib(int attrib);
60  bool swapAttribs(int attrib0,int attrib1);
61  void setAttribTransparency(int,unsigned char);
62  unsigned char getAttribTransparency(int) const;
63  virtual void allowShading(bool);
64 
65  const Attrib::SelSpec* getSelSpec(int attrib,int version=0) const;
66  const TypeSet<Attrib::SelSpec>* getSelSpecs(int attrib) const;
67 
68  void setSelSpec(int,const Attrib::SelSpec&);
69  void setSelSpecs(int attrib,
71  void clearTextures();
74  void enableTextureInterpolation(bool);
75  bool textureInterpolationEnabled() const;
76 
77  bool isAngle(int attrib) const;
78  void setAngleFlag(int attrib,bool yn);
79  void enableAttrib(int attrib,bool yn);
80  bool isAttribEnabled(int attrib) const;
81  const TypeSet<float>* getHistogram(int) const;
82  int getColTabID(int) const;
83 
84  const ColTab::MapperSetup* getColTabMapperSetup(int attrib,
85  int version) const;
86  const ColTab::MapperSetup* getColTabMapperSetup(int) const;
87  void setColTabMapperSetup(int,
89  const ColTab::Sequence* getColTabSequence(int) const;
90  bool canSetColTabSequence() const;
91  void setColTabSequence(int,const ColTab::Sequence&,
92  TaskRunner*);
93 
94  bool canHaveMultipleTextures() const { return true; }
95  int nrTextures(int attrib) const;
96  void selectTexture(int attrib, int texture );
97  int selectedTexture(int attrib) const;
98 
99  void fillPar(IOPar&) const;
100  bool usePar(const IOPar&);
101  virtual bool canBDispOn2DViewer() const { return true; }
103  { return channels_; }
104  bool canDisplayInteractively(
105  Pos::GeomID geomid=-1) const;
106 
107  const char* errMsg() const { return errmsg_.str(); }
108 
109 protected:
110 
113  void getValueString(const Coord3&,
114  BufferString&) const;
116  virtual bool getCacheValue(int attrib,int version,
117  const Coord3&,float&) const = 0;
119 
120  void updateMainSwitch();
121  virtual void addCache() = 0;
122  virtual void removeCache(int) = 0;
123  virtual void swapCache(int,int) = 0;
124  virtual void emptyCache(int) = 0;
125  virtual bool hasCache(int) const = 0;
126  virtual bool init();
127 
129 
131 
132 private:
136 
137  static const char* sKeySequence();
138  static const char* sKeyMapper();
139  static const char* sKeyResolution();
140  static const char* sKeyTextTrans();
141 };
142 
143 } // namespace visSurvey
144 
145 #endif
#define mExpClass(module)
Definition: commondefs.h:160
void turnOn(int flag)
Overrides the envirnonment variable.
const char * str() const
Definition: odstring.h:48
Definition: vistexturechannels.h:50
int resolution_
Definition: vismultiattribsurvobj.h:130
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
bool init()
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
bool isAngle(DataType)
Definition: vistexturechannel2rgba.h:36
Set of pointers to objects.
Definition: commontypes.h:32
virtual bool canBDispOn2DViewer() const
Definition: vismultiattribsurvobj.h:101
VisualObjectImpl
Definition: visobject.h:128
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
bool isOn(int flag=0xffff)
Class that can execute a task.
Definition: task.h:169
bool canHaveMultipleTextures() const
Definition: vismultiattribsurvobj.h:94
bool onoffstatus_
Definition: vismultiattribsurvobj.h:135
bool enabletextureinterp_
Definition: vismultiattribsurvobj.h:134
Setup class for colortable Mapper.
Definition: coltabmapper.h:35
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: vismultiattribsurvobj.h:36
visBase::TextureChannels * channels_
Definition: vismultiattribsurvobj.h:128
Index_Type GeomID
Definition: commontypes.h:52
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
bool canEnableTextureInterpolation() const
Definition: vismultiattribsurvobj.h:102
BufferString errmsg_
Definition: horizontracker.h:119
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
Color Table
Definition: coltab.h:22
Specifies an attribute selection (ID or output number of NN).
Definition: attribsel.h:45
const char * errMsg() const
Definition: vismultiattribsurvobj.h:107
visBase::TextureChannels * getChannels() const
Definition: vismultiattribsurvobj.h:52
ObjectSet< TypeSet< Attrib::SelSpec > > as_
Definition: vismultiattribsurvobj.h:133

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