STIR 6.4.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__
16
21#include "stir/Succeeded.h"
22#include "stir/shared_ptr.h"
23#include "stir/ParsingObject.h"
24
25START_NAMESPACE_STIR
26/***********************************************************/
61class TimeFrameMotion : public ParsingObject
62{
63public:
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
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
97protected:
99 void set_defaults() override;
100 void initialise_keymap() override;
101 bool post_processing() override;
102
103private:
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
120END_NAMESPACE_STIR
121#endif
Declaration of class stir::AbsTimeInterval.
Declaration of class stir::ParsingObject.
Declaration of class stir::RigidObject3DMotion.
Declaration of class stir::RigidObject3DTransformation.
Declaration of class stir::Succeeded.
Declaration of class stir::TimeFrameDefinitions.
Class to perform rigid object transformations in 3 dimensions.
Definition RigidObject3DTransformation.h:66
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Class used for storing time frame durations.
Definition TimeFrameDefinitions.h:39
A class for encoding average motion in the frames.
Definition TimeFrameMotion.h:62
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
const RigidObject3DTransformation & get_current_rigid_object_transformation() const
get transformation from (or to) reference for current frame
Definition TimeFrameMotion.cxx:152
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...