v2.0.0
Loading...
Searching...
No Matches
mri_mgh_io.h
Go to the documentation of this file.
1//=============================================================================================================
59
60#ifndef MRI_MGH_IO_H
61#define MRI_MGH_IO_H
62
63//=============================================================================================================
64// INCLUDES
65//=============================================================================================================
66
67#include "mri_global.h"
68#include "mri_vol_data.h"
69
70//=============================================================================================================
71// QT INCLUDES
72//=============================================================================================================
73
74#include <QString>
75#include <QVector>
76
77//=============================================================================================================
78// DEFINE NAMESPACE MRILIB
79//=============================================================================================================
80
81namespace MRILIB {
82
83//=============================================================================================================
101{
102public:
103 //=========================================================================================================
121 static bool read(const QString& mgzFile,
122 MriVolData& volData,
123 QVector<FIFFLIB::FiffCoordTrans>& additionalTrans,
124 const QString& subjectMriDir = QString(),
125 bool verbose = false);
126
127private:
128 //=========================================================================================================
137 static bool decompress(const QString& mgzFile, QByteArray& rawData);
138
139 //=========================================================================================================
149 static bool parseHeader(const QByteArray& data, MriVolData& volData, bool verbose);
150
151 //=========================================================================================================
160 static bool readVoxelData(const QByteArray& data, MriVolData& volData);
161
162 //=========================================================================================================
174 static bool parseFooter(const QByteArray& data,
175 MriVolData& volData,
176 QVector<FIFFLIB::FiffCoordTrans>& additionalTrans,
177 const QString& subjectMriDir,
178 bool verbose);
179
180 //=========================================================================================================
188 static int bytesPerVoxel(int type);
189};
190
191} // namespace MRILIB
192
193#endif // MRI_MGH_IO_H
Export/import macros and build-info accessors for MRILIB.
#define MRISHARED_EXPORT
Definition mri_global.h:39
Format-agnostic in-memory representation of a 3D MRI volume plus its slice decomposition.
Volume I/O, voxel geometry and slice resampling for structural MRI data inside mne-cpp.
Stateless decoder for FreeSurfer MGH and MGZ volume containers.
Definition mri_mgh_io.h:101
static bool read(const QString &mgzFile, MriVolData &volData, QVector< FIFFLIB::FiffCoordTrans > &additionalTrans, const QString &subjectMriDir=QString(), bool verbose=false)
Format-agnostic 3D MRI volume: header geometry, voxel buffer (as a vector of MriSlice),...