MeVisLab Toolbox Reference
mlMarkerList.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_MARKER_LIST_H
14 #define ML_MARKER_LIST_H
15 
16 
18 
19 //ML-includes
20 #include "mlBaseInit.h"
21 #include "mlModuleIncludes.h"
22 #include "mlLinearAlgebra.h"
23 
24 ML_START_NAMESPACE
25 
26 
27 //--------------------------------------------------------------------------------------
29 //--------------------------------------------------------------------------------------
30 class MLBASEEXPORT MarkerList : public Base {
31 
32 public:
33  MarkerList() {};
34  ~MarkerList() override {};
35 
37  MLssize_t getNum() const;
38 
40  void getValue(MLssize_t index, int& type, Vector3& vec) const;
41 
43  void getValue(MLssize_t index, int &type, float &x, float &y, float &z) const;
44 
46  void addValue(int type, const Vector3& vec);
47 
49  void setValue(MLssize_t index, int type, const Vector3& vec);
50 
52  void removeValue(MLssize_t index = -1);
53 
55  void clear();
56 
58  void print(const char* txt);
59 
60 private:
61 
64 
66  std::vector<Vector4> points;
67 };
68 
69 
70 ML_END_NAMESPACE
71 
72 
73 #endif
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition: mlBase.h:62
Base object class MarkerList managing a list of markers represented by Vector4's.
Definition: mlMarkerList.h:30
void addValue(int type, const Vector3 &vec)
add marker at end of list
void setValue(MLssize_t index, int type, const Vector3 &vec)
set value at index
void getValue(MLssize_t index, int &type, Vector3 &vec) const
get marker at given index
void print(const char *txt)
debug print
void removeValue(MLssize_t index=-1)
remove point from list, if index is -1, last element is removed
void clear()
clear all entries
void getValue(MLssize_t index, int &type, float &x, float &y, float &z) const
get point at given index
~MarkerList() override
Definition: mlMarkerList.h:34
MLssize_t getNum() const
returns the number of contained points
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition: mlBaseInit.h:22
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
SSIZE_T MLssize_t
The signed ML size type which is a signed 32 bit size_t on 32 bit platforms and 64 bit one on 64 bit ...
Definition: mlTypeDefs.h:654