NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Abstract base class for both NiftyLink Client and Server sources. More...
Public Member Functions | |
virtual void | StopPlayback () override |
virtual std::vector < IGIDataItemInfo > | Update (const niftk::IGIDataType::IGITimeType &time) override |
virtual void | SaveItem (niftk::IGIDataType::Pointer item) override |
virtual void | CleanBuffer () override |
virtual void | SaveBuffer () override |
bool | ProbeRecordedData (niftk::IGIDataType::IGITimeType *firstTimeStampInStore, niftk::IGIDataType::IGITimeType *lastTimeStampInStore) override |
virtual void | SetProperties (const IGIDataSourceProperties &properties) override |
IGIDataSourceI::SetProperties() More... | |
virtual IGIDataSourceProperties | GetProperties () const override |
IGIDataSourceI::GetProperties() More... | |
Public Member Functions inherited from niftk::IGIDataSource | |
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 | 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... | |
Protected Member Functions | |
NiftyLinkDataSourceService (QString name, QString factoryName, const IGIDataSourceProperties &properties, mitk::DataStorage::Pointer dataStorage) | |
virtual | ~NiftyLinkDataSourceService () |
void | MessageReceived (niftk::NiftyLinkMessageContainer::Pointer message) |
Receives ANY NiftyLink message (hence OpenIGTLink) message, and adds its to the buffers. Currently we assume that its tracking data or 2D images. (i.e. relatively small). This design may be inappropriate for large scale (e.g. 4D MR) data. More... | |
Protected Member Functions inherited from niftk::IGIDataSource | |
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 () |
Protected Member Functions inherited from niftk::IGISaveableDataSourceI | |
IGISaveableDataSourceI () | |
virtual | ~IGISaveableDataSourceI () |
IGISaveableDataSourceI (const IGISaveableDataSourceI &) | |
IGISaveableDataSourceI & | operator= (const IGISaveableDataSourceI &) |
Protected Member Functions inherited from niftk::IGIBufferedSaveableDataSourceI | |
IGIBufferedSaveableDataSourceI () | |
virtual | ~IGIBufferedSaveableDataSourceI () |
IGIBufferedSaveableDataSourceI (const IGIBufferedSaveableDataSourceI &) | |
IGIBufferedSaveableDataSourceI & | operator= (const IGIBufferedSaveableDataSourceI &) |
Protected Member Functions inherited from niftk::IGICleanableDataSourceI | |
IGICleanableDataSourceI () | |
virtual | ~IGICleanableDataSourceI () |
IGICleanableDataSourceI (const IGICleanableDataSourceI &) | |
IGICleanableDataSourceI & | operator= (const IGICleanableDataSourceI &) |
Abstract base class for both NiftyLink Client and Server sources.
In contrast say to niftk::OpenCVVideoDataSourceService, or niftk::MITKTrackerDataSourceService which directly grab data in a specific data grabbing thread, here, data comes via a socket. NiftyLink client and server classes are already threaded, so messages simply appear via a Qt signal. This class therefore registers to this signal to receive new messages.
This class is the common base class of NiftyLinkClientDataSourceService and NiftyLinkServerDataSourceService. So, in both cases, there should only be 1 connection. So, either NiftyLinkClientDataSourceService connects to 1 external server (e.g. PLUSServer), or 1 external client connects to NiftyLinkServerDataSourceService. If you run this class as a NiftyLinkServerDataSourceService, and multiple clients try to connect, then each client should be setting a unique device name on their messages.
Note: All errors should thrown as mitk::Exception or sub-classes thereof.
|
protected |
|
protectedvirtual |
|
overridevirtual |
Implements niftk::IGICleanableDataSourceI.
|
overridevirtual |
IGIDataSourceI::GetProperties()
Implements niftk::IGIDataSourceI.
|
protected |
Receives ANY NiftyLink message (hence OpenIGTLink) message, and adds its to the buffers. Currently we assume that its tracking data or 2D images. (i.e. relatively small). This design may be inappropriate for large scale (e.g. 4D MR) data.
|
overridevirtual |
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Implements niftk::IGISaveableDataSourceI.
|
overridevirtual |
Implements niftk::IGIBufferedSaveableDataSourceI.
|
overridevirtual |
IGIDataSourceI::SetProperties()
Also note, that if you set the lag here, it will be applied to all data-sources. So, if you have 1 source eg. PLUS Server, sending tracking and imaging, the remote source needs to ensure that the different types of data have been synchronised in time.
Implements niftk::IGIDataSourceI.
|
overridevirtual |
Reimplemented from niftk::IGIDataSource.
|
overridevirtual |
Implements niftk::IGIDataSourceI.