STIR 6.4.0
stir::RigidObject3DMotion Class Referenceabstract

Base class for 3D rigid motion. More...

#include "stir_experimental/motion/RigidObject3DMotion.h"

Inheritance diagram for stir::RigidObject3DMotion:

Public Member Functions

virtual RigidObject3DTransformation get_motion_in_tracker_coords_rel_time (const double time) const =0
 get motion in tracker coordinates
 
virtual RigidObject3DTransformation get_motion_in_scanner_coords_rel_time (const double time) const
 get motion in scanner coordinates
 
- Public Member Functions inherited from stir::RegisteredObjectBase
virtual std::string get_registered_name () const =0
 Returns the name of the type of the object.
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
void ask_parameters ()
 
virtual std::string parameter_info ()
 

Average motion for a time interval

virtual RigidObject3DTransformation compute_average_motion_in_tracker_coords (const AbsTimeInterval &) const
 
virtual RigidObject3DTransformation compute_average_motion_in_scanner_coords (const AbsTimeInterval &) const
 
virtual RigidObject3DTransformation compute_average_motion_in_tracker_coords_rel_time (const double start_time, const double end_time) const =0
 
virtual RigidObject3DTransformation compute_average_motion_in_scanner_coords_rel_time (const double start_time, const double end_time) const
 
virtual std::vector< double > get_rel_time_of_samples (const double start_time, const double end_time) const =0
 Info on when the motion was determined.
 
virtual Succeeded synchronise ()=0
 Has to be called and will be used to synchronise the target-system time and motion tracking time.
 
virtual double secs_since_1970_to_rel_time (std::time_t) const =0
 
virtual const RigidObject3DTransformationget_transformation_to_scanner_coords () const =0
 
virtual const RigidObject3DTransformationget_transformation_from_scanner_coords () const =0
 
virtual void set_transformation_from_scanner_coords (const RigidObject3DTransformation &)=0
 
virtual bool is_synchronised () const =0
 Temporary (?) function to allow base class to see if synchronised was called or not.
 
void set_defaults () override
 Set defaults before parsing.
 
void initialise_keymap () override
 Initialise all keywords.
 
bool post_processing () override
 This will be called at the end of the parsing.
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredObject< RigidObject3DMotion >
static RigidObject3DMotionread_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
 
static RigidObject3DMotionask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
 
- Protected Types inherited from stir::RegisteredObject< RigidObject3DMotion >
typedef RigidObject3DMotion *(* RootFactory) (std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
 
typedef FactoryRegistry< std::string, RootFactory, interfile_lessRegistryType
 The type of the registry.
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< RigidObject3DMotion >
static RegistryTyperegistry ()
 Static function returning the registry.
 
KeyParser parser
 

Detailed Description

Base class for 3D rigid motion.

This is really a class for encoding motion of an object in a scanner. So, there is some stuff in here to go from tracker coordinates to scanner coordinates etc.

Preliminary. Things that need to be worked out:

  • time issues. Relative time is supposed to be relative to the scan start, but this is really dependent on the derived class. It would be far better to stick to secs_since_1970 in the class hierarchy, and use have a "set_reference_time" member here or so.
  • synchronisation: this is supposed to synchornise the tracker clock to a master clock. Again, that behaviour is completely dependent on what the derived class does.

Member Function Documentation

◆ get_motion_in_tracker_coords_rel_time()

virtual RigidObject3DTransformation stir::RigidObject3DMotion::get_motion_in_tracker_coords_rel_time ( const double time) const
pure virtual

get motion in tracker coordinates

Implemented in stir::RigidObject3DMotionFromPolaris.

References get_motion_in_scanner_coords_rel_time().

Referenced by get_motion_in_scanner_coords_rel_time().

◆ get_rel_time_of_samples()

virtual std::vector< double > stir::RigidObject3DMotion::get_rel_time_of_samples ( const double start_time,
const double end_time ) const
pure virtual

Info on when the motion was determined.

Will return a vector of doubles filled with the sampling times between start_time and end_time.

Todo
Really only makes sense for motion tracking that happens via sampling. One could imagine having simulated motion, and then this function wouldn't make a lot of sense. So, it probably should be moved to a derived class SampledRigidObject3DMotion or so.

Implemented in stir::RigidObject3DMotionFromPolaris.

◆ synchronise()

virtual Succeeded stir::RigidObject3DMotion::synchronise ( )
pure virtual

Has to be called and will be used to synchronise the target-system time and motion tracking time.

In practice, this should make sure that a 'rel_time' of 0 corresponds to the start of the scan

Implemented in stir::RigidObject3DMotionFromPolaris.

◆ set_defaults()

void stir::RigidObject3DMotion::set_defaults ( )
overrideprotectedvirtual

Set defaults before parsing.

Reimplemented from stir::ParsingObject.

Reimplemented in stir::RigidObject3DMotionFromPolaris.

References set_defaults().

Referenced by is_synchronised(), set_defaults(), and stir::RigidObject3DMotionFromPolaris::set_defaults().

◆ initialise_keymap()

void stir::RigidObject3DMotion::initialise_keymap ( )
overrideprotectedvirtual

◆ post_processing()

bool stir::RigidObject3DMotion::post_processing ( )
overrideprotectedvirtual

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