User manual
Version: v4.5.2
The Matlab wrapper is distributed as a source package containing a CMakeLists.txt file. CMake is
responsible to get the Matlab installation and libraries, so that the correct flags are passed to the compiler.
The wrapper needs Matlab (64 bits), a C++11-compliant compiler (i.e. Microsoft Visual Studio 2015 or
newer, gcc 5.0 or newer, clang 3.8 or newer) compatible with the installed Matlab version.
In order to compile the wrapper on Windows, the cmake generation must be set in 64 bits (See List-
ing 9.1)
1
REM In a temporary folder
do
:
2
cmake -DCMAKE_GENERATOR_PLATFORM =x64 "C:\ Program Files \ Atracsys \ fusionTrack SDK x64\ matlab "
3
cmake --build .
Listing 9.1: Compiling the Matlab wrapper.
On Listing 9.2 is presented how to initialise the wrapper, enumerate connected devices and get the SDK
version. A geometry is then registered and finally, a frame is retrieved, showing 4 fiducials and a marker.
1
>> trSystem = FusionTrack ()
2
3
trSystem =
4
5
FusionTrack with properties :
6
7
FTK_OPT_DRIVER_VER : 4
8
FTK_MIN_VAL : 0
9
FTK_MAX_VAL : 1
10
FTK_DEF_VAL : 2
11
FTK_VALUE : 3
12
version
: 1
13
14
>> serials = trSystem . devices ()
15
16
serials =
17
18
11889503043542755368
19
20
>> trSystem . getData ( serials ( 1 ), trSystem . FTK_OPT_DRIVER_VER )
21
22
ans
=
23
24
v4 .3.1 (1548418737) Windows -6.3.9600
25
26
>> geom = loadGeometry (
'C:\ Program Files\ Atracsys \ fusionTrack SDK x64\data\ geometry004 .ini '
);
27
>> trSystem . setGeometry ( serials ( 1 ), geom )
28
>> frame = trSystem . getlastFrame ( serials ( 1 ) )
29
30
frame =
31
32
threeDFiducials : [4x1
struct
]
33
markers : [1x1
struct
]
34
imageHeader : [1 x1
struct
]
Listing 9.2: Using the Matlab wrapper.
Atracsys / 2020-06-17 / 16:48:00
66 / 113