OpendTect-6_4  6.4
vistopbotimage.h
Go to the documentation of this file.
1 #ifndef vistopbotimage_h
2 #define vistopbotimage_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Ranojay Sen
9  Date: June 2009
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 
16 #include "visbasemod.h"
17 #include "visobject.h"
18 #include "position.h"
19 
20 namespace OD{ class RGBImage; }
21 namespace osgGeo { class LayeredTexture; class TexturePlaneNode; }
22 
23 
24 namespace visBase
25 {
26 
27 
29 {
30 public:
31  static TopBotImage* create()
33 
34  void setDisplayTransformation(const mVisTrans*);
35  const mVisTrans* getDisplayTransformation() const;
36  void setPos(const Coord3& tl,const Coord3& br);
37  const Coord3& topLeft() const { return pos0_; }
38  const Coord3& bottomRight() const { return pos1_; }
39 
40  void setImageFilename(const char*);
41  const char* getImageFilename() const;
42  void setRGBImageFromFile(const char*);
43 
44  void setTransparency(float); // 0-1
45  float getTransparency() const; // returns value 0-1
46 
47  bool getImageInfo(int& w,int& h,int& pixsz) const;
48  const unsigned char* getTextureData() const;
49  bool getTextureDataInfo(TypeSet<Coord3>& coords,
50  TypeSet<Coord>& texcoords,
51  TypeSet<int>& ps ) const;
52 
53  void fillPar(IOPar&) const;
54  bool usePar(const IOPar&);
55 
56 protected:
57  ~TopBotImage();
58 
59  void updateCoords();
60  void setRGBImage(const OD::RGBImage&);
61 
62 
63  const mVisTrans* trans_;
67 
68  static const char* sKeyTopLeftCoord();
69  static const char* sKeyBottomRightCoord();
70  static const char* sKeyFileNameStr();
71  static const char* sKeyTransparencyStr();
72 
73  int layerid_;
74  osgGeo::LayeredTexture* laytex_;
75  osgGeo::TexturePlaneNode* texplane_;
76 };
77 
78 } // namespace visBase
79 
80 #endif
#define mExpClass(module)
Definition: commondefs.h:160
Coord3 pos1_
Definition: vistopbotimage.h:65
int layerid_
Definition: vistopbotimage.h:73
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
Coord3 pos0_
Definition: vistopbotimage.h:64
BufferString filenm_
Definition: vistopbotimage.h:66
A collection of geoscientific extensions to OpenSceneGraph.
Definition: visannot.h:38
const Coord3 & bottomRight() const
Definition: vistopbotimage.h:38
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
#define mVisTrans
Definition: visdata.h:31
osgGeo::TexturePlaneNode * texplane_
Definition: vistopbotimage.h:75
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
A cartesian coordinate in 3D space.
Definition: coord.h:72
Definition: visannot.h:43
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
osgGeo::LayeredTexture * laytex_
Definition: vistopbotimage.h:74
Definition: vistopbotimage.h:28
const visBase::Transformation * trans_
Definition: vistopbotimage.h:63
OpendTect.
Definition: commontypes.h:29
Class for Red, Green, Blue image.
Definition: odimage.h:28
#define mCreateDataObj(clss)
Definition: visdata.h:209
Definition: visobject.h:72
static TopBotImage * create()
Definition: vistopbotimage.h:31

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