riCOM_cpp
This repository contains the C++ implementation of the riCOM (Real Time Centre Of Mass) algorithm for 4D Scanning electron microscopy.
Public Member Functions | Public Attributes | List of all members
Update_list Class Reference

#include <Ricom.h>

Public Member Functions

void init (Ricom_kernel kernel, int nx_ricom, int ny_ricom)
 
void shift (id_x_y &id_sft, int id, int shift)
 
 Update_list ()
 

Public Attributes

std::vector< id_x_yids
 

Detailed Description

Definition at line 106 of file Ricom.h.

Constructor & Destructor Documentation

◆ Update_list()

Update_list::Update_list ( )
inline

Definition at line 121 of file Ricom.h.

121 : kernel(), nx(0), ny(0){};

Member Function Documentation

◆ init()

void Update_list::init ( Ricom_kernel  kernel,
int  nx_ricom,
int  ny_ricom 
)

Definition at line 190 of file Ricom.cpp.

191 {
192  this->nx = nx_ricom;
193  this->ny = ny_ricom;
194  this->kernel = kernel;
195 
196  ids.resize(kernel.k_area);
197  int idul = 0;
198  for (int idy = -kernel.kernel_size; idy <= kernel.kernel_size; idy++)
199  {
200  for (int idx = -kernel.kernel_size; idx <= kernel.kernel_size; idx++)
201  {
202  ids[idul] = {(idy * nx + idx), false};
203  idul++;
204  }
205  }
206 }
int k_area
Definition: Ricom.h:60
int kernel_size
Definition: Ricom.h:56
std::vector< id_x_y > ids
Definition: Ricom.h:116

◆ shift()

void Update_list::shift ( id_x_y id_sft,
int  id,
int  shift 
)
inline

Definition at line 208 of file Ricom.cpp.

209 {
210  int id_sft = ids[id].id + shift;
211  int y = id_sft / nx;
212  int x = id_sft % nx;
213  res = {id_sft, y >= 0 && y < ny && x < nx && x >= 0};
214 }
void shift(id_x_y &id_sft, int id, int shift)
Definition: Ricom.cpp:208

Member Data Documentation

◆ ids

std::vector<id_x_y> Update_list::ids

Definition at line 116 of file Ricom.h.


The documentation for this class was generated from the following files: