MeVisLab Toolbox Reference
mlVectorList.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_VECTOR_LIST_H
14#define ML_VECTOR_LIST_H
15
16
18
19//ML-includes
20#include "mlBaseInit.h"
21#include "mlModuleIncludes.h"
22#include "mlLinearAlgebra.h"
23
25
26//--------------------------------------------------------------------------------------
28//--------------------------------------------------------------------------------------
30
31public:
33 ~VectorList() override {};
34
37
39 void getValue(MLssize_t index, int& type, Vector3& p1, Vector3& p2) const;
40
42 void getValue(MLssize_t index, int& type,
43 float &x1, float &y1, float &z1,
44 float &x2, float &y2, float &z2
45 ) const;
46
48 void addValue(int type, const Vector3& p1, const Vector3& p2);
49
51 void setValue(MLssize_t index, int type, const Vector3& p1, const Vector3& p2);
52
54 void removeValue(MLssize_t index = -1);
55
57 void getPoint(MLssize_t index, int& type,
58 float &x1, float &y1, float &z1
59 ) const;
60
62 void setPoint(MLssize_t index, int type, float x, float y, float z);
63
65 void clear();
66
68 void print(const char* txt);
69
70private:
71
74
76 std::vector<Vector4> points;
77};
78
80
81#endif
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition mlBase.h:59
Base object representing a list of vectors given as Vector4's.
void setValue(MLssize_t index, int type, const Vector3 &p1, const Vector3 &p2)
set value at index
~VectorList() override
void addValue(int type, const Vector3 &p1, const Vector3 &p2)
add point at end of list
void getPoint(MLssize_t index, int &type, float &x1, float &y1, float &z1) const
returns point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))
void getValue(MLssize_t index, int &type, Vector3 &p1, Vector3 &p2) const
get point at given index
MLssize_t getNum() const
returns the number of contained points
void print(const char *txt)
debug print
void clear()
clear all entries
void setPoint(MLssize_t index, int type, float x, float y, float z)
set point of vectors at given point index (NOTE: (0,1 = first vector , 2,3 = second vector))
void removeValue(MLssize_t index=-1)
remove point from list, if index is -1, last element is removed
void getValue(MLssize_t index, int &type, float &x1, float &y1, float &z1, float &x2, float &y2, float &z2) const
get point at given index
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition mlBaseInit.h:22
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#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:566