NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Interface for an IGI Data Source (e.g. video feed, ultrasound feed, tracker feed). More...
Public Member Functions | |
mitkClassMacroItkParent (IGIDataSourceI, itk::Object) virtual QString GetName() const =0 | |
Returns the unique name of the data source, e.g. OpenCV-0. More... | |
virtual QString | GetFactoryName () const =0 |
Returns the name of the factory that created it. The name should be the string that appears in the GUI combo-box. So, implementing classes should have this value set at construction, and it should be immutable throughout the lifetime of the object. More... | |
virtual QString | GetStatus () const =0 |
Returns a status string. More... | |
virtual QString | GetDescription () const =0 |
Returns a free-text string describing the source. More... | |
virtual void | StartPlayback (niftk::IGIDataType::IGITimeType firstTimeStamp, niftk::IGIDataType::IGITimeType lastTimeStamp)=0 |
Starts the playback process, implementors are meant to do all initialisation in this method, so that after the successful return of this method, the data source is fully ready to play back. More... | |
virtual void | StopPlayback ()=0 |
Stops the playback process, so after this call, implementing data sources should be grabbing live data again. More... | |
virtual void | PlaybackData (niftk::IGIDataType::IGITimeType requestedTimeStamp)=0 |
Request that the data source loads data corresponding to the given timestamp. More... | |
virtual void | SetRecordingLocation (const QString &pathName)=0 |
Set the root directory of the recording session. More... | |
virtual QString | GetRecordingLocation () const =0 |
Get the root directory of the recording session. More... | |
virtual void | SetPlaybackSourceName (const QString &sourceName)=0 |
The source name is the first level directory name within the root recording location. This normally corresponds to a device name, like OpenCV-0 for the OpenCV Video Source. More... | |
virtual QString | GetPlaybackSourceName () const =0 |
virtual void | StartRecording ()=0 |
Start recording. More... | |
virtual void | StopRecording ()=0 |
Stops the recording process, switching the data source back to the live grabbing mode. More... | |
virtual void | SetShouldUpdate (bool shouldUpdate)=0 |
Sets a flag to say that this data source should/should not update the data storage. This enables us to freeze the views while the data source itself can continue grabbing and hence continue recording. More... | |
virtual bool | GetShouldUpdate () const =0 |
Returns the value of the update flag,. 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 | |
IGIDataSourceI () | |
virtual | ~IGIDataSourceI () |
Interface for an IGI Data Source (e.g. video feed, ultrasound feed, tracker feed).
Note: All errors should thrown as mitk::Exception or sub-classes thereof.
|
protected |
|
protectedvirtual |
|
pure virtual |
Returns a free-text string describing the source.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Returns the name of the factory that created it. The name should be the string that appears in the GUI combo-box. So, implementing classes should have this value set at construction, and it should be immutable throughout the lifetime of the object.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Implemented in niftk::IGIDataSource.
|
pure virtual |
Retrieve any properties from the data source.
Implemented in niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
pure virtual |
Get the root directory of the recording session.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Returns the value of the update flag,.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Returns a status string.
At this stage, each data-source can return whatever it likes that best describes its current status. This is currently not something specific like an enum, but may have to change in future.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Returns the unique name of the data source, e.g. OpenCV-0.
Implementing classes should have this value set at construction, and it should be immutable throughout the lifetime of the object.
|
pure virtual |
Request that the data source loads data corresponding to the given timestamp.
This is expected to just load data into internal buffers. It should then be up to the Update() method to update data storage.
Implemented in niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
pure virtual |
Checks whether the previously recorded data is readable, and returns the time-range for it.
firstTimeStampInStore | earliest suitable data item. Not optional! |
lastTimeStampInStore | last suitable data item. Not optional! |
should | not throw! Return false instead. |
Implemented in niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::UltrasonixDataSourceService, and niftk::QtAudioDataSourceService.
|
pure virtual |
The source name is the first level directory name within the root recording location. This normally corresponds to a device name, like OpenCV-0 for the OpenCV Video Source.
When we playback, we call this setter with whatever is currently in the folder, thereby allowing us to use legacy sources.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Allows you to set properties, but the implementor is free to ignore them.
Implemented in niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
pure virtual |
Set the root directory of the recording session.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Sets a flag to say that this data source should/should not update the data storage. This enables us to freeze the views while the data source itself can continue grabbing and hence continue recording.
Implemented in niftk::IGIDataSource.
|
pure virtual |
Starts the playback process, implementors are meant to do all initialisation in this method, so that after the successful return of this method, the data source is fully ready to play back.
firstTimeStamp | specifies the minimum time of the recording session. |
lastTimeStamp | specifies the maximum time of the recording session. |
Implemented in niftk::IGIDataSource, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
pure virtual |
Start recording.
Given a pathName (root directory) for a recording session, specified by calling SetRecordingLocation(), a data source can decide to record to a sub-folder. This method should initialise the sub-folder and make sure the data-source is ready to record all data. The data source is assumed to be grabbing live while switching into recording mode, so make sure all your code is thread safe.
Implemented in niftk::IGIDataSource, and niftk::QtAudioDataSourceService.
|
pure virtual |
Stops the playback process, so after this call, implementing data sources should be grabbing live data again.
Implemented in niftk::IGIDataSource, niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.
|
pure virtual |
Stops the recording process, switching the data source back to the live grabbing mode.
Implemented in niftk::IGIDataSource, and niftk::QtAudioDataSourceService.
|
pure virtual |
Requests that this data source updates data storage to reflect the given point in time.
e.g. a tracker may have many tools, so each item in the return vector describes the status of a specific tool. This means that as the number of visible items changes, this array may change size.
Implemented in niftk::NiftyLinkDataSourceService, niftk::NVidiaSDIDataSourceService, niftk::MITKTrackerDataSourceService, niftk::OpenCVVideoDataSourceService, niftk::QtAudioDataSourceService, and niftk::UltrasonixDataSourceService.