OpendTect-6_4  6.4
visplanedatadisplay.h
Go to the documentation of this file.
1 #ifndef visplanedatadisplay_h
2 #define visplanedatadisplay_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Kris Tingdahl
9  Date: Jan 2002
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "vissurveymod.h"
16 #include "vismultiattribsurvobj.h"
18 #include "vistexturerect.h"
19 
20 #include "mousecursor.h"
21 #include "oduicommon.h"
22 #include "undo.h"
23 
24 template <class T> class Array2D;
25 namespace visBase{ class GridLines; }
26 
27 class BinIDValueSet;
28 
29 namespace visSurvey
30 {
31 
32 class Scene;
33 
44 public:
45 
47  mDeclareEnumUtils(SliceType);
48 
50 
53  PlaneDataDisplay, "PlaneDataDisplay",
54  ::toUiString(sFactoryKeyword()));
55 
56  bool isInlCrl() const { return true; }
57 
58  void setOrientation(SliceType);
59  SliceType getOrientation() const { return orientation_; }
60 
61  bool hasPosModeManipulator() const { return true; }
62  void showManipulator(bool);
63  bool isManipulatorShown() const;
64  bool isManipulated() const;
65  bool canResetManipulation() const { return true; }
66  void resetManipulation();
67  void acceptManipulation();
68  BufferString getManipulationString() const;
69  NotifierAccess* getManipulationNotifier();
71  { return &movefinished_; }
73  { return &datachanged_; }
74 
75  bool allowMaterialEdit() const { return true; }
76 
77  int nrResolutions() const;
78  void setResolution(int,TaskRunner*);
79 
80  SurveyObject::AttribFormat getAttributeFormat(int attrib=-1) const;
81 
82  TrcKeyZSampling getTrcKeyZSampling(int attrib=-1) const;
83  void getTraceKeyPath(TrcKeyPath&,
84  TypeSet<Coord>*) const;
85  TrcKeyZSampling getTrcKeyZSampling(bool manippos,
86  bool displayspace,
87  int attrib=-1) const;
88  TrcKeyZSampling getDataPackSampling(int attrib=0) const;
89  Interval<float> getDataTraceRange() const;
90  void getRandomPos(DataPointSet&,TaskRunner* =0)const;
91  void setRandomPosData(int attrib,
92  const DataPointSet*,
93  TaskRunner*);
94  void setTrcKeyZSampling(const TrcKeyZSampling&);
95 
96  bool setDataPackID(int attrib,DataPack::ID,
97  TaskRunner*);
98  DataPack::ID getDataPackID(int attrib) const;
99  DataPack::ID getDisplayedDataPackID(int attrib) const;
101  { return DataPackMgr::SeisID(); }
102 
103  visBase::GridLines* gridlines() { return gridlines_; }
104 
105  const MouseCursor* getMouseCursor() const { return &mousecursor_; }
106 
108  IOPar& iop ) const
109  { return MultiTextureSurveyObject
110  ::getMousePosInfo(ei,iop);}
111  void getMousePosInfo(const visBase::EventInfo&,
112  Coord3&,
113  BufferString& val,
114  BufferString& info) const;
115  void getObjectInfo(BufferString&) const;
116 
117  virtual float calcDist(const Coord3&) const;
118  virtual float maxDist() const;
119  virtual Coord3 getNormal(const Coord3&) const;
120  virtual bool allowsPicks() const { return true; }
121 
122  bool setZAxisTransform(ZAxisTransform*,TaskRunner*);
123  const ZAxisTransform* getZAxisTransform() const;
124 
125  void setTranslationDragKeys(bool depth, int );
132  int getTranslationDragKeys(bool depth) const;
137  bool isVerticalPlane() const;
138 
139  virtual bool canDuplicate() const { return true; }
140  virtual SurveyObject* duplicate(TaskRunner*) const;
141 
142  virtual void annotateNextUpdateStage(bool yn);
143 
144  static const char* sKeyDepthKey() { return "DepthKey"; }
145  static const char* sKeyPlaneKey() { return "PlaneKey"; }
146 
147  virtual void fillPar(IOPar&) const;
148  virtual bool usePar(const IOPar&);
149 
150  void setDisplayTransformation(const mVisTrans*);
152  { return texturerect_; }
153  float getZScale() const;
155  { return displaytrans_; }
156  bool updatePlanePos(const TrcKeyZSampling&);
157  Undo& undo();
158  const Undo& undo() const;
159 
160 protected:
161  ~PlaneDataDisplay();
162 
163  void setRandomPosDataNoCache(int attrib,
164  const BinIDValueSet*,
165  TaskRunner*);
166  void updateChannels(int attrib,TaskRunner*);
167  void createTransformedDataPack(int attrib,
168  TaskRunner* =0);
169  void updateMainSwitch();
170  void setScene(Scene*);
171  void setSceneEventCatcher(visBase::EventCatcher*);
172  void updateRanges(bool resetpos=false);
173  void updateRanges(bool resetinlcrl=false,
174  bool resetz=false);
175  void manipChanged(CallBacker*);
176  void coltabChanged(CallBacker*);
177  void draggerStart(CallBacker*);
178  void draggerMotion(CallBacker*);
179  void draggerFinish(CallBacker*);
180  void draggerRightClick(CallBacker*);
181  void setDraggerPos(const TrcKeyZSampling&);
182  void dataTransformCB(CallBacker*);
183  void updateMouseCursorCB(CallBacker*);
184 
185  bool getCacheValue(int attrib,int version,
186  const Coord3&,float&) const;
187  void addCache();
188  void removeCache(int);
189  void swapCache(int,int);
190  void emptyCache(int);
191  bool hasCache(int) const;
192 
193  TrcKeyZSampling snapPosition(const TrcKeyZSampling&) const;
194  void updateTexShiftAndGrowth();
195 
199 
201  SliceType orientation_;
202 
205 
208 
214 
216  int voiidx_;
217 
220 
224 
226  {
227  bool refreeze_;
229  SliceType oldorientation_;
230  Coord oldimagesize_; // obsolete
231  };
235 
236  static const char* sKeyOrientation() { return "Orientation"; }
237  static const char* sKeyResolution() { return "Resolution"; }
238  static const char* sKeyGridLinesID() { return "GridLines ID"; }
239 
240  void updateTexOriginAndScale(int attrib,
241  const TrcKeyZSampling&);
242 };
243 
244 } // namespace visSurvey
245 
246 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Notifier< PlaneDataDisplay > movefinished_
Definition: visplanedatadisplay.h:212
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
const mVisTrans * getDisplayTransformation() const
Definition: visplanedatadisplay.h:154
NotifierAccess * getMovementNotifier()
Definition: visplanedatadisplay.h:70
Definition of a mouse cursor, can be either a predefined shape (from the enum, or a file...
Definition: mousecursor.h:26
SliceType oldorientation_
Definition: visplanedatadisplay.h:229
Set of data points with group selection.
Definition: datapointset.h:48
virtual bool allowsPicks() const
Definition: visplanedatadisplay.h:120
ZAxisTransform * datatransform_
Definition: visplanedatadisplay.h:215
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
int voiidx_
Definition: visplanedatadisplay.h:216
Export_Basic uiString toUiString(ViewStyle)
static const char * sKeyDepthKey()
Definition: visplanedatadisplay.h:144
Notifier< PlaneDataDisplay > datachanged_
Definition: visplanedatadisplay.h:213
Interface class for Notifier. See comments there.
Definition: callback.h:161
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
int ID
Each Mgr has its own ID.
Definition: datapack.h:147
SliceType getOrientation() const
Definition: visplanedatadisplay.h:59
visBase::GridLines * gridlines()
Definition: visplanedatadisplay.h:103
#define mDefaultFactoryInstantiation(baseclss, clss, keywrd, usernm)
Definition: factory.h:289
Definition: visplanedatadisplay.h:225
visBase::EventCatcher * eventcatcher_
Definition: visplanedatadisplay.h:196
TypeSet< DataPack::ID > datapackids_
Definition: visplanedatadisplay.h:203
bool canResetManipulation() const
Definition: visplanedatadisplay.h:65
static ID SeisID()
Cube/Block (N1xN2xN3) data: 3.
A cartesian coordinate in 2D space.
Definition: coord.h:25
static const char * sKeyResolution()
Definition: visplanedatadisplay.h:237
int ID
Definition: datapack.h:38
Used for displaying a polyline, preview for a random line created throught well path.
Definition: visarrowdisplay.h:20
const MouseCursor * getMouseCursor() const
Definition: visplanedatadisplay.h:105
int originalresolution_
Definition: visplanedatadisplay.h:221
bool interactivetexturedisplay_
Definition: visplanedatadisplay.h:223
BinID curicstep_
Definition: visplanedatadisplay.h:210
ObjectSet< BinIDValueSet > rposcache_
Definition: visplanedatadisplay.h:207
#define mDeclareEnumUtils(enm)
Some utilities surrounding the often needed enum <-> string table.
Definition: enums.h:258
NotifierAccess * getDataChangedNotifier()
Definition: visplanedatadisplay.h:72
MouseCursor mousecursor_
Definition: visplanedatadisplay.h:197
Class to handle undo/redo information.
Definition: undo.h:42
A TextureRectangle is a Rectangle with a datatexture. The data is set via setData.
Definition: vistexturerect.h:35
Definition: callback.h:254
Set of pointers to objects.
Definition: commontypes.h:32
bool forcemanipupdate_
Definition: visplanedatadisplay.h:222
Notifier< PlaneDataDisplay > moving_
Definition: visplanedatadisplay.h:211
bool allowMaterialEdit() const
Definition: visplanedatadisplay.h:75
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:131
Class that can execute a task.
Definition: task.h:169
virtual bool canDuplicate() const
Definition: visplanedatadisplay.h:139
void getMousePosInfo(const visBase::EventInfo &ei, IOPar &iop) const
Definition: visplanedatadisplay.h:107
#define mVisTrans
Definition: visdata.h:31
Definition: visgridlines.h:32
RefMan< visBase::DepthTabPlaneDragger > dragger_
Definition: visplanedatadisplay.h:198
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
Database for 3D objects.
Definition: vissurvscene.h:76
TypeSet< DataPack::ID > transfdatapackids_
Definition: visplanedatadisplay.h:204
TrcKeyZSampling startmovepos_
Definition: visplanedatadisplay.h:233
const visBase::TextureRectangle * getTextureRectangle() const
Definition: visplanedatadisplay.h:151
static const char * sKeyOrientation()
Definition: visplanedatadisplay.h:236
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
OD::SliceType SliceType
Definition: visplanedatadisplay.h:46
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: vismultiattribsurvobj.h:36
bool isInlCrl() const
Definition: visplanedatadisplay.h:56
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
SliceType
OpendTect flat slice types.
Definition: oduicommon.h:32
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
RefMan< visBase::TextureRectangle > texturerect_
Definition: visplanedatadisplay.h:219
virtual DataPackMgr::ID getDataPackMgrID() const
Definition: visplanedatadisplay.h:100
Coord oldimagesize_
Definition: visplanedatadisplay.h:230
Base class for all &#39;Display&#39; objects.
Definition: vissurvobj.h:58
A Pos::IdxPairValueSet with BinIDs.
Definition: binidvalset.h:23
Definition: visevent.h:44
static const char * sKeyGridLinesID()
Definition: visplanedatadisplay.h:238
visBase::GridLines * gridlines_
Definition: visplanedatadisplay.h:200
Undo & undo_
Definition: visplanedatadisplay.h:234
AttribFormat
Definition: vissurvobj.h:175
Used for displaying an inline, crossline or timeslice.
Definition: visplanedatadisplay.h:41
bool hasPosModeManipulator() const
Definition: visplanedatadisplay.h:61
TrcKeyZSampling oldcs_
Definition: visplanedatadisplay.h:228
RefMan< const mVisTrans > displaytrans_
Definition: visplanedatadisplay.h:218
UpdateStageInfo updatestageinfo_
Definition: visplanedatadisplay.h:232
bool refreeze_
Definition: visplanedatadisplay.h:227
TrcKeyZSampling csfromsession_
Definition: visplanedatadisplay.h:209
Base class for z-axis transforms.
Definition: zaxistransform.h:37
SliceType orientation_
Definition: visplanedatadisplay.h:201
Definition: visevent.h:87
ObjectSet< TypeSet< DataPack::ID > > displaycache_
Definition: visplanedatadisplay.h:206
static const char * sKeyPlaneKey()
Definition: visplanedatadisplay.h:145

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