riCOM_cpp
This repository contains the C++ implementation of the riCOM (Real Time Centre Of Mass) algorithm for 4D Scanning electron microscopy.
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 
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 
38 {
39  hws_ptr = &hws[0];
43 };
44 
46 {
47  if (index >= hws.size())
48  {
49  perror("CAMERA::Default_configurations::operator[]: Index out of range");
50  }
51  return hws_ptr[index];
52 }
uint16_t ny_cam
Definition: Camera.h:49
std::vector< int > v
Definition: Camera.h:56
std::vector< int > u
Definition: Camera.h:55
void init_uv_default()
Definition: Camera.cpp:21
uint16_t nx_cam
Definition: Camera.h:48
CAMERA::Camera_BASE & operator[](unsigned int index)
Definition: Camera.cpp:45
std::array< CAMERA::Camera_BASE, CAMERA::MODELS_COUNT > hws
Definition: Camera.h:118
Definition: Camera.h:28
@ TIMEPIX
Definition: Camera.h:32
@ CHEETAH
Definition: Camera.h:33
@ MERLIN
Definition: Camera.h:31