v2.0.0
Loading...
Searching...
No Matches
mri_vol_data.h
Go to the documentation of this file.
1//=============================================================================================================
43
44#ifndef MRI_VOL_DATA_H
45#define MRI_VOL_DATA_H
46
47//=============================================================================================================
48// INCLUDES
49//=============================================================================================================
50
51#include "mri_global.h"
52#include "mri_types.h"
53
55
56//=============================================================================================================
57// QT INCLUDES
58//=============================================================================================================
59
60#include <QString>
61#include <QVector>
62
63//=============================================================================================================
64// EIGEN INCLUDES
65//=============================================================================================================
66
67#include <Eigen/Core>
68
69//=============================================================================================================
70// DEFINE NAMESPACE MRILIB
71//=============================================================================================================
72
73namespace MRILIB {
74
75//=============================================================================================================
88{
89 QString fileName;
90 QVector<unsigned char> pixels;
91 QVector<unsigned short> pixelsWord;
92 QVector<float> pixelsFloat;
94 int width;
95 int height;
96 float dimx;
97 float dimy;
98 float scale;
100
101 //=========================================================================================================
106 : pixelFormat(1) // FIFFV_MRI_PIXEL_BYTE
107 , width(0)
108 , height(0)
111 , scale(1.0f)
112 {}
113};
114
115//=============================================================================================================
149{
150public:
151 //=========================================================================================================
155 MriVolData();
156
157 //=========================================================================================================
163 bool isValid() const;
164
165 //=========================================================================================================
177 Eigen::Matrix4f computeVox2Ras() const;
178
179 //=========================================================================================================
180 // MGH Header Fields
181 //=========================================================================================================
182
183 QString fileName;
185 int width;
186 int height;
187 int depth;
189 int type;
190 int dof;
191 bool rasGood;
192 float xsize;
193 float ysize;
194 float zsize;
195 float x_ras[3];
196 float y_ras[3];
197 float z_ras[3];
198 float c_ras[3];
199
200 //=========================================================================================================
201 // Coordinate Transforms
202 //=========================================================================================================
203
205
206 //=========================================================================================================
207 // Optional Footer Data (scan parameters)
208 //=========================================================================================================
209
210 float TR;
211 float flipAngle;
212 float TE;
213 float TI;
214 float FoV;
215
216 //=========================================================================================================
217 // Talairach Transform
218 //=========================================================================================================
219
221
222 //=========================================================================================================
223 // Slice Data
224 //=========================================================================================================
225
226 QVector<MriSlice> slices;
227};
228
229} // namespace MRILIB
230
231#endif // MRI_VOL_DATA_H
FiffCoordTrans class declaration.
MRI type definitions and constants.
MRI library export/import macros.
#define MRISHARED_EXPORT
Definition mri_global.h:50
MRI volume and coordinate-system I/O (volumes, voxel geometry, transforms).
constexpr float COR_PIXEL_SIZE
Definition mri_types.h:143
Coordinate transformation description.
QVector< unsigned char > pixels
FIFFLIB::FiffCoordTrans trans
QVector< unsigned short > pixelsWord
QVector< float > pixelsFloat
FIFFLIB::FiffCoordTrans voxelSurfRasT
bool isValid() const
QVector< MriSlice > slices
Eigen::Matrix4f computeVox2Ras() const