Xmipp  v3.23.11-Nereus
Classes | Enumerations | Functions | Variables
Collaboration diagram for Phantom Movie:

Classes

class  PhantomMovie< T >
 
struct  PhantomMovie< T >::Content
 
struct  PhantomMovie< T >::Params
 
struct  PhantomMovie< T >::Ice
 
struct  PhantomMovie< T >::Options
 
struct  PhantomMovie< T >::DisplacementParams
 

Enumerations

enum  PhantomMovie< T >::PhantomType { PhantomMovie< T >::PhantomType::grid, PhantomMovie< T >::PhantomType::particleCross, PhantomMovie< T >::PhantomType::particleCircle }
 

Functions

 PhantomMovie< T >::PhantomMovie (DisplacementParams dp, Options o, Ice i, Content c, Params p)
 
void PhantomMovie< T >::run () const
 

Variables

float PhantomMovie< T >::DisplacementParams::a1
 
float PhantomMovie< T >::DisplacementParams::a2
 
float PhantomMovie< T >::DisplacementParams::b1
 
float PhantomMovie< T >::DisplacementParams::b2
 
float PhantomMovie< T >::DisplacementParams::k1_start
 
float PhantomMovie< T >::DisplacementParams::k1_end
 
float PhantomMovie< T >::DisplacementParams::k2_start
 
float PhantomMovie< T >::DisplacementParams::k2_end
 
bool PhantomMovie< T >::DisplacementParams::simple
 
static constexpr auto PhantomMovie< T >::DisplacementParams::doc
 
static constexpr auto PhantomMovie< T >::DisplacementParams::shift_param = "--shift"
 
static constexpr auto PhantomMovie< T >::DisplacementParams::barrel_param = "--barrel"
 
static constexpr auto PhantomMovie< T >::DisplacementParams::simple_param = "--simple"
 
bool PhantomMovie< T >::Options::skipBarrel
 
bool PhantomMovie< T >::Options::skipShift
 
bool PhantomMovie< T >::Options::shiftAfterBarrel
 
bool PhantomMovie< T >::Options::skipDose
 
bool PhantomMovie< T >::Options::skipIce
 
int PhantomMovie< T >::Ice::seed
 
float PhantomMovie< T >::Ice::avg
 
float PhantomMovie< T >::Ice::stddev
 
float PhantomMovie< T >::Ice::min
 
float PhantomMovie< T >::Ice::max
 
float PhantomMovie< T >::Ice::low_w1
 
float PhantomMovie< T >::Ice::low_raised_w
 
Dimensions PhantomMovie< T >::Params::req_size = Dimensions(1)
 
Dimensions PhantomMovie< T >::Params::work_size = Dimensions(1)
 
FileName PhantomMovie< T >::Params::fn_out
 
FileName PhantomMovie< T >::Params::fn_gain
 
FileName PhantomMovie< T >::Params::fn_dark
 
PhantomType PhantomMovie< T >::Content::type
 
size_t PhantomMovie< T >::Content::xstep
 
size_t PhantomMovie< T >::Content::ystep
 
size_t PhantomMovie< T >::Content::thickness
 
size_t PhantomMovie< T >::Content::minSize
 
size_t PhantomMovie< T >::Content::maxSize
 
size_t PhantomMovie< T >::Content::count
 
float PhantomMovie< T >::Content::signal_val
 
int PhantomMovie< T >::Content::seed
 
float PhantomMovie< T >::Content::dose
 

Detailed Description

Enumeration Type Documentation

◆ PhantomType

template<typename T>
enum PhantomMovie::PhantomType
strong
Enumerator
grid 
particleCross 
particleCircle 

Definition at line 92 of file phantom_movie.h.

93  {
94  grid,
95  particleCross,
96  particleCircle
97  };

Function Documentation

◆ PhantomMovie()

template<typename T>
PhantomMovie< T >::PhantomMovie ( DisplacementParams  dp,
Options  o,
Ice  i,
Content  c,
Params  p 
)
inline

Definition at line 113 of file phantom_movie.h.

113 : params(p), dispParams(dp), options(o), ice(i), content(c) {}
doublereal * c
#define i

◆ run()

template<typename T >
void PhantomMovie< T >::run ( ) const

Definition at line 315 of file phantom_movie.cpp.

316 {
317  auto refFrame = findWorkSize();
318  if (!options.skipIce)
319  {
320  generateIce(refFrame);
321  applyLowPass(refFrame);
322  refFrame.rangeAdjust(ice.min, ice.max);
323  }
324  addContent(refFrame);
325  if (options.skipDose)
326  {
327  generateMovie<true>(refFrame);
328  }
329  else
330  {
331  generateMovie<false>(refFrame);
332  }
333  if (!params.fn_gain.empty())
334  {
335  Image<T> gain(static_cast<int>(params.req_size.x()), static_cast<int>(params.req_size.y()));
336  gain().initConstant(1);
337  gain.write(params.fn_gain);
338  }
339  if (!params.fn_dark.empty())
340  {
341  Image<T> dark(static_cast<int>(params.req_size.x()), static_cast<int>(params.req_size.y()));
342  dark().initConstant(0);
343  dark.write(params.fn_dark);
344  }
345 }
CUDA_HD constexpr size_t x() const
Definition: dimensions.h:51
CUDA_HD constexpr size_t y() const
Definition: dimensions.h:60

Variable Documentation

◆ a1

template<typename T>
float PhantomMovie< T >::DisplacementParams::a1

Definition at line 43 of file phantom_movie.h.

◆ a2

template<typename T>
float PhantomMovie< T >::DisplacementParams::a2

Definition at line 44 of file phantom_movie.h.

◆ avg

template<typename T>
float PhantomMovie< T >::Ice::avg

Definition at line 75 of file phantom_movie.h.

◆ b1

template<typename T>
float PhantomMovie< T >::DisplacementParams::b1

Definition at line 45 of file phantom_movie.h.

◆ b2

template<typename T>
float PhantomMovie< T >::DisplacementParams::b2

Definition at line 46 of file phantom_movie.h.

◆ barrel_param

template<typename T>
constexpr auto PhantomMovie< T >::DisplacementParams::barrel_param = "--barrel"
static

Definition at line 59 of file phantom_movie.h.

◆ count

template<typename T>
size_t PhantomMovie< T >::Content::count

Definition at line 107 of file phantom_movie.h.

◆ doc

template<typename T>
constexpr auto PhantomMovie< T >::DisplacementParams::doc
static
Initial value:
= "x(t) = a1*t + a2*t*t + cos(t)/10\n"
"y(t) = b1*t + b2*t*t + sin(t*t)/5\n"
"The barrel/pincushion transform params are linearly interpolated between first and last frame.\n"
"For normalized coordinates ([-1..1]) its distance is given by:\n"
"r_out = r_in(1 + k1*(r_in)^2 + k2*(r_in)^4"
"X and Y shift can be overriden, then only a1 and b1 will be used"

Definition at line 52 of file phantom_movie.h.

◆ dose

template<typename T>
float PhantomMovie< T >::Content::dose

Definition at line 110 of file phantom_movie.h.

◆ fn_dark

template<typename T>
FileName PhantomMovie< T >::Params::fn_dark

Definition at line 89 of file phantom_movie.h.

◆ fn_gain

template<typename T>
FileName PhantomMovie< T >::Params::fn_gain

Definition at line 88 of file phantom_movie.h.

◆ fn_out

template<typename T>
FileName PhantomMovie< T >::Params::fn_out

Definition at line 87 of file phantom_movie.h.

◆ k1_end

template<typename T>
float PhantomMovie< T >::DisplacementParams::k1_end

Definition at line 48 of file phantom_movie.h.

◆ k1_start

template<typename T>
float PhantomMovie< T >::DisplacementParams::k1_start

Definition at line 47 of file phantom_movie.h.

◆ k2_end

template<typename T>
float PhantomMovie< T >::DisplacementParams::k2_end

Definition at line 50 of file phantom_movie.h.

◆ k2_start

template<typename T>
float PhantomMovie< T >::DisplacementParams::k2_start

Definition at line 49 of file phantom_movie.h.

◆ low_raised_w

template<typename T>
float PhantomMovie< T >::Ice::low_raised_w

Definition at line 80 of file phantom_movie.h.

◆ low_w1

template<typename T>
float PhantomMovie< T >::Ice::low_w1

Definition at line 79 of file phantom_movie.h.

◆ max

template<typename T>
float PhantomMovie< T >::Ice::max

Definition at line 78 of file phantom_movie.h.

◆ maxSize

template<typename T>
size_t PhantomMovie< T >::Content::maxSize

Definition at line 106 of file phantom_movie.h.

◆ min

template<typename T>
float PhantomMovie< T >::Ice::min

Definition at line 77 of file phantom_movie.h.

◆ minSize

template<typename T>
size_t PhantomMovie< T >::Content::minSize

Definition at line 105 of file phantom_movie.h.

◆ req_size

template<typename T>
Dimensions PhantomMovie< T >::Params::req_size = Dimensions(1)

Definition at line 85 of file phantom_movie.h.

◆ seed [1/2]

template<typename T>
int PhantomMovie< T >::Ice::seed

Definition at line 74 of file phantom_movie.h.

◆ seed [2/2]

template<typename T>
int PhantomMovie< T >::Content::seed

Definition at line 109 of file phantom_movie.h.

◆ shift_param

template<typename T>
constexpr auto PhantomMovie< T >::DisplacementParams::shift_param = "--shift"
static

Definition at line 58 of file phantom_movie.h.

◆ shiftAfterBarrel

template<typename T>
bool PhantomMovie< T >::Options::shiftAfterBarrel

Definition at line 67 of file phantom_movie.h.

◆ signal_val

template<typename T>
float PhantomMovie< T >::Content::signal_val

Definition at line 108 of file phantom_movie.h.

◆ simple

template<typename T>
bool PhantomMovie< T >::DisplacementParams::simple

Definition at line 51 of file phantom_movie.h.

◆ simple_param

template<typename T>
constexpr auto PhantomMovie< T >::DisplacementParams::simple_param = "--simple"
static

Definition at line 60 of file phantom_movie.h.

◆ skipBarrel

template<typename T>
bool PhantomMovie< T >::Options::skipBarrel

Definition at line 65 of file phantom_movie.h.

◆ skipDose

template<typename T>
bool PhantomMovie< T >::Options::skipDose

Definition at line 68 of file phantom_movie.h.

◆ skipIce

template<typename T>
bool PhantomMovie< T >::Options::skipIce

Definition at line 69 of file phantom_movie.h.

◆ skipShift

template<typename T>
bool PhantomMovie< T >::Options::skipShift

Definition at line 66 of file phantom_movie.h.

◆ stddev

template<typename T>
float PhantomMovie< T >::Ice::stddev

Definition at line 76 of file phantom_movie.h.

◆ thickness

template<typename T>
size_t PhantomMovie< T >::Content::thickness

Definition at line 104 of file phantom_movie.h.

◆ type

template<typename T>
PhantomType PhantomMovie< T >::Content::type

Definition at line 101 of file phantom_movie.h.

◆ work_size

template<typename T>
Dimensions PhantomMovie< T >::Params::work_size = Dimensions(1)

Definition at line 86 of file phantom_movie.h.

◆ xstep

template<typename T>
size_t PhantomMovie< T >::Content::xstep

Definition at line 102 of file phantom_movie.h.

◆ ystep

template<typename T>
size_t PhantomMovie< T >::Content::ystep

Definition at line 103 of file phantom_movie.h.