STIR  6.2.0
TimeFrameMotion.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2003- 2006, Hammersmith Imanet Ltd
5  Internal GE use only
6 */
7 #ifndef __stir_motion_TimeFrameMotion__H__
8 #define __stir_motion_TimeFrameMotion__H__
9 
21 #include "stir/Succeeded.h"
22 #include "stir/shared_ptr.h"
23 #include "stir/ParsingObject.h"
24 
25 START_NAMESPACE_STIR
26 /***********************************************************/
62 {
63 public:
64  /* don't have this constructor, as it would need to be repeated by
65  all derived classes anyway.
66  Call parse() instead.
67  TimeFrameMotion(const char * const par_filename);
68  */
69 
70  virtual Succeeded process_data() = 0;
71 
72  void move_to_reference(const bool);
73  void set_frame_num_to_process(const int);
74 
75  int get_frame_num_to_process() const;
77 
81  const RigidObject3DTransformation& get_current_rigid_object_transformation() const;
82 
85  {
86  return _transformation_to_reference_position;
87  }
88 
89  const TimeFrameDefinitions& get_time_frame_defs() const;
90 
91  double get_frame_start_time(unsigned frame_num) const { return _frame_defs.get_start_time(frame_num) + _scan_start_time; }
92 
93  double get_frame_end_time(unsigned frame_num) const { return _frame_defs.get_end_time(frame_num) + _scan_start_time; }
94 
95  const RigidObject3DMotion& get_motion() const { return *_ro3d_sptr; }
96 
97 protected:
99  void set_defaults() override;
100  void initialise_keymap() override;
101  bool post_processing() override;
102 
103 private:
104  std::string _frame_definition_filename;
105  bool _do_move_to_reference;
106 
107  TimeFrameDefinitions _frame_defs;
108  shared_ptr<RigidObject3DMotion> _ro3d_sptr;
109  shared_ptr<AbsTimeInterval> _reference_abs_time_sptr;
110  RigidObject3DTransformation _current_rigid_object_transformation;
111 
112  RigidObject3DTransformation _transformation_to_reference_position;
113 
114  int _scan_start_time_secs_since_1970_UTC;
115  double _scan_start_time;
116 
117  int _frame_num_to_process;
118 };
119 
120 END_NAMESPACE_STIR
121 #endif
Declaration of class stir::AbsTimeInterval.
Class used for storing time frame durations.
Definition: TimeFrameDefinitions.h:38
Declaration of class stir::Succeeded.
Declaration of class stir::TimeFrameDefinitions.
A base class for objects that want to be able to parse parameter files.
Definition: ParsingObject.h:44
A class for encoding average motion in the frames.
Definition: TimeFrameMotion.h:61
Declaration of class stir::ParsingObject.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Class to perform rigid object transformations in 3 dimensions.
Definition: RigidObject3DTransformation.h:64
Declaration of class stir::RigidObject3DMotion.
Base class for 3D rigid motion.
Definition: RigidObject3DMotion.h:46
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RigidObject3DTransformation.
const RigidObject3DTransformation & get_rigid_object_transformation_to_reference() const
Get the transformation to the reference as returned by the RigidObject3DMotion object.
Definition: TimeFrameMotion.h:84