OpendTect  6.3
visvolrenscalarfield.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: K. Tingdahl
8  Date: January 2007
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "visdata.h"
14 #include "visosg.h"
15 #include "color.h"
16 #include "ranges.h"
17 #include "trckeyzsampling.h"
18 
19 class od_ostream;
20 template <class T> class Array3D;
21 template <class T> class ValueSeries;
22 
23 namespace osgVolume { class Volume; class VolumeTile; class ImageLayer;
24  class TransparencyProperty; }
25 namespace osg { class Switch; class Image; class TransferFunction1D; }
26 namespace osgGeo { class RayTracedTechnique; }
27 
28 
29 
30 namespace visBase
31 {
32 
33 class Material;
34 class TextureChannel2RGBA;
35 
36 
39 public:
40 
43 
44  void setChannels2RGBA(visBase::TextureChannel2RGBA*);
45  TextureChannel2RGBA* getChannels2RGBA();
46  const TextureChannel2RGBA* getChannels2RGBA() const;
47 
48  void setScalarField(int attr,const Array3D<float>*,
49  bool mine,const TrcKeyZSampling&,
50  TaskRunner*);
51 
52  TrcKeyZSampling getMultiAttribTrcKeyZSampling() const;
53 
54  void setColTabMapper(int attr,const ColTab::Mapper&,
55  TaskRunner*);
56  const ColTab::Mapper& getColTabMapper(int attr);
57 
58  const uiString writeVolumeFile(int attr,od_ostream&) const;
60 
61  static bool isShadingSupported();
62  void allowShading(bool yn);
63  bool usesShading() const;
64 
65  bool turnOn(bool);
66  bool isOn() const;
67 
68  void setTexVolumeTransform(const Coord3& trans,
69  const Coord3& rotvec,double rotangle,
70  const Coord3& scale);
71  void setROIVolumeTransform(const Coord3& trans,
72  const Coord3& rotvec,double rotangle,
73  const Coord3& scale);
78  bool textureInterpolationEnabled() const;
79  void enableTextureInterpolation(bool);
80 
81  void setMaterial(Material*);
82 
85  void makeColorTables(int attr);
86  void enableAttrib(int attr,bool yn);
87  void swapAttribs(int attr0,int attr1);
88  void setAttribTransparency(int attr,unsigned char);
89 
90  void setRightHandSystem(bool);
91  bool isRightHandSystem() const;
92 
93 protected:
94  ~VolumeRenderScalarField();
95 
96  void updateResizeCache(int attr,TaskRunner*);
97  void makeIndices(int attr,TaskRunner*);
98  void clipData(int attr,TaskRunner*);
99 
100  void updateFragShaderType();
101  void updateVolumeSlicing();
102  void updateTransparencyRescaling();
103 
104  void setDefaultRGBAValue(int channel);
105 
107  {
108  AttribData();
109  ~AttribData();
110 
111  bool isInVolumeCache() const;
112 
113  void clearDataCache();
114  void clearResizeCache();
115  void clearIndexCache();
116 
118  unsigned char* indexcache_;
123  TrcKeyZSampling datatkzs_;
126  };
127 
129 
131  bool isrgba_;
132 
135 
137 
138  osgVolume::VolumeTile* osgvoltile_;
139  osg::Switch* osgvolroot_;
141  osgVolume::ImageLayer* osgimagelayer_;
142  osg::Image* osgvoldata_;
143  osg::TransferFunction1D* osgtransfunc_;
144  osgVolume::TransparencyProperty* osgtransprop_;
145  osgGeo::RayTracedTechnique* raytt_;
146 };
147 
148 }
osgGeo::RayTracedTechnique * raytt_
Definition: visvolrenscalarfield.h:145
osgVolume::Volume * osgvolume_
Definition: visvolrenscalarfield.h:140
#define mExpClass(module)
Definition: commondefs.h:157
void turnOn(int flag)
Overrides the envirnonment variable.
osgVolume::VolumeTile * osgvoltile_
Definition: visvolrenscalarfield.h:138
OD class for stream write common access to the user log file, or std::cout in batch progs...
Definition: od_ostream.h:25
bool ownsdatacache_
Definition: visvolrenscalarfield.h:122
bool useshading_
Definition: visvolrenscalarfield.h:134
Material * material_
Definition: visvolrenscalarfield.h:133
DataObject is the base class off all objects that are used in Visualization and ought to be shared in...
Definition: visdata.h:59
bool isrgba_
Definition: visvolrenscalarfield.h:131
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:35
osg::Image * osgvoldata_
Definition: visvolrenscalarfield.h:142
TextureChannel2RGBA * channels2rgba_
Definition: visvolrenscalarfield.h:130
Definition: uistring.h:88
Definition: vistexturechannel2rgba.h:33
bool ownsresizecache_
Definition: visvolrenscalarfield.h:125
const ValueSeries< float > * datacache_
Definition: visvolrenscalarfield.h:121
Set of pointers to objects.
Definition: commontypes.h:28
const ValueSeries< float > * resizecache_
Definition: visvolrenscalarfield.h:124
struct(General) A2DBitMapGenPars
Definition: array2dbitmap.h:28
3D point or vector
Definition: commontypes.h:57
ObjectSet< AttribData > attribs_
Definition: visvolrenscalarfield.h:128
bool ownsindexcache_
Definition: visvolrenscalarfield.h:120
bool isOn(int flag=0xffff)
Class that can execute a task.
Definition: task.h:193
osg::TransferFunction1D * osgtransfunc_
Definition: visvolrenscalarfield.h:143
ConstRefMan< ColTab::Mapper > mapper_
Definition: visvolrenscalarfield.h:117
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:32
Interface to a series of values.
Definition: odmemory.h:15
Definition: vismaterial.h:36
TrcKeyZSampling datatkzs_
Definition: visvolrenscalarfield.h:123
Definition: visannot.h:40
osgVolume::ImageLayer * osgimagelayer_
Definition: visvolrenscalarfield.h:141
static uiHor3DInterpol * create(uiParent *)
bool isrighthandsystem_
Definition: visvolrenscalarfield.h:136
FixedString Volume()
Definition: keystrs.h:145
osgVolume::TransparencyProperty * osgtransprop_
Definition: visvolrenscalarfield.h:144
Open Scene Graph.
Definition: visannot.h:26
Definition: visvolrenscalarfield.h:23
Definition: coltab.h:20
#define mCreateDataObj(clss)
Definition: visdata.h:210
int indexcachestep_
Definition: visvolrenscalarfield.h:119
Definition: visvolrenscalarfield.h:37
Definition: visvolrenscalarfield.h:106
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:149
unsigned char * indexcache_
Definition: visvolrenscalarfield.h:118
mODTextTranslationClass(VolumeRenderScalarField) public
Definition: visvolrenscalarfield.h:38
osg::Switch * osgvolroot_
Definition: visvolrenscalarfield.h:139

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