libfs
Header-only C++11 library for accessing FreeSurfer neuroimaging data
Public Member Functions | Public Attributes | List of all members
fs::MghHeader Struct Reference

Models the header of an MGH file. More...

#include <libfs.h>

Collaboration diagram for fs::MghHeader:
Collaboration graph
[legend]

Public Member Functions

 MghHeader ()
 Empty default constuctor.
 
 MghHeader (Curv curv)
 
 MghHeader (std::vector< float > curv_data)
 
size_t num_values () const
 Compute the number of values based on the dim*length header fields.
 

Public Attributes

int32_t dim1length = 0
 size of data along 1st dimension
 
int32_t dim2length = 0
 size of data along 2nd dimension
 
int32_t dim3length = 0
 size of data along 3rd dimension
 
int32_t dim4length = 0
 size of data along 4th dimension
 
int32_t dtype = 0
 the MRI data type
 
int32_t dof = 0
 typically ignored
 
int16_t ras_good_flag = 0
 flag indicating whether the data in the RAS fields (Mdc, Pxyz_c) are valid. 1 means valid, everything else means invalid.
 
float xsize = 0.0
 size of voxels along 1st axis (x or r)
 
float ysize = 0.0
 size of voxels along 2nd axis (y or a)
 
float zsize = 0.0
 size of voxels along 3rd axis (z or s)
 
std::vector< float > Mdc
 matrix
 
std::vector< float > Pxyz_c
 x,y,z coordinates of central vertex
 

Detailed Description

Models the header of an MGH file.

Constructor & Destructor Documentation

◆ MghHeader() [1/2]

fs::MghHeader::MghHeader ( Curv  curv)
inline

< Constuctor to fill header from a Curv instance.

◆ MghHeader() [2/2]

fs::MghHeader::MghHeader ( std::vector< float >  curv_data)
inline

< Constuctor to fill header from a 1D float array (curv data).


The documentation for this struct was generated from the following file: