14 #ifndef niftkNiftyLinkDataSourceService_h
15 #define niftkNiftyLinkDataSourceService_h
26 #include <NiftyLinkMessageContainer.h>
28 #include <igtlTrackingDataMessage.h>
29 #include <igtlImageMessage.h>
30 #include <igtlStringMessage.h>
31 #include <igtlTimeStamp.h>
37 #include <QAbstractSocket>
101 virtual void SaveItem(niftk::IGIDataType::Pointer item)
override;
138 mitk::DataStorage::Pointer dataStorage
153 std::vector<IGIDataItemInfo> ReceiveTrackingData(QString bufferName,
156 igtl::TrackingDataMessage*);
157 void SaveTrackingData(niftk::NiftyLinkDataType::Pointer, igtl::TrackingDataMessage*);
160 std::vector<IGIDataItemInfo> ReceiveImage(QString bufferName,
163 igtl::ImageMessage*);
164 void SaveImage(niftk::NiftyLinkDataType::Pointer, igtl::ImageMessage*);
167 std::vector<IGIDataItemInfo> ReceiveString(igtl::StringMessage*);
169 void AddAll(
const std::vector<IGIDataItemInfo>&
a, std::vector<IGIDataItemInfo>&
b);
170 QString GetDirectoryNamePart(
const QString& fullPathName,
int indexFromEnd);
179 QMap<QString, std::set<niftk::IGIDataType::IGITimeType> > m_PlaybackIndex;
180 QMap<QString, QHash<niftk::IGIDataType::IGITimeType, QStringList> > m_PlaybackFiles;
183 QMap<QString, niftk::IGIWaitForSavedDataSourceBuffer::Pointer> m_Buffers;
186 igtl::TimeStamp::Pointer m_MessageCreatedTimeStamp;
GLsizei GLenum GLuint GLuint GLsizei GLchar * message
Definition: glew.h:2539
bool ProbeRecordedData(niftk::IGIDataType::IGITimeType *firstTimeStampInStore, niftk::IGIDataType::IGITimeType *lastTimeStampInStore) override
Definition: niftkNiftyLinkDataSourceService.cxx:171
virtual void SetProperties(const IGIDataSourceProperties &properties) override
IGIDataSourceI::SetProperties()
Definition: niftkNiftyLinkDataSourceService.cxx:108
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.
Definition: niftkNiftyLinkDataSourceService.cxx:1041
virtual void CleanBuffer() override
Definition: niftkNiftyLinkDataSourceService.cxx:140
Thread class, based on IGITimerBasedThread to simply call "CleanBuffer".
Definition: niftkIGIDataSourceBackgroundDeleteThread.h:29
Abstract base class for data sources that can clean their own buffer.
Definition: niftkIGICleanableDataSourceI.h:27
virtual void StartPlayback(niftk::IGIDataType::IGITimeType firstTimeStamp, niftk::IGIDataType::IGITimeType lastTimeStamp) override
Definition: niftkIGIDataSource.cxx:238
mitkClassMacroItkParent(IGIDataSource, niftk::IGIDataSourceI) virtual QString GetName() const override
virtual void SaveBuffer() override
Definition: niftkNiftyLinkDataSourceService.cxx:154
Abstract base class for both NiftyLink Client and Server sources.
Definition: niftkNiftyLinkDataSourceService.h:63
unsigned long int IGIIndexType
Definition: niftkIGIDataType.h:40
Thread class, based on IGITimerBasedThread to simply call "SaveBuffer".
Definition: niftkIGIDataSourceBackgroundSaveThread.h:29
SystemTimeServiceI::TimeType IGITimeType
Definition: niftkIGIDataType.h:39
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
virtual IGIDataSourceProperties GetProperties() const override
IGIDataSourceI::GetProperties()
Definition: niftkNiftyLinkDataSourceService.cxx:127
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8272
QMap< QString, QVariant > IGIDataSourceProperties
Definition: niftkIGIDataSourceI.h:33
virtual ~NiftyLinkDataSourceService()
Definition: niftkNiftyLinkDataSourceService.cxx:97
NiftyLinkDataSourceService(QString name, QString factoryName, const IGIDataSourceProperties &properties, mitk::DataStorage::Pointer dataStorage)
Definition: niftkNiftyLinkDataSourceService.cxx:43
virtual void StopPlayback() override
Definition: niftkNiftyLinkDataSourceService.cxx:195
Abstract base class for IGI DataSources, such as objects that produce tracking data, video frames or ultrasound frames.
Definition: niftkIGIDataSource.h:47
GLuint const GLchar * name
Definition: glew.h:1798
virtual void PlaybackData(niftk::IGIDataType::IGITimeType requestedTimeStamp)=0
Request that the data source loads data corresponding to the given timestamp.
Abstract base class for data sources that can save their own buffer.
Definition: niftkIGISaveableDataSourceI.h:27
virtual std::vector< IGIDataItemInfo > Update(const niftk::IGIDataType::IGITimeType &time) override
Definition: niftkNiftyLinkDataSourceService.cxx:706
virtual void SaveItem(niftk::IGIDataType::Pointer item) override
Definition: niftkNiftyLinkDataSourceService.cxx:483
Definition: niftkExceptionObject.h:21
Abstract base class for data sources that can clean their own buffer.
Definition: niftkIGIBufferedSaveableDataSourceI.h:28