v2.0.0
Loading...
Searching...
No Matches
MRILIB::MriSlice Struct Reference

Single 2D MRI slice (pixels + slice→RAS transform) used as the volume's storage unit. More...

#include <mri_vol_data.h>

Public Member Functions

 MriSlice ()

Public Attributes

QString fileName
QVector< unsigned char > pixels
QVector< unsigned short > pixelsWord
QVector< float > pixelsFloat
int pixelFormat
int width
int height
float dimx
float dimy
float scale
FIFFLIB::FiffCoordTrans trans

Detailed Description

Single 2D MRI slice (pixels + slice→RAS transform) used as the volume's storage unit.

Mirrors the on-disk FIFFB_MRI_SLICE record so that round-tripping through COR.fif is lossless: each slice owns its pixel buffer in the source's native FIFFV_MRI_PIXEL_BYTE / _WORD / _FLOAT encoding, its width/height in pixels and millimetres, and an explicit FIFFLIB::FiffCoordTrans mapping slice (column, row) to MRI surface RAS. The slicing pipeline and the COR.fif writer consume slices directly — every format-specific loader (MGH, NIfTI, raw COR) builds its volume as a vector of these.

Ported from mriSliceRec in the original MNE C mne_make_cor_set.

Definition at line 88 of file mri_vol_data.h.

Constructor & Destructor Documentation

◆ MriSlice()

MRILIB::MriSlice::MriSlice ( )
inline

Default constructor.

Definition at line 106 of file mri_vol_data.h.

Member Data Documentation

◆ dimx

float MRILIB::MriSlice::dimx

Pixel size in x direction (meters).

Definition at line 97 of file mri_vol_data.h.

◆ dimy

float MRILIB::MriSlice::dimy

Pixel size in y direction (meters).

Definition at line 98 of file mri_vol_data.h.

◆ fileName

QString MRILIB::MriSlice::fileName

Source file name.

Definition at line 90 of file mri_vol_data.h.

◆ height

int MRILIB::MriSlice::height

Height of the image in pixels.

Definition at line 96 of file mri_vol_data.h.

◆ pixelFormat

int MRILIB::MriSlice::pixelFormat

Pixel format: FIFFV_MRI_PIXEL_BYTE(1), WORD(2), FLOAT(4).

Definition at line 94 of file mri_vol_data.h.

◆ pixels

QVector<unsigned char> MRILIB::MriSlice::pixels

Pixel data (unsigned char), for FIFFV_MRI_PIXEL_BYTE.

Definition at line 91 of file mri_vol_data.h.

◆ pixelsFloat

QVector<float> MRILIB::MriSlice::pixelsFloat

Pixel data (float), for FIFFV_MRI_PIXEL_FLOAT.

Definition at line 93 of file mri_vol_data.h.

◆ pixelsWord

QVector<unsigned short> MRILIB::MriSlice::pixelsWord

Pixel data (unsigned short), for FIFFV_MRI_PIXEL_WORD.

Definition at line 92 of file mri_vol_data.h.

◆ scale

float MRILIB::MriSlice::scale

Scaling factor for pixel data.

Definition at line 99 of file mri_vol_data.h.

◆ trans

FIFFLIB::FiffCoordTrans MRILIB::MriSlice::trans

Coordinate transform: slice -> MRI (surface RAS).

Definition at line 100 of file mri_vol_data.h.

◆ width

int MRILIB::MriSlice::width

Width of the image in pixels.

Definition at line 95 of file mri_vol_data.h.


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