OpendTect  6.3
vistexturechannels.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: Kristofer Tingdahl
8  Date: Jun 2008
9 ________________________________________________________________________
10 
11 
12 -*/
13 
14 #include "visdata.h"
15 #include "odmemory.h"
16 
17 class SbImagei32;
18 namespace osgGeo { class LayeredTexture; }
19 
20 namespace visBase
21 {
22 
23 class MappedTextureDataSet;
24 class TextureChannel2RGBA;
25 class ChannelInfo;
26 
47 {
48  class TextureCallbackHandler;
49 
50 public:
53 
54  virtual bool turnOn(bool yn);
55  virtual bool isOn() const;
56 
57  int nrChannels() const;
58  int addChannel();
59  int insertChannel(int);
60  void removeChannel(int);
61  void swapChannels(int,int);
62 
63  void setColTabMapper(int ch,const ColTab::Mapper&);
64  const ColTab::Mapper& getColTabMapper(int channel) const;
65  void reMapData(int channel,TaskRunner*);
66 
67  void setSize(int channel,int sz0,int sz1,int sz2);
68  int getSize(int channel,unsigned char dim) const;
69 
70  void setOrigin(int channel,const Coord& origin);
71  Coord getOrigin(int channel) const;
72  void setScale(int channel,const Coord& scale);
73  Coord getScale(int channel) const;
74 
75  StepInterval<float> getEnvelopeRange(unsigned char dim) const;
76 
77  void setNrComponents(int channel,int nrcomp);
78  int getNrComponents(int channel) const;
79 
80  void setNrVersions(int channel,int nrvers);
81  int nrVersions(int channel) const;
82  int currentVersion(int channel) const;
83  void setCurrentVersion(int channel,int version);
84 
85  bool isCurrentDataPremapped(int channel) const;
86 
87  bool setUnMappedVSData(int channel,int version,
88  const ValueSeries<float>*,OD::PtrPolicy,
89  TaskRunner*);
90  bool setUnMappedData(int channel,int version,
91  const float*,OD::PtrPolicy,TaskRunner*);
92  bool setMappedData(int channel,int version,
93  unsigned char*,OD::PtrPolicy);
94  void unfreezeOldData(int channel);
95 
96  bool setChannels2RGBA(TextureChannel2RGBA*);
97  TextureChannel2RGBA* getChannels2RGBA();
98  const TextureChannel2RGBA* getChannels2RGBA() const;
99 
100  const SbImagei32* getChannels() const;
101  void touchMappedData();
102 
103  osgGeo::LayeredTexture* getOsgTexture() { return osgtexture_; }
104  const osgGeo::LayeredTexture* getOsgTexture() const { return osgtexture_; }
105  const TypeSet<int>* getOsgIDs(int channel) const;
106 
107  void enableTextureInterpolation(bool);
108  bool textureInterpolationEnabled() const;
109 
110  void setNonShaderResolution(int);
111  int getNonShaderResolution() const;
112 
113  unsigned char nrDataBands() const;
114  inline unsigned char nrUdfBands() const { return 1; }
115  inline unsigned char nrTextureBands() const
116  { return nrDataBands() + nrUdfBands(); }
117 
118 
119 protected:
120  friend class ChannelInfo;
121  void update(int channel,bool freezeifnodata=true);
122  void update(ChannelInfo*);
123  ~TextureChannels();
124 
125  TextureCallbackHandler* texturecallbackhandler_;
127 
129  osgGeo::LayeredTexture* osgtexture_;
131 };
132 
133 
134 }; // Namespace
#define mExpClass(module)
Definition: commondefs.h:157
void turnOn(int flag)
Overrides the envirnonment variable.
Definition: vistexturechannels.h:46
osgGeo::LayeredTexture * osgtexture_
Definition: vistexturechannels.h:129
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:59
static TextureChannels * create()
Definition: vistexturechannels.h:51
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
unsigned char nrUdfBands() const
Definition: vistexturechannels.h:114
unsigned char nrTextureBands() const
Definition: vistexturechannels.h:115
bool interpolatetexture_
Definition: vistexturechannels.h:130
TextureCallbackHandler * texturecallbackhandler_
Definition: vistexturechannels.h:125
Definition: vistexturechannel2rgba.h:33
const osgGeo::LayeredTexture * getOsgTexture() const
Definition: vistexturechannels.h:104
ObjectSet< ChannelInfo > channelinfo_
Definition: vistexturechannels.h:126
bool isOn(int flag=0xffff)
Class that can execute a task.
Definition: task.h:193
Interface to a series of values.
Definition: odmemory.h:15
Interval with step.
Definition: commontypes.h:29
Definition: visannot.h:40
OpendTect.
Definition: commontypes.h:25
PtrPolicy
Definition: odmemory.h:20
Definition: coltab.h:20
#define mCreateDataObj(clss)
Definition: visdata.h:210
2D point or vector class.
Definition: commontypes.h:58
TextureChannel2RGBA * tc2rgba_
Definition: vistexturechannels.h:128

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