PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusDataCollector Class Reference

Manages devices that record image or positional data. More...

#include <src/PlusDataCollection/vtkPlusDataCollector.h>

Inheritance diagram for vtkPlusDataCollector:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusDataCollector:
Collaboration graph
[legend]

Public Types

typedef vtkObject Superclass
 

Public Member Functions

PlusStatus AddDevice (vtkPlusDevice *aDevice)
 
PlusStatus Connect ()
 
PlusStatus Disconnect ()
 
PlusStatus DumpBuffersToDirectory (const char *aDirectory)
 
PlusStatus GetChannel (vtkPlusChannel *&aChannel, const std::string &aChannelId) const
 
virtual const char * GetClassName ()
 
bool GetConnected () const
 
PlusStatus GetDevice (vtkPlusDevice *&aDevice, const std::string &aDeviceId) const
 
DeviceCollectionConstIterator GetDeviceConstIteratorBegin () const
 
DeviceCollectionConstIterator GetDeviceConstIteratorEnd () const
 
vtkPlusDeviceFactoryGetDeviceFactory ()
 
PlusStatus GetDevices (DeviceCollection &OutVector) const
 
PlusStatus GetFirstChannel (vtkPlusChannel *&aChannel) const
 
bool GetStarted () const
 
virtual double GetStartupDelaySec ()
 
PlusStatus GetTrackingData (vtkPlusChannel *aRequestedChannel, double &aTimestampFrom, vtkIGSIOTrackedFrameList *aTrackedFrameList)
 
virtual PlusStatus GetVideoData (vtkPlusChannel *aRequestedChannel, double &aTimestamp, vtkIGSIOTrackedFrameList *aTrackedFrameList)
 
virtual int IsA (const char *type)
 
bool IsStarted () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
PlusStatus ReadConfiguration (vtkXMLDataElement *aConfig)
 
PlusStatus ReadConfiguration (const std::string &fileName)
 
void SetDeviceFactory (vtkSmartPointer< vtkPlusDeviceFactory > factory)
 
virtual PlusStatus SetLoopTimes ()
 
virtual void SetStartupDelaySec (double)
 
PlusStatus Start ()
 
PlusStatus Stop ()
 
PlusStatus WriteConfiguration (vtkXMLDataElement *aConfig)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusDataCollectorNew ()
 
static vtkPlusDataCollectorSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkPlusDataCollector ()
 
virtual ~vtkPlusDataCollector ()
 

Protected Attributes

bool Connected
 
vtkSmartPointer< vtkPlusDeviceFactoryDeviceFactory
 
DeviceCollection Devices
 
bool Started
 
double StartupDelaySec
 

Detailed Description

Manages devices that record image or positional data.

Provides an interface for clients to connect to a device set, and request data to the currently active devices.

Definition at line 32 of file vtkPlusDataCollector.h.

Member Typedef Documentation

◆ Superclass

Definition at line 36 of file vtkPlusDataCollector.h.

Constructor & Destructor Documentation

◆ vtkPlusDataCollector()

vtkPlusDataCollector::vtkPlusDataCollector ( )
protected

Definition at line 40 of file vtkPlusDataCollector.cxx.

◆ ~vtkPlusDataCollector()

vtkPlusDataCollector::~vtkPlusDataCollector ( )
protectedvirtual

Definition at line 55 of file vtkPlusDataCollector.cxx.

Member Function Documentation

◆ AddDevice()

PlusStatus vtkPlusDataCollector::AddDevice ( vtkPlusDevice aDevice)

Add a device to the device list

Parameters
aDevicethe device to add

Definition at line 715 of file vtkPlusDataCollector.cxx.

◆ Connect()

PlusStatus vtkPlusDataCollector::Connect ( )

Connect to device(s). Connection is needed for recording or single frame grabbing

Definition at line 357 of file vtkPlusDataCollector.cxx.

◆ Disconnect()

PlusStatus vtkPlusDataCollector::Disconnect ( )

Disconnect from active device(s). This method must be called before application exit, or else the application might hang during exit.

Definition at line 391 of file vtkPlusDataCollector.cxx.

◆ DumpBuffersToDirectory()

PlusStatus vtkPlusDataCollector::DumpBuffersToDirectory ( const char *  aDirectory)

Have each device dump their buffers to disk

Parameters
aDirectorydirectory to dump to
maxTimeLimitSecMaximum time spent in the function (in sec)

Definition at line 475 of file vtkPlusDataCollector.cxx.

◆ GetChannel()

PlusStatus vtkPlusDataCollector::GetChannel ( vtkPlusChannel *&  aChannel,
const std::string &  aChannelId 
) const

Return the requested channel

Parameters
aChannelthe device pointer to fill
aChannelIdthe ID of the requested device

Definition at line 736 of file vtkPlusDataCollector.cxx.

◆ GetClassName()

virtual const char* vtkPlusDataCollector::GetClassName ( )
virtual

◆ GetConnected()

bool vtkPlusDataCollector::GetConnected ( ) const

Definition at line 469 of file vtkPlusDataCollector.cxx.

◆ GetDevice()

PlusStatus vtkPlusDataCollector::GetDevice ( vtkPlusDevice *&  aDevice,
const std::string &  aDeviceId 
) const

Return the requested device

Parameters
aDevicethe device pointer to fill
aDeviceIdthe ID of the requested device

Definition at line 429 of file vtkPlusDataCollector.cxx.

◆ GetDeviceConstIteratorBegin()

DeviceCollectionConstIterator vtkPlusDataCollector::GetDeviceConstIteratorBegin ( ) const

Allow iteration over devices

Definition at line 505 of file vtkPlusDataCollector.cxx.

◆ GetDeviceConstIteratorEnd()

DeviceCollectionConstIterator vtkPlusDataCollector::GetDeviceConstIteratorEnd ( ) const

Definition at line 511 of file vtkPlusDataCollector.cxx.

◆ GetDeviceFactory()

vtkPlusDeviceFactory & vtkPlusDataCollector::GetDeviceFactory ( )

Get the factory instance used to create devices

Definition at line 311 of file vtkPlusDataCollector.cxx.

◆ GetDevices()

PlusStatus vtkPlusDataCollector::GetDevices ( DeviceCollection OutVector) const

Definition at line 448 of file vtkPlusDataCollector.cxx.

◆ GetFirstChannel()

PlusStatus vtkPlusDataCollector::GetFirstChannel ( vtkPlusChannel *&  aChannel) const

Definition at line 751 of file vtkPlusDataCollector.cxx.

◆ GetStarted()

bool vtkPlusDataCollector::GetStarted ( ) const

Definition at line 463 of file vtkPlusDataCollector.cxx.

◆ GetStartupDelaySec()

virtual double vtkPlusDataCollector::GetStartupDelaySec ( )
virtual

Get startup delay in sec to give some time to the buffers for proper initialization

◆ GetTrackingData()

PlusStatus vtkPlusDataCollector::GetTrackingData ( vtkPlusChannel aRequestedChannel,
double &  aTimestampFrom,
vtkIGSIOTrackedFrameList *  aTrackedFrameList 
)

Get tracking data in a tracked frame list since time specified

Parameters
aTimestampThe oldest timestamp we search for in the buffer. If -1 get all frames in the time range since the most recent timestamp. Out parameter - changed to timestamp of last added frame
aTrackedFrameListTracked frame list used to get the newly acquired frames into. The new frames are appended to the tracked frame.

Definition at line 517 of file vtkPlusDataCollector.cxx.

◆ GetVideoData()

PlusStatus vtkPlusDataCollector::GetVideoData ( vtkPlusChannel aRequestedChannel,
double &  aTimestamp,
vtkIGSIOTrackedFrameList *  aTrackedFrameList 
)
virtual

Get video data in a tracked frame list since time specified

Parameters
aTimestampThe oldest timestamp we search for in the buffer. If -1 get all frames in the time range since the most recent timestamp. Out parameter - changed to timestamp of last added frame
aTrackedFrameListTracked frame list used to get the newly acquired frames into. The new frames are appended to the tracked frame.

Definition at line 584 of file vtkPlusDataCollector.cxx.

◆ IsA()

virtual int vtkPlusDataCollector::IsA ( const char *  type)
virtual

◆ IsStarted()

bool vtkPlusDataCollector::IsStarted ( ) const
inline

Definition at line 145 of file vtkPlusDataCollector.h.

◆ IsTypeOf()

static int vtkPlusDataCollector::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusDataCollector* vtkPlusDataCollector::New ( )
static

◆ PrintSelf()

void vtkPlusDataCollector::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Definition at line 415 of file vtkPlusDataCollector.cxx.

◆ ReadConfiguration() [1/2]

PlusStatus vtkPlusDataCollector::ReadConfiguration ( vtkXMLDataElement *  aConfig)

Read main configuration from xml data

Definition at line 75 of file vtkPlusDataCollector.cxx.

◆ ReadConfiguration() [2/2]

PlusStatus vtkPlusDataCollector::ReadConfiguration ( const std::string &  fileName)

Definition at line 250 of file vtkPlusDataCollector.cxx.

◆ SafeDownCast()

static vtkPlusDataCollector* vtkPlusDataCollector::SafeDownCast ( vtkObject *  o)
static

◆ SetDeviceFactory()

void vtkPlusDataCollector::SetDeviceFactory ( vtkSmartPointer< vtkPlusDeviceFactory factory)

Set the factory instance used to create devices

Definition at line 302 of file vtkPlusDataCollector.cxx.

◆ SetLoopTimes()

PlusStatus vtkPlusDataCollector::SetLoopTimes ( )
virtual

Compute loop times for saved datasets (time intersection of the two buffers) itemTimestamp = loopStartTime + (actualTimestamp - startTimestamp) % loopTime

Definition at line 652 of file vtkPlusDataCollector.cxx.

◆ SetStartupDelaySec()

virtual void vtkPlusDataCollector::SetStartupDelaySec ( double  )
virtual

Set startup delay in sec to give some time to the buffers for proper initialization

◆ Start()

PlusStatus vtkPlusDataCollector::Start ( )

Start the devices. The device is brought from its ground state (i.e. on but not necessarily initialized) into full active mode. This method calls start on the current connected device(s)

Definition at line 317 of file vtkPlusDataCollector.cxx.

◆ Stop()

PlusStatus vtkPlusDataCollector::Stop ( )

Stop the tracking system and bring it back to its ground state. This method calls Stop on the current connected device(s)

Definition at line 347 of file vtkPlusDataCollector.cxx.

◆ WriteConfiguration()

PlusStatus vtkPlusDataCollector::WriteConfiguration ( vtkXMLDataElement *  aConfig)

Write main configuration to xml data

Definition at line 272 of file vtkPlusDataCollector.cxx.

Member Data Documentation

◆ Connected

bool vtkPlusDataCollector::Connected
protected

Definition at line 168 of file vtkPlusDataCollector.h.

◆ DeviceFactory

vtkSmartPointer<vtkPlusDeviceFactory> vtkPlusDataCollector::DeviceFactory
protected

Definition at line 164 of file vtkPlusDataCollector.h.

◆ Devices

DeviceCollection vtkPlusDataCollector::Devices
protected

Definition at line 166 of file vtkPlusDataCollector.h.

◆ Started

bool vtkPlusDataCollector::Started
protected

Definition at line 169 of file vtkPlusDataCollector.h.

◆ StartupDelaySec

double vtkPlusDataCollector::StartupDelaySec
protected

The timestamp filtering methods require some time to initialize. Synchronization will ignore data that are acquired during startup delay.

Definition at line 162 of file vtkPlusDataCollector.h.


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