v2.0.0
Loading...
Searching...
No Matches
mri_mgh_io.h
Go to the documentation of this file.
1//=============================================================================================================
70
71#ifndef MRI_MGH_IO_H
72#define MRI_MGH_IO_H
73
74//=============================================================================================================
75// INCLUDES
76//=============================================================================================================
77
78#include "mri_global.h"
79#include "mri_vol_data.h"
80
81//=============================================================================================================
82// QT INCLUDES
83//=============================================================================================================
84
85#include <QString>
86#include <QVector>
87
88//=============================================================================================================
89// DEFINE NAMESPACE MRILIB
90//=============================================================================================================
91
92namespace MRILIB {
93
94//=============================================================================================================
109{
110public:
111 //=========================================================================================================
129 static bool read(const QString& mgzFile,
130 MriVolData& volData,
131 QVector<FIFFLIB::FiffCoordTrans>& additionalTrans,
132 const QString& subjectMriDir = QString(),
133 bool verbose = false);
134
135private:
136 //=========================================================================================================
145 static bool decompress(const QString& mgzFile, QByteArray& rawData);
146
147 //=========================================================================================================
157 static bool parseHeader(const QByteArray& data, MriVolData& volData, bool verbose);
158
159 //=========================================================================================================
168 static bool readVoxelData(const QByteArray& data, MriVolData& volData);
169
170 //=========================================================================================================
182 static bool parseFooter(const QByteArray& data,
183 MriVolData& volData,
184 QVector<FIFFLIB::FiffCoordTrans>& additionalTrans,
185 const QString& subjectMriDir,
186 bool verbose);
187};
188
189} // namespace MRILIB
190
191#endif // MRI_MGH_IO_H
MRI library export/import macros.
#define MRISHARED_EXPORT
Definition mri_global.h:50
MriVolData class declaration.
MRI volume and coordinate-system I/O (volumes, voxel geometry, transforms).
FreeSurfer MGH/MGZ file reader.
Definition mri_mgh_io.h:109
static bool read(const QString &mgzFile, MriVolData &volData, QVector< FIFFLIB::FiffCoordTrans > &additionalTrans, const QString &subjectMriDir=QString(), bool verbose=false)
MRI volume data from FreeSurfer MGH/MGZ file.