read_vec
read_vec(filename, indices=None, mask=None)Read a 4D neuroimaging vector from file.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| filename | str or Path | Path to the 4D neuroimaging file | required |
| indices | array - like | Indices of volumes to load (0-based) If None, loads all volumes | None |
| mask | LogicalNeuroVol | Mask for sparse representation | None |
Returns
| Name | Type | Description |
|---|---|---|
| DenseNeuroVec or SparseNeuroVec | The loaded 4D vector |
Notes
Unlike R which uses 1-based indexing, Python uses 0-based indexing for the indices parameter.