OpendTect-6_4  6.4
vishorizonsection.h
Go to the documentation of this file.
1 #ifndef vishorizonsection_h
2 #define vishorizonsection_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kristofer Tingdahl
9  Date: March 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 
14 -*/
15 
16 #include "visbasemod.h"
17 #include "arrayndimpl.h"
18 #include "rowcol.h"
19 #include "visobject.h"
20 #include "geomelement.h"
21 #include "vishorizonsectiondef.h"
22 
23 class BinIDValueSet;
24 class DataPointSet;
25 
26 class ZAxisTransform;
27 class TaskRunner;
28 
29 
30 namespace Geometry { class BinIDSurface; }
31 namespace ColTab { class Sequence; class MapperSetup; }
32 namespace osgGeo { class LayeredTexture; }
33 namespace osg { class CullStack; }
34 
35 namespace visBase
36 {
37  class TextureChannel2RGBA;
38  class HorizonSectionTile;
39  class TextureChannels;
40  class HorizonSectionDataHandler;
41  class HorizonTextureHandler;
42  class HorTilesCreatorAndUpdator;
43 
52 {
53  class TextureCallbackHandler;
54  class NodeCallbackHandler;
55 
56 public:
58 
59  void setDisplayTransformation(const mVisTrans*);
60  const mVisTrans* getDisplayTransformation() const;
61  void setZAxisTransform(ZAxisTransform*,TaskRunner*);
62  ZAxisTransform* getZAxisTransform() { return zaxistransform_; }
63 
64  //Texture information
65  void useChannel(bool);
66  int nrChannels() const;
67  void addChannel();
68  void removeChannel(int);
69  void swapChannels(int,int);
70 
71  int nrVersions(int channel) const;
72  void setNrVersions(int channel,int);
73  int activeVersion(int channel) const;
74  void selectActiveVersion(int channel,int);
75 
76  void setColTabSequence(int channel,
77  const ColTab::Sequence&);
78  const ColTab::Sequence* getColTabSequence(int channel) const;
79  void setColTabMapperSetup(int channel,
80  const ColTab::MapperSetup&,
81  TaskRunner*);
82  const ColTab::MapperSetup* getColTabMapperSetup(int channel) const;
83  const TypeSet<float>* getHistogram(int channel) const;
84 
85  void setTransparency(int ch,unsigned char yn);
86  unsigned char getTransparency(int ch) const;
87 
88  void getDataPositions(DataPointSet&,
89  double zoff /*untransformed*/,
90  int sid,TaskRunner*) const;
91  void setTextureData(int channel,const DataPointSet*,
92  int sid,TaskRunner*);
93  const BinIDValueSet* getCache(int channel) const;
94  void inValidateCache(int channel);
95 
96  void setChannels2RGBA(TextureChannel2RGBA*);
98  TextureChannel2RGBA* getChannels2RGBA();
99  const TextureChannel2RGBA* getChannels2RGBA() const;
100  TextureChannels* getChannels() const;
101 
102  void setTextureHandler(HorizonTextureHandler&);
104  HorizonTextureHandler& getTextureHandler();
105 
106  //Geometry stuff
107  void setSurface(Geometry::BinIDSurface*,bool conn,
108  TaskRunner*);
109  Geometry::BinIDSurface* getSurface() const { return geometry_; }
110  StepInterval<int> displayedRowRange() const;
111  StepInterval<int> displayedColRange() const;
112  void setDisplayRange(const StepInterval<int>&,
113  const StepInterval<int>&);
114  void setTextureRange(const StepInterval<int>&,
115  const StepInterval<int>&);
116 
117  char nrResolutions() const;
118  char currentResolution() const;
119  void setResolution(char,TaskRunner*);
120 
121  void setWireframeColor(Color col);
122  osgGeo::LayeredTexture* getOsgTexture() const;
123  void updatePrimitiveSets();
124  void turnOsgOn( bool );
125  void enableGeometryTypeDisplay(GeometryType type,
126  bool yn);
129  bool isWireframeDisplayed() const
130  { return wireframedisplayed_ ; }
131 
132  void forceRedraw(bool=true);
133  bool executePendingUpdates();
134 
135  int getNrTitles() const;
136  bool getTitleCoordinates(int,TypeSet<Coord3>&) const;
138  const unsigned char* getTextureData(int titleidx,int& w,int& h)const;
139  bool getTitleNormals(
140  int titleidx,TypeSet<Coord3>&) const;
142  bool getTitleTextureCoordinates(
143  int titleidx,TypeSet<Coord>&) const;
144  bool getTitlePrimitiveSet(int titleidx,
145  TypeSet<int>&,GeometryType) const;
147  int getTexturePixelSizeInBits() const;
148  void setUsingNeighborsInIsolatedLine(bool);
149  bool usingNeighborsInIsolatedLine() const;
150 
151  void setLineWidth(int);
152  int getLineWidth() const;
153 
154 protected:
155  ~HorizonSection();
156 
157  friend class HorizonSectionTile;
159  friend class TileResolutionData;
161  friend class HorizonTextureHandler;
165  friend class TileCoordinatesUpdator;
167  friend class DataPointSetFiller;
168 
169  void surfaceChangeCB(CallBacker*);
170  void surfaceChange(const TypeSet<GeomPosID>*,
171  TaskRunner*);
172  void removeZTransform();
173  void updateZAxisVOI();
174 
175  void configSizeParameters();
176  void updateAutoResolution( const osg::CullStack* );
177  HorizonSectionTile* getTitle(int idx);
178  bool checkTileIndex(int) const;
179 
180  void setUpdateVar(bool& var,bool yn);
182 
183  bool forceupdate_; // Only set via setUpdateVar(.)
184 
185 
188 
196 
200 
201  NodeCallbackHandler* nodecallbackhandler_;
202  TextureCallbackHandler* texturecallbackhandler_;
205 
206 
208 
210 
214 
218 
222 
223  int queueid_;
224 
229 
230  osg::Group* osghorizon_;
232 
237 
238 };
239 
240 } // namespace visBase
241 
242 #endif
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
TypeSet< int > spacing_
Definition: vishorizonsection.h:225
Definition: vishorizonsection.h:51
Geometry::BinIDSurface * getSurface() const
Definition: vishorizonsection.h:109
Definition: vishorizonsectiontileglue.h:37
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
Definition: vistexturechannels.h:50
float rowdistance_
Definition: vishorizonsection.h:215
Set of data points with group selection.
Definition: datapointset.h:48
Array2DImpl< HorizonSectionTile * > tiles_
Definition: vishorizonsection.h:207
ZAxisTransform * zaxistransform_
Definition: vishorizonsection.h:231
Threads::SpinLock spinlock_
Definition: vishorizonsection.h:195
int totalnormalsize_
Definition: vishorizonsection.h:221
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
Threads::Mutex updatelock_
Definition: vishorizonsection.h:194
StepInterval< int > texturecolrg_
Definition: vishorizonsection.h:193
int tilesidesize_
Definition: vishorizonsection.h:220
Definition: vishordatahandler.h:28
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
Implementation of Array2D.
Definition: arrayndimpl.h:102
int nrcoordspertileside_
Definition: vishorizonsection.h:219
bool isWireframeDisplayed() const
Definition: vishorizonsection.h:129
TypeSet< int > normalstartidx_
Definition: vishorizonsection.h:227
Definition: vishortilescreatorandupdator.h:35
char nrhorsectnrres_
Definition: vishorizonsection.h:213
GeometryType
Definition: vishorizonsectiondef.h:31
bool useneighbors_
Definition: vishorizonsection.h:236
StepInterval< int > texturerowrg_
Definition: vishorizonsection.h:192
HorTilesCreatorAndUpdator * hortilescreatorandupdator_
Definition: vishorizonsection.h:199
char lowestresidx_
Definition: vishorizonsection.h:211
bool isredrawing_
Definition: vishorizonsection.h:204
Definition: vistexturechannel2rgba.h:36
Set of pointers to objects.
Definition: commontypes.h:32
StepInterval< int > displaycrg_
Definition: vishorizonsection.h:191
Geometry::BinIDSurface * geometry_
Definition: vishorizonsection.h:186
char desiredresolution_
Definition: vishorizonsection.h:212
Class that can execute a task.
Definition: task.h:169
bool wireframedisplayed_
Definition: vishorizonsection.h:235
Is an alternative to Mutex. It is a lock which causes a thread trying to acquire it to simply wait in...
Definition: atomic.h:200
HorizonSectionDataHandler * hordatahandler_
Definition: vishorizonsection.h:197
TypeSet< int > normalsidesize_
Definition: vishorizonsection.h:228
int queueid_
Definition: vishorizonsection.h:223
const visBase::Transformation * transformation_
Definition: vishorizonsection.h:209
#define mVisTrans
Definition: visdata.h:31
ObjectSet< HorizonSectionTile > updatedtiles_
Definition: vishorizonsection.h:233
bool userchangedisplayrg_
Definition: vishorizonsection.h:189
Definition: vishorizontexturehandler.h:33
Setup class for colortable Mapper.
Definition: coltabmapper.h:35
Definition: vishorizonsectiontile.h:51
IdxPair used for its row() and col().
Definition: rowcol.h:25
Definition: visannot.h:43
bool forceupdate_
Will trigger redraw request if necessary.
Definition: vishorizonsection.h:183
static uiHor3DInterpol * create(uiParent *)
Definition: binidsurface.h:27
HorizonTextureHandler * hortexturehandler_
Definition: vishorizonsection.h:198
HorizonTileResolutionTesselator class is an independent usage for tesselating coordinates, normals and primitive set of horizon tiles. it is specifically for exporting horizon to Pdf3D in which the exported horizon has no relation with the existing displayed horizon in coordinates, normals and primitive set. thus we can export horizon into different resolution without influence current displayed horizon in the secne. note: the class doesn&#39;t do anything with texture.
Definition: vishorthreadworks.h:44
Is a lock that allows a thread to have exlusive rights to something.
Definition: thread.h:43
TypeSet< int > nrcells_
Definition: vishorizonsection.h:226
Open Scene Graph.
Definition: visannot.h:29
RowCol origin_
Definition: vishorizonsection.h:187
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
NodeCallbackHandler * nodecallbackhandler_
Definition: vishorizonsection.h:201
StepInterval< int > displayrrg_
Definition: vishorizonsection.h:190
Color Table
Definition: coltab.h:22
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
TextureCallbackHandler * texturecallbackhandler_
Definition: vishorizonsection.h:202
#define mCreateDataObj(clss)
Definition: visdata.h:209
Threads::Lock redrawlock_
Definition: vishorizonsection.h:203
Definition: visobject.h:72
Definition: vishorthreadworks.h:72
Base class for z-axis transforms.
Definition: zaxistransform.h:37
bool tesselationlock_
Definition: vishorizonsection.h:217
Definition: vishorthreadworks.h:114
float coldistance_
Definition: vishorizonsection.h:216
Definition: vishortileresolutiondata.h:47
Definition: arraytesselator.h:21
osg::Group * osghorizon_
Definition: vishorizonsection.h:230
TypeSet< int > updatedtileresolutions_
Definition: vishorizonsection.h:234

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