|
libfs
Header-only C++11 library for accessing FreeSurfer neuroimaging data
|
A simple 4D array datastructure, useful for representing volume data. More...
#include <libfs.h>
Public Member Functions | |
| Array4D (unsigned int d1, unsigned int d2, unsigned int d3, unsigned int d4) | |
| Constructor for creating an empty 4D array of the given dimensions. | |
| Array4D (MghHeader *mgh_header) | |
| Constructor for creating an empty 4D array based on dimensions specified in an fs::MghHeader. | |
| Array4D (Mgh *mgh) | |
| Constructor for creating an empty 4D array based on dimensions specified in the header of an fs::Mgh. Does not init the data. | |
| const T & | at (const unsigned int i1, const unsigned int i2, const unsigned int i3, const unsigned int i4) const |
| Get the value at the given 4D position. | |
| unsigned int | get_index (const unsigned int i1, const unsigned int i2, const unsigned int i3, const unsigned int i4) const |
| Get the index in the vector for the given 4D position. | |
| unsigned int | num_values () const |
| Get number of values/voxels. | |
Public Attributes | |
| unsigned int | d1 |
| size of data along 1st dimension | |
| unsigned int | d2 |
| size of data along 2nd dimension | |
| unsigned int | d3 |
| size of data along 3rd dimension | |
| unsigned int | d4 |
| size of data along 4th dimension | |
| std::vector< T > | data |
| the data, as a 1D vector. Use fs::Array4D::at for easy access in 4D. | |
A simple 4D array datastructure, useful for representing volume data.
By convention, for FreeSurfer data, the order of the 4 dimensions is: time, x, y, z.
1.8.13