CustusX  22.04-rc5
An IGT application
cx::PositionStorageReader Class Reference

Reader class for the position file. More...

#include <cxPositionStorageFile.h>

Public Member Functions

 PositionStorageReader (QString filename)
 
 ~PositionStorageReader ()
 
bool read (Transform3D *matrix, double *timestamp, int *toolIndex)
 
bool read (Transform3D *matrix, double *timestamp, QString *toolUid)
 
bool atEnd () const
 
int version ()
 

Static Public Member Functions

static QString timestampToString (double timestamp)
 

Detailed Description

Reader class for the position file.

Each call to read() gives the next position entry from the file. When atEnd() returns true, all positions have been read.

Binary file format description

Header:
  "SNWPOS"<version>

Entries, can be one of:

 * Change tool. All position entries following this one belongs to the given tool
     <type=2><size><toolUid>

 * Position. integer-format tool id are appended.
    <type=1><size><timestamp><position><int toolid>

 * Position. Requires change tool to have been called.
    <type=3><size><timestamp><position>

 The position field is <position> = <thetaXY><thetaZ><phi><x><y><z>
 Where the parameters are found from a matrix using the class CGFrame.
See also
PositionStorageWriter

Definition at line 57 of file cxPositionStorageFile.h.

Constructor & Destructor Documentation

cx::PositionStorageReader::PositionStorageReader ( QString  filename)

Definition at line 23 of file cxPositionStorageFile.cpp.

cx::PositionStorageReader::~PositionStorageReader ( )

Definition at line 49 of file cxPositionStorageFile.cpp.

Member Function Documentation

bool cx::PositionStorageReader::atEnd ( ) const

Definition at line 166 of file cxPositionStorageFile.cpp.

bool cx::PositionStorageReader::read ( Transform3D matrix,
double *  timestamp,
int *  toolIndex 
)

Definition at line 59 of file cxPositionStorageFile.cpp.

bool cx::PositionStorageReader::read ( Transform3D matrix,
double *  timestamp,
QString *  toolUid 
)

Definition at line 85 of file cxPositionStorageFile.cpp.

QString cx::PositionStorageReader::timestampToString ( double  timestamp)
static

convert a timestamp to a string. Input format is 64 bit millisecond time.

Definition at line 174 of file cxPositionStorageFile.cpp.

int cx::PositionStorageReader::version ( )

Definition at line 54 of file cxPositionStorageFile.cpp.


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