GraphMap.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: GraphMap.h
3 // Copyright: Kai Welke, Chair Prof. Dillmann (IAIM),
4 // Institute for Computer Science and Engineering (CSE),
5 // University of Karlsruhe. All rights reserved.
6 // Author: Kai Welke
7 // Date: 12.06.2007
8 // *****************************************************************
9 
10 #pragma once
11 
12 // *****************************************************************
13 // includes
14 // *****************************************************************
15 #include "Base/DataStructures/Graph/GraphPyramidLookupTable.h"
16 #include "Base/DataStructures/Graph/IntensityGraph.h"
17 #include "Math/FloatMatrix.h"
18 
19 // *****************************************************************
20 // enums
21 // *****************************************************************
23 {
28 };
29 
30 // *****************************************************************
31 // decleration of CGraphMap
32 // *****************************************************************
33 class CGraphMap
34 {
35 public:
36  // construction / destruction
37  CGraphMap(CIntensityGraph* pGraph, bool bUseLookup = false);
38  ~CGraphMap();
39 
40  // getter / setter
41  void setMap(CFloatMatrix* pMap, bool bUpdateGraph = true);
42  CFloatMatrix* getMap();
43  int getWidth();
44  int getHeight();
45 
46  // manipulation
47  void applyGaussian(EOperation nOperation, Vec3d position, float fAmplitude, float fVariance);
48  void
49  applyGaussian(EOperation nOperation, TSphereCoord coord, float fAmplitude, float fVariance);
50  void applyGaussian(EOperation nOperation, int nNodeID, float fAmplitude, float fVariance);
51 
52  // update
53  void updateGraph();
54  void updateMap();
55 
56 private:
57  float evaluateGaussian(float fDist, float fAmplitude, float fVariance);
58  void toGraph(); // update intensitygraph
59  void toMap(); // update intensitymap
60 
61  CSphericalGraph* m_pGraph;
62  int m_nNumberNodes;
63  CFloatMatrix* m_pMap;
64  bool m_bOwnMemory;
65 
66  int m_nWidth;
67  int m_nHeight;
68 
69  bool m_bUseLookup;
70  CGraphPyramidLookupTable* m_pLookupTable;
71 };
GfxTL::Vec3d
VectorXD< 3, double > Vec3d
Definition: VectorXD.h:737
CGraphMap::getHeight
int getHeight()
Definition: GraphMap.cpp:96
CGraphMap
Definition: GraphMap.h:33
eMax
@ eMax
Definition: GraphMap.h:27
CGraphMap::getMap
CFloatMatrix * getMap()
Definition: GraphMap.cpp:84
CGraphPyramidLookupTable
Definition: GraphPyramidLookupTable.h:23
CIntensityGraph
Definition: IntensityGraph.h:51
CGraphMap::CGraphMap
CGraphMap(CIntensityGraph *pGraph, bool bUseLookup=false)
Definition: GraphMap.cpp:27
eSet
@ eSet
Definition: GraphMap.h:24
EOperation
EOperation
Definition: GraphMap.h:22
eMultiply
@ eMultiply
Definition: GraphMap.h:26
CGraphMap::getWidth
int getWidth()
Definition: GraphMap.cpp:90
eAdd
@ eAdd
Definition: GraphMap.h:25
CGraphMap::updateMap
void updateMap()
Definition: GraphMap.cpp:244
CGraphMap::~CGraphMap
~CGraphMap()
Definition: GraphMap.cpp:50
CSphericalGraph
Definition: SphericalGraph.h:105
TSphereCoord
Definition: Structs.h:23
CGraphMap::updateGraph
void updateGraph()
Definition: GraphMap.cpp:238
CGraphMap::applyGaussian
void applyGaussian(EOperation nOperation, Vec3d position, float fAmplitude, float fVariance)
Definition: GraphMap.cpp:103
CGraphMap::setMap
void setMap(CFloatMatrix *pMap, bool bUpdateGraph=true)
Definition: GraphMap.cpp:64