NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Abstract base class for IGI DataSources, such as objects that produce tracking data, video frames or ultrasound frames. More...
Public Member Functions | |
mitkClassMacroItkParent (IGIDataSource, niftk::IGIDataSourceI) virtual QString GetName() const override | |
virtual QString | GetFactoryName () const override |
virtual QString | GetStatus () const override |
QString | GetDescription () const override |
virtual bool | GetShouldUpdate () const override |
virtual void | SetShouldUpdate (bool shouldUpdate) override |
virtual void | StartPlayback (niftk::IGIDataType::IGITimeType firstTimeStamp, niftk::IGIDataType::IGITimeType lastTimeStamp) override |
virtual void | StopPlayback () override |
virtual void | StartRecording () override |
virtual void | StopRecording () override |
virtual void | SetRecordingLocation (const QString &pathName) override |
virtual QString | GetRecordingLocation () const override |
virtual void | SetPlaybackSourceName (const QString &sourceName) override |
virtual QString | GetPlaybackSourceName () const override |
QString | GetPlaybackDirectory () const |
Returns this->GetRecordingLocation() slash this->GetPlaybackSourceName(). More... | |
QString | GetRecordingDirectory () const |
Returns this->GetRecordingLocation() slash this->GetName(). More... | |
virtual bool | GetIsRecording () const |
virtual bool | GetIsPlayingBack () const |
virtual void | SetTimeStampTolerance (niftk::IGIDataType::IGITimeType _arg) |
virtual niftk::IGIDataType::IGITimeType | GetTimeStampTolerance () const |
Public Member Functions inherited from niftk::IGIDataSourceI | |
mitkClassMacroItkParent (IGIDataSourceI, itk::Object) virtual QString GetName() const =0 | |
Returns the unique name of the data source, e.g. OpenCV-0. More... | |
virtual void | PlaybackData (niftk::IGIDataType::IGITimeType requestedTimeStamp)=0 |
Request that the data source loads data corresponding to the given timestamp. More... | |
virtual std::vector < IGIDataItemInfo > | Update (const niftk::IGIDataType::IGITimeType &time)=0 |
Requests that this data source updates data storage to reflect the given point in time. More... | |
virtual bool | ProbeRecordedData (niftk::IGIDataType::IGITimeType *firstTimeStampInStore, niftk::IGIDataType::IGITimeType *lastTimeStampInStore)=0 |
virtual void | SetProperties (const IGIDataSourceProperties &properties)=0 |
Allows you to set properties, but the implementor is free to ignore them. More... | |
virtual IGIDataSourceProperties | GetProperties () const =0 |
Retrieve any properties from the data source. More... | |
Protected Member Functions | |
IGIDataSource (const std::string &name, const std::string &factoryName, mitk::DataStorage::Pointer dataStorage) | |
virtual | ~IGIDataSource () |
IGIDataSource (const IGIDataSource &) | |
IGIDataSource & | operator= (const IGIDataSource &) |
mitk::DataNode::Pointer | GetDataNode (const QString &name=QString(), const bool &addToDataStorage=true) |
Derived classes request a node for a given name. If the node does not exist, it will be created with some default properties. More... | |
bool | IsLate (const niftk::IGIDataType::IGITimeType &requested, const niftk::IGIDataType::IGITimeType &actual) const |
Returns true if the delay between requested and actual is greater than the TimeStampTolerance, and false otherwise. More... | |
unsigned int | GetLagInMilliseconds (const niftk::IGIDataType::IGITimeType &requested, const niftk::IGIDataType::IGITimeType &actual) const |
Simply checks the difference in time, and converts to milliseconds. More... | |
mitk::DataStorage::Pointer | GetDataStorage () const |
Returns the pointer to the internal data storage. More... | |
niftk::IGIDataType::IGITimeType | GetTimeStampInNanoseconds () |
Queries the internal igtl::TimeStamp to get an up-to-date timestamp. More... | |
virtual void | SetIsRecording (bool _arg) |
virtual void | SetIsPlayingBack (bool _arg) |
void | SetStatus (const QString &status) |
void | SetDescription (const QString &description) |
Protected Member Functions inherited from niftk::IGIDataSourceI | |
IGIDataSourceI () | |
virtual | ~IGIDataSourceI () |
Abstract base class for IGI DataSources, such as objects that produce tracking data, video frames or ultrasound frames.
Each source registers as a service when it is instantiated. You MUST allow for multiple instances of each service. Each service should have a different name, and unique Id.
Uses RAII pattern to register/de-register as MITK Micro-Service.
Note: All errors should thrown as mitk::Exception or sub-classes thereof.
|
protected |
|
protectedvirtual |
|
protected |
|
protected |
Derived classes request a node for a given name. If the node does not exist, it will be created with some default properties.
name | if supplied the node will be assigned that name, and if empty, the node will be given the name this->GetMicroServiceDeviceName(). |
addToDataStorage | if true, will be added to data storage, if false, the caller can determine when to do it. |
|
protected |
Returns the pointer to the internal data storage.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
virtual |
|
virtual |
|
protected |
Simply checks the difference in time, and converts to milliseconds.
QString IGIDataSource::GetPlaybackDirectory | ( | ) | const |
Returns this->GetRecordingLocation() slash this->GetPlaybackSourceName().
|
overridevirtual |
Implements niftk::IGIDataSourceI.
QString IGIDataSource::GetRecordingDirectory | ( | ) | const |
Returns this->GetRecordingLocation() slash this->GetName().
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
protected |
Queries the internal igtl::TimeStamp to get an up-to-date timestamp.
|
virtual |
|
protected |
Returns true if the delay between requested and actual is greater than the TimeStampTolerance, and false otherwise.
|
override |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
protected |
|
virtual |
|
overridevirtual |
|
overridevirtual |
Implements niftk::IGIDataSourceI.
Reimplemented in niftk::QtAudioDataSourceService.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
Reimplemented in niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
Reimplemented in niftk::QtAudioDataSourceService.