OpendTect-6_4  6.4
vistexturechannels.h
Go to the documentation of this file.
1 #ifndef vistexturechannels_h
2 #define vistexturechannels_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: Jun 2008
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "visdata.h"
18 #include "odmemory.h"
19 
20 class SbImagei32;
21 class TaskRunner;
22 namespace osgGeo { class LayeredTexture; }
23 namespace ColTab { class Mapper; class MapperSetup; };
24 
25 namespace visBase
26 {
27 class MappedTextureDataSet;
28 class TextureChannel2RGBA;
29 class ChannelInfo;
30 
51 {
52  class TextureCallbackHandler;
53 
54 public:
57 
58  virtual bool turnOn(bool yn);
59  virtual bool isOn() const;
60 
61  int nrChannels() const;
62  int addChannel();
63  int insertChannel(int);
64  void removeChannel(int);
65  void swapChannels(int,int);
66 
67  void setColTabMapperSetup(int channel,
68  const ColTab::MapperSetup&);
70  const ColTab::MapperSetup& getColTabMapperSetup(int channel,
71  int version) const;
72  const ColTab::Mapper& getColTabMapper(int channel,int version) const;
73  void reMapData(int channel,bool dontreclip,
74  TaskRunner*);
75  const TypeSet<float>* getHistogram(int channel) const;
76 
77  void setSize(int channel,int sz0,int sz1,int sz2);
78  int getSize(int channel,unsigned char dim) const;
79 
80  void setOrigin(int channel,const Coord& origin);
81  const Coord& getOrigin(int channel) const;
82  void setScale(int channel,const Coord& scale);
83  const Coord& getScale(int channel) const;
84 
85  void setNrComponents(int channel,int nrcomp);
86  int getNrComponents(int channel) const;
87 
88  void setNrVersions(int channel,int nrvers);
89  int nrVersions(int channel) const;
90  int currentVersion(int channel) const;
91  void setCurrentVersion(int channel,int version);
92 
93  bool isCurrentDataPremapped(int channel) const;
94 
95  bool setUnMappedVSData(int channel,int version,
96  const ValueSeries<float>*, OD::PtrPolicy,
97  TaskRunner*,bool skipclip=false);
98  bool setUnMappedData(int channel,int version,
99  const float*, OD::PtrPolicy,
100  TaskRunner*,bool skipclip=false);
101  bool setMappedData(int channel,int version,
102  unsigned char*, OD::PtrPolicy);
103  void unfreezeOldData(int channel);
104 
105  bool setChannels2RGBA(TextureChannel2RGBA*);
106  TextureChannel2RGBA* getChannels2RGBA();
107  const TextureChannel2RGBA* getChannels2RGBA() const;
108 
109  const SbImagei32* getChannels() const;
110  void touchMappedData();
111 
112  osgGeo::LayeredTexture* getOsgTexture() { return osgtexture_; }
113  const osgGeo::LayeredTexture* getOsgTexture() const { return osgtexture_; }
114  const TypeSet<int>* getOsgIDs(int channel) const;
115 
116  void enableTextureInterpolation(bool);
117  bool textureInterpolationEnabled() const;
118 
119  void setNonShaderResolution(int);
120  int getNonShaderResolution() const;
121 
122  unsigned char nrDataBands() const;
123  inline unsigned char nrUdfBands() const { return 1; }
124  inline unsigned char nrTextureBands() const
125  { return nrDataBands() + nrUdfBands(); }
126 
127 
128 protected:
129  friend class ChannelInfo;
130  void update(int channel,bool freezeifnodata=true);
131  void update(ChannelInfo*);
132  ~TextureChannels();
133 
134  TextureCallbackHandler* texturecallbackhandler_;
136 
138  osgGeo::LayeredTexture* osgtexture_;
140 
141 public:
142  StepInterval<float> getEnvelopeRange(unsigned char dim) const;
143 };
144 
145 
146 }; // Namespace
147 
148 #endif
#define mExpClass(module)
Definition: commondefs.h:160
void turnOn(int flag)
Overrides the envirnonment variable.
Definition: vistexturechannels.h:50
osgGeo::LayeredTexture * osgtexture_
Definition: vistexturechannels.h:138
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:65
static TextureChannels * create()
Definition: vistexturechannels.h:55
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
unsigned char nrUdfBands() const
Definition: vistexturechannels.h:123
unsigned char nrTextureBands() const
Definition: vistexturechannels.h:124
bool interpolatetexture_
Definition: vistexturechannels.h:139
A cartesian coordinate in 2D space.
Definition: coord.h:25
TextureCallbackHandler * texturecallbackhandler_
Definition: vistexturechannels.h:134
Definition: vistexturechannel2rgba.h:36
const osgGeo::LayeredTexture * getOsgTexture() const
Definition: vistexturechannels.h:113
ObjectSet< ChannelInfo > channelinfo_
Definition: vistexturechannels.h:135
Set of (small) copyable elements.
Definition: commontypes.h:30
bool isOn(int flag=0xffff)
Class that can execute a task.
Definition: task.h:169
Interface to a series of values.
Definition: odmemory.h:17
Definition: visannot.h:43
OpendTect.
Definition: commontypes.h:29
PtrPolicy
Definition: odmemory.h:22
Color Table
Definition: coltab.h:22
#define mCreateDataObj(clss)
Definition: visdata.h:209
TextureChannel2RGBA * tc2rgba_
Definition: vistexturechannels.h:137

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