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

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