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
18
using namespace
CAMERA
;
19
20
void
Camera_BASE::init_uv_default
()
21
{
22
u
.resize(
nx_cam
);
23
v
.resize(
ny_cam
);
24
25
for
(
int
i = 0; i <
nx_cam
; i++)
26
{
27
u
[i] = i;
28
}
29
30
for
(
int
i = 0; i <
ny_cam
; i++)
31
{
32
v
[i] = i;
33
}
34
};
35
36
Default_configurations::Default_configurations
()
37
{
38
hws_ptr = &
hws
[0];
39
hws
[
MERLIN
] =
Camera<MerlinInterface, FRAME_BASED>
();
40
hws
[
TIMEPIX
] =
Camera<TimepixInterface, EVENT_BASED>
();
41
};
42
43
CAMERA::Camera_BASE
&
Default_configurations::operator[]
(
unsigned
int
index)
44
{
45
if
(index >=
hws
.size())
46
{
47
perror(
"CAMERA::Default_configurations::operator[]: Index out of range"
);
48
}
49
return
hws_ptr[index];
50
}
Camera.h
CAMERA::Camera_BASE
Definition:
Camera.h:41
CAMERA::Camera_BASE::ny_cam
int ny_cam
Definition:
Camera.h:46
CAMERA::Camera_BASE::nx_cam
int nx_cam
Definition:
Camera.h:45
CAMERA::Camera_BASE::v
std::vector< int > v
Definition:
Camera.h:51
CAMERA::Camera_BASE::u
std::vector< int > u
Definition:
Camera.h:50
CAMERA::Camera_BASE::init_uv_default
void init_uv_default()
Definition:
Camera.cpp:20
CAMERA::Camera
Definition:
Camera.h:66
CAMERA::Default_configurations::operator[]
CAMERA::Camera_BASE & operator[](unsigned int index)
Definition:
Camera.cpp:43
CAMERA::Default_configurations::hws
std::array< CAMERA::Camera_BASE, CAMERA::MODELS_COUNT > hws
Definition:
Camera.h:107
CAMERA::Default_configurations::Default_configurations
Default_configurations()
Definition:
Camera.cpp:36
CAMERA
Definition:
Camera.h:26
CAMERA::TIMEPIX
@ TIMEPIX
Definition:
Camera.h:30
CAMERA::MERLIN
@ MERLIN
Definition:
Camera.h:29
Generated by
1.9.1