STIR  6.2.0
Public Member Functions | Protected Member Functions | List of all members
stir::RigidObject3DMotion Class Referenceabstract

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

#include "stir_experimental/motion/RigidObject3DMotion.h"

Inheritance diagram for stir::RigidObject3DMotion:
Inheritance graph
[legend]

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
 
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. More...
 
virtual Succeeded synchronise ()=0
 Has to be called and will be used to synchronise the target-system time and motion tracking time. More...
 
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
 
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
 
- Public Member Functions inherited from stir::RegisteredObjectBase
virtual std::string get_registered_name () const =0
 Returns the name of the type of the object. More...
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
void ask_parameters ()
 
virtual std::string parameter_info ()
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 

Protected Member Functions

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. More...
 
- Protected Member Functions inherited from stir::ParsingObject
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called. More...
 

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. More...
 
static RigidObject3DMotionask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type) More...
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream. More...
 
- 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.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< RigidObject3DMotion >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 
- Protected Attributes inherited from stir::ParsingObject
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:

Member Function Documentation

◆ 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.

◆ post_processing()

bool stir::RigidObject3DMotion::post_processing ( )
overrideprotectedvirtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::ParsingObject.

Reimplemented in stir::RigidObject3DMotionFromPolaris.

References stir::compose(), stir::RigidObject3DTransformation::get_quaternion(), stir::RigidObject3DTransformation::get_translation(), stir::RigidObject3DTransformation::inverse(), and stir::warning().


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