STIR  6.2.0
Public Types | Public Member Functions | List of all members
stir::Polaris_MT_File Class Reference

a class for parsing .mt files output by the Polaris software More...

#include "stir_experimental/motion/Polaris_MT_File.h"

Public Types

typedef std::vector< Record >::const_iterator const_iterator
 

Public Member Functions

 Polaris_MT_File (const std::string &filename)
 
Record operator[] (unsigned int n) const
 get the n-th complete record More...
 
const_iterator begin () const
 iterators that go through complete records
 
const_iterator end () const
 
unsigned long num_samples () const
 
const_iterator begin_all_tags () const
 iterators that go through all tags recorded by the Polaris
 
const_iterator end_all_tags () const
 
unsigned long num_tags () const
 
std::time_t get_start_time_in_secs_since_1970 ()
 start of acquisition as would have been returned by std::time()
 

Detailed Description

a class for parsing .mt files output by the Polaris software

At present, the acquired motion tracking data is formatted as

  23/5/2003 18:18:32 - 11 1 966_IRSL_II
  record
  record
  ...

where each record is a line containing the following numbers

    Sample Time (secs since midnight in local time)
    Random #
    Tool Number (as a character)
    Q0, Qx, Qy, Qz
    Tx, Ty, Tz
    RMS Error

or something like

67820.806  2 A : ---- Missing ----

when the Polaris was not able to find the position of the tool.

Warning
All times are in local time, and are hence subject to the settings of your TZ environment variable. This means that if the data is processed in a different time zone, you will run into trouble.

Member Function Documentation

◆ operator[]()

Polaris_MT_File::Record stir::Polaris_MT_File::operator[] ( unsigned int  n) const

get the n-th complete record

Warning
This skips the 'missing data' records

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