riCOM_cpp
This repository contains the C++ implementation of the riCOM (Real Time Centre Of Mass) algorithm for 4D Scanning electron microscopy.
src
Camera.cpp
Go to the documentation of this file.
1
/* Copyright (C) 2021 Thomas Friedrich, Chu-Ping Yu,
2
* University of Antwerp - All Rights Reserved.
3
* You may use, distribute and modify
4
* this code under the terms of the GPL3 license.
5
* You should have received a copy of the GPL3 license with
6
* this file. If not, please visit:
7
* https://www.gnu.org/licenses/gpl-3.0.en.html
8
*
9
* Authors:
10
* Thomas Friedrich <thomas.friedrich@uantwerpen.be>
11
* Chu-Ping Yu <chu-ping.yu@uantwerpen.be>
12
*/
13
14
#include "
Camera.h
"
15
#include "MerlinInterface.h"
16
#include "TimepixInterface.h"
17
#include "CheetahInterface.h"
18
19
using namespace
CAMERA
;
20
21
void
Camera_BASE::init_uv_default
()
22
{
23
u
.resize(
nx_cam
);
24
v
.resize(
ny_cam
);
25
26
for
(
int
i = 0; i <
nx_cam
; i++)
27
{
28
u
[i] = i;
29
}
30
31
for
(
int
i = 0; i <
ny_cam
; i++)
32
{
33
v
[i] = i;
34
}
35
};
36
37
Default_configurations::Default_configurations
()
38
{
39
hws_ptr = &
hws
[0];
40
hws
[
MERLIN
] =
Camera<MerlinInterface, FRAME_BASED>
();
41
hws
[
TIMEPIX
] =
Camera<TimepixInterface, EVENT_BASED>
();
42
hws
[
CHEETAH
] =
Camera<CheetahInterface, EVENT_BASED>
();
43
};
44
45
CAMERA::Camera_BASE
&
Default_configurations::operator[]
(
unsigned
int
index)
46
{
47
if
(index >=
hws
.size())
48
{
49
perror(
"CAMERA::Default_configurations::operator[]: Index out of range"
);
50
}
51
return
hws_ptr[index];
52
}
Camera.h
CAMERA::Camera_BASE
Definition:
Camera.h:44
CAMERA::Camera_BASE::ny_cam
uint16_t ny_cam
Definition:
Camera.h:49
CAMERA::Camera_BASE::v
std::vector< int > v
Definition:
Camera.h:56
CAMERA::Camera_BASE::u
std::vector< int > u
Definition:
Camera.h:55
CAMERA::Camera_BASE::init_uv_default
void init_uv_default()
Definition:
Camera.cpp:21
CAMERA::Camera_BASE::nx_cam
uint16_t nx_cam
Definition:
Camera.h:48
CAMERA::Camera
Definition:
Camera.h:73
CAMERA::Default_configurations::operator[]
CAMERA::Camera_BASE & operator[](unsigned int index)
Definition:
Camera.cpp:45
CAMERA::Default_configurations::hws
std::array< CAMERA::Camera_BASE, CAMERA::MODELS_COUNT > hws
Definition:
Camera.h:118
CAMERA::Default_configurations::Default_configurations
Default_configurations()
Definition:
Camera.cpp:37
CAMERA
Definition:
Camera.h:28
CAMERA::TIMEPIX
@ TIMEPIX
Definition:
Camera.h:32
CAMERA::CHEETAH
@ CHEETAH
Definition:
Camera.h:33
CAMERA::MERLIN
@ MERLIN
Definition:
Camera.h:31
Generated by
1.9.1