registry
lacuna.assets.connectomes.registry
¶
Connectome metadata classes.
This module defines metadata structures for both structural and functional connectomes used in lesion network mapping.
FunctionalConnectomeMetadata
dataclass
¶
Bases: SpatialAssetMetadata
Metadata for a functional connectome (voxel-wise timeseries).
Used for functional lesion network mapping (fLNM). Requires HDF5 file(s) containing whole-brain voxel-wise BOLD timeseries data.
HDF5 structure: - 'timeseries': (n_subjects, n_timepoints, n_voxels) array - 'mask_indices': (3, n_voxels) or (n_voxels, 3) brain mask coordinates - 'mask_affine': (4, 4) affine transformation matrix - 'mask_shape': Tuple as attribute (e.g., (91, 109, 91))
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique identifier (e.g., "GSP1000") |
space |
str
|
Coordinate space (typically "MNI152NLin6Asym") |
resolution |
float
|
Resolution in mm (typically 2.0 for functional data) |
description |
str
|
Human-readable description |
n_subjects |
int
|
Sample size in connectome |
modality |
str
|
Imaging modality (always "bold") |
data_path |
Path
|
Path to .h5 file or directory containing batch files |
is_batched |
bool
|
True if data_path is directory with multiple HDF5 files |
Source code in src/lacuna/assets/connectomes/registry.py
__repr__()
¶
Concise representation showing only essential fields.
Source code in src/lacuna/assets/connectomes/registry.py
StructuralConnectomeMetadata
dataclass
¶
Bases: SpatialAssetMetadata
Metadata for a structural connectome (tractography-based).
Used for structural lesion network mapping (sLNM). Requires: - Tractogram file (.tck format from MRtrix3) - TDI computed on-the-fly during analysis (with optional caching)
Note: Unlike functional connectomes, structural connectomes (tractograms) don't have an inherent voxel resolution - they exist in continuous 3D space. The output resolution is controlled by the StructuralNetworkMapping analysis.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique identifier (e.g., "dTOR985") |
space |
str
|
Coordinate space (typically "MNI152NLin2009bAsym") |
resolution |
float
|
Resolution in mm (placeholder value, not used for tractograms) |
description |
str
|
Human-readable description |
modality |
str
|
Imaging modality (always "dwi") |
tractogram_path |
Path
|
Path to .tck streamlines file |
template_path |
Path | None
|
Optional path to template image defining output grid |
Source code in src/lacuna/assets/connectomes/registry.py
__repr__()
¶
Concise representation showing only essential fields.
Source code in src/lacuna/assets/connectomes/registry.py
validate()
¶
Validate space only (tractograms don't have inherent resolution).
Raises:
| Type | Description |
|---|---|
ValueError
|
If space is invalid |