NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkIGIDataSourceUtils.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkIGIDataSourceUtils_h
16 #define niftkIGIDataSourceUtils_h
17 
18 #include <niftkIGIDataSourcesExports.h>
19 #include <niftkIGIDataType.h>
20 #include <set>
21 #include <QDir>
22 #include <QString>
23 #include <QMap>
24 #include <QHash>
25 
30 namespace niftk
31 {
32 
36 NIFTKIGIDATASOURCES_EXPORT
37 QString GetPreferredSlash();
38 
43 NIFTKIGIDATASOURCES_EXPORT
44 void ProbeTimeStampFiles(QDir path,
45  const QString& suffix,
46  std::set<niftk::IGIDataType::IGITimeType>& timeStamps,
47  QHash<niftk::IGIDataType::IGITimeType, QString>& timeStampToFileName);
48 
53 NIFTKIGIDATASOURCES_EXPORT
54 void ProbeTimeStampFiles(QDir path,
55  const QString& suffix,
56  std::set<niftk::IGIDataType::IGITimeType>& timeStamps
57  );
58 
62 NIFTKIGIDATASOURCES_EXPORT
63 void GetPlaybackIndex(
64  const QString& directory,
65  const QString& fileExtension,
66  QMap<QString, std::set<niftk::IGIDataType::IGITimeType> >& bufferToTimeStamp,
67  QMap<QString, QHash<niftk::IGIDataType::IGITimeType, QStringList> >& bufferToTimeStampToFileNames
68  );
69 
74 NIFTKIGIDATASOURCES_EXPORT
75 bool ProbeRecordedData(const QString& path,
76  const QString& fileExtension,
77  niftk::IGIDataType::IGITimeType* firstTimeStampInStore,
78  niftk::IGIDataType::IGITimeType* lastTimeStampInStore);
79 
80 } // end namespace
81 
82 #endif
void ProbeTimeStampFiles(QDir path, const QString &suffix, std::set< niftk::IGIDataType::IGITimeType > &timeStamps)
Scans the path for individual files that match a timestamp pattern and suffix.
Definition: niftkIGIDataSourceUtils.cxx:28
GLsizei const GLchar ** path
Definition: glew.h:5384
SystemTimeServiceI::TimeType IGITimeType
Definition: niftkIGIDataType.h:39
void GetPlaybackIndex(const QString &directory, const QString &fileExtension, QMap< QString, std::set< niftk::IGIDataType::IGITimeType > > &bufferToTimeStamp, QMap< QString, QHash< niftk::IGIDataType::IGITimeType, QStringList > > &bufferToTimeStampToFileNames)
Returns the list of timestamps, by source name.
Definition: niftkIGIDataSourceUtils.cxx:77
QString GetPreferredSlash()
Returns the platform specific directory separator.
Definition: niftkIGIDataSourceUtils.cxx:21
bool ProbeRecordedData(const QString &path, const QString &fileExtension, niftk::IGIDataType::IGITimeType *firstTimeStampInStore, niftk::IGIDataType::IGITimeType *lastTimeStampInStore)
Returns the minimum and maximum timestamped of all files under the specified path, with the specified fileExtension, that look like they are timestamped.
Definition: niftkIGIDataSourceUtils.cxx:194
Definition: niftkExceptionObject.h:21