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/IntensityGraph.h"
16 #include "Base/DataStructures/Graph/GraphPyramidLookupTable.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 applyGaussian(EOperation nOperation, TSphereCoord coord, float fAmplitude, float fVariance);
49  void applyGaussian(EOperation nOperation, int nNodeID, float fAmplitude, float fVariance);
50 
51  // update
52  void updateGraph();
53  void updateMap();
54 
55 private:
56  float evaluateGaussian(float fDist, float fAmplitude, float fVariance);
57  void toGraph(); // update intensitygraph
58  void toMap(); // update intensitymap
59 
60  CSphericalGraph* m_pGraph;
61  int m_nNumberNodes;
62  CFloatMatrix* m_pMap;
63  bool m_bOwnMemory;
64 
65  int m_nWidth;
66  int m_nHeight;
67 
68  bool m_bUseLookup;
69  CGraphPyramidLookupTable* m_pLookupTable;
70 };
71 
72 
CGraphMap::getHeight
int getHeight()
Definition: GraphMap.cpp:90
CGraphMap
Definition: GraphMap.h:33
eMax
@ eMax
Definition: GraphMap.h:27
CGraphMap::getMap
CFloatMatrix * getMap()
Definition: GraphMap.cpp:80
CGraphPyramidLookupTable
Definition: GraphPyramidLookupTable.h:22
CIntensityGraph
Definition: IntensityGraph.h:51
GfxTL::Vec3d
VectorXD< 3, double > Vec3d
Definition: VectorXD.h:695
CGraphMap::CGraphMap
CGraphMap(CIntensityGraph *pGraph, bool bUseLookup=false)
Definition: GraphMap.cpp:25
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:85
eAdd
@ eAdd
Definition: GraphMap.h:25
CGraphMap::updateMap
void updateMap()
Definition: GraphMap.cpp:230
CGraphMap::~CGraphMap
~CGraphMap()
Definition: GraphMap.cpp:48
CSphericalGraph
Definition: SphericalGraph.h:93
TSphereCoord
Definition: Structs.h:22
CGraphMap::updateGraph
void updateGraph()
Definition: GraphMap.cpp:225
CGraphMap::applyGaussian
void applyGaussian(EOperation nOperation, Vec3d position, float fAmplitude, float fVariance)
Definition: GraphMap.cpp:96
CGraphMap::setMap
void setMap(CFloatMatrix *pMap, bool bUpdateGraph=true)
Definition: GraphMap.cpp:61