OpendTect-6_4  6.4
vistexturechannel2rgba.h
Go to the documentation of this file.
1 #ifndef vistexturechannel2rgba_h
2 #define vistexturechannel2rgba_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: K. Tingdahl
9  Date: Sep 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visdata.h"
18 
19 
20 namespace ColTab { class Sequence; }
21 namespace osgGeo { class LayeredTexture; class ColorSequence; }
22 namespace osg { class Image; }
23 
24 namespace visBase
25 {
26 
27 class TextureChannels;
28 class MappedTextureDataSet;
29 
38 public:
39  virtual MappedTextureDataSet* createMappedDataSet() const;
40 
41  virtual void setChannels(TextureChannels*);
42  virtual void notifyChannelChange() {}
43  virtual void notifyChannelInsert(int ch) {}
44  virtual void notifyChannelRemove(int ch) {}
45 
46  virtual const osg::Image* createRGBA() const;
50  virtual bool canSetSequence() const { return false;}
51  virtual void setSequence(int,const ColTab::Sequence&){}
52  virtual const ColTab::Sequence* getSequence(int) const { return 0; }
53 
54  virtual void swapChannels(int ch0,int ch1) {}
55  virtual void setEnabled(int ch,bool yn) {}
56  virtual bool isEnabled(int ch) const { return true; }
57 
58  virtual bool canUseShading() const;
59  virtual void allowShading(bool);
60  virtual bool usesShading() const;
61 
62  virtual int maxNrChannels() const = 0;
63  virtual int minNrChannels() const { return 1; }
64  virtual void getChannelName(int,uiString&) const;
65 
66  int getTexturePixelSizeInBits() const;
67  const unsigned char* getTextureData() const;
68  int getTextureWidth() const;
69  int getTextureHeight() const;
70 
71 protected:
73 
75  osgGeo::LayeredTexture* laytex_;
76 };
77 
78 
83 {
84 public:
85  virtual int nrChannels() const = 0;
86  virtual bool addChannel() = 0;
87  virtual bool enableNotify(bool) = 0;
89  virtual void touch() = 0;
90  virtual void setNrChannels(int) = 0;
91 };
92 
93 
94 
100 {
101 public:
104 
105  void swapChannels(int ch0,int ch1);
106 
107  bool canSetSequence() const { return true;}
108  void setSequence(int ch,const ColTab::Sequence&);
109  const ColTab::Sequence* getSequence(int ch) const;
110 
111  void setEnabled(int ch,bool yn);
112  bool isEnabled(int ch) const;
113 
114  void setTransparency(int ch,unsigned char yn);
115  unsigned char getTransparency(int ch) const;
116 
117  int maxNrChannels() const;
118 
119 protected:
120  void notifyChannelInsert(int ch);
121  void notifyChannelRemove(int ch);
122 
123  void adjustNrChannels();
124  void setChannels(TextureChannels*);
125 
127 
128  void update();
129  void getColors(int channel,
130  TypeSet<unsigned char>&) const;
131 
135 
138 };
139 
140 } //namespace
141 
142 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Definition: vistexturechannels.h:50
ObjectSet< osgGeo::ColorSequence > osgcolsequences_
Definition: vistexturechannel2rgba.h:136
virtual void notifyChannelChange()
Definition: vistexturechannel2rgba.h:42
BoolTypeSet enabled_
Definition: vistexturechannel2rgba.h:133
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
TypeSet< unsigned char > opacity_
Definition: vistexturechannel2rgba.h:134
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Definition: vistexturechannel2rgba.h:82
Definition: uistring.h:89
virtual bool isEnabled(int ch) const
Definition: vistexturechannel2rgba.h:56
virtual bool canSetSequence() const
Definition: vistexturechannel2rgba.h:50
ObjectSet< ColTab::Sequence > coltabs_
Definition: vistexturechannel2rgba.h:132
virtual void notifyChannelRemove(int ch)
Definition: vistexturechannel2rgba.h:44
Definition: vistexturechannel2rgba.h:36
Definition: vistexturechannel2rgba.h:99
virtual void setEnabled(int ch, bool yn)
Definition: vistexturechannel2rgba.h:55
static ColTabTextureChannel2RGBA * create()
Definition: vistexturechannel2rgba.h:102
Definition: visannot.h:43
virtual const ColTab::Sequence * getSequence(int) const
Definition: vistexturechannel2rgba.h:52
Open Scene Graph.
Definition: visannot.h:29
virtual int minNrChannels() const
Definition: vistexturechannel2rgba.h:63
Color Table
Definition: coltab.h:22
#define mCreateDataObj(clss)
Definition: visdata.h:209
virtual void swapChannels(int ch0, int ch1)
Definition: vistexturechannel2rgba.h:54
osgGeo::LayeredTexture * laytex_
Definition: vistexturechannel2rgba.h:75
TextureChannels * channels_
Definition: vistexturechannel2rgba.h:74
virtual void setSequence(int, const ColTab::Sequence &)
Definition: vistexturechannel2rgba.h:51
virtual void notifyChannelInsert(int ch)
Definition: vistexturechannel2rgba.h:43
ObjectSet< TypeSet< unsigned char > > osgcolseqarrays_
Definition: vistexturechannel2rgba.h:137

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