Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Monitor.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2014 UJF-Grenoble 1, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef MONITOR_MONITOR_H
27 #define MONITOR_MONITOR_H
28 
29 #include "MMLAPI.h"
30 
31 #include <string>
32 #include <vector>
33 
35 #include "MonitorIn.hxx"
36 #include "reference/Reference.h"
47 
48  public:
49 
57  enum type{
61  MATRIX_33SET
62  };
64  static const unsigned int typeCount = 4;
65 
70  Monitor(mml::Monitor* m,MonitoringManager* monitoringManager, Monitor::type type);
72  virtual ~Monitor();
73 
75  virtual void calculate()=0;
77  void write();
78 
79  int getIndex();
80  double getStartAt();
81  double getStopAt();
82  std::string getReferenceName();
83  std::string getTargetName();
84  Monitor::type getValueType();
85  virtual std::string getTypeName()=0;
86 
88  bool getValuesOfIndex(int i, double values[]);
90  int getIndexOfValues(const unsigned int i);
92  double getValue(const unsigned int i);
94  unsigned int getNumberOfIndex();
96  unsigned int getNumberOfValues();
97 
98  protected:
100  int index;
102  double startAt;
104  double stopAt;
106  std::vector<Reference*> references;
110  std::map<int,std::vector<double> > indexToValuesMap;
112  mml::Monitor* mappedObject;
120  double dx;
122  double dy;
124  double dz;
126  std::vector<double> values;
128  std::vector<int> indexes;
129 };
130 
131 #endif // MONITOR_MONITOR_H
132 
std::vector< Reference * > references
references used when monitor need references
Definition: Monitor.h:106
std::string target
the name of the component targeted by the monitor
Definition: Monitor.h:108
double dz
offset in z direction (if reference is not aligned)
Definition: Monitor.h:124
Definition: Monitor.h:60
type
type of the values stored (please update typeCount and doc if you update the enum) SCALAR: the monito...
Definition: Monitor.h:57
Monitor::type valueType
type of the values stored
Definition: Monitor.h:116
std::map< int, std::vector< double > > indexToValuesMap
map between indexes and values
Definition: Monitor.h:110
MonitoringManager * monitoringManager
monitoring manager
Definition: Monitor.h:114
double dx
offset in x direction (if reference is not aligned)
Definition: Monitor.h:120
A monitor calculate and store followed data (ex:calculation between current position and references) ...
Definition: Monitor.h:46
Manager of the benchmark tests.
Definition: MonitoringManager.h:50
double stopAt
time to stop monitoring
Definition: Monitor.h:104
double startAt
time to start monitoring
Definition: Monitor.h:102
double dy
offset in y direction (if reference is not aligned)
Definition: Monitor.h:122
mml::Monitor * mappedObject
the xsdcxx object representing monitor, used for serialization
Definition: Monitor.h:112
int index
index of monitor
Definition: Monitor.h:100
std::vector< int > indexes
vector which contains target's atoms index (in same order that values associate with) ...
Definition: Monitor.h:128
Definition: Monitor.h:59
int dimension
dimension of data stored
Definition: Monitor.h:118
#define MML_API
Definition: MMLAPI.h:43
string(REGEX REPLACE"^.*-(.*)-.*""\\1"ARCH"${CAMITK_CONTINUOUS_INTEGRATION}") string(REGEX REPLACE"^.*-.*-(.*)""\\1"BUILDTYPE"$
Definition: continuous.cmake:34
std::vector< double > values
the vector which contains data monitored
Definition: Monitor.h:126
Definition: Monitor.h:58