registry
lacuna.assets.transforms.registry
¶
Transform registry with TemplateFlow integration.
This module provides registry and metadata for spatial transformations between coordinate spaces.
TransformMetadata
dataclass
¶
Bases: AssetMetadata
Metadata for a spatial transformation.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Transform identifier (e.g., "MNI152NLin6Asym_to_MNI152NLin2009cAsym") |
description |
str
|
Human-readable description |
from_space |
str
|
Source coordinate space |
to_space |
str
|
Target coordinate space |
transform_type |
str
|
Type of transform ("nonlinear", "affine", "composite") |
source |
str
|
Source of transform (always "templateflow") |
Source code in src/lacuna/assets/transforms/registry.py
validate()
¶
Validate transform metadata.
Raises:
| Type | Description |
|---|---|
ValueError
|
If metadata is invalid |
Source code in src/lacuna/assets/transforms/registry.py
list_transforms(from_space=None, to_space=None)
¶
List available transforms from TemplateFlow.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
from_space
|
str
|
Filter by source coordinate space |
None
|
to_space
|
str
|
Filter by target coordinate space |
None
|
Returns:
| Type | Description |
|---|---|
list[TransformMetadata]
|
Matching transforms |
Examples:
>>> from lacuna.assets.transforms import list_transforms
>>>
>>> # List all available transforms
>>> transforms = list_transforms()
>>>
>>> # Find transforms from NLin6 to NLin2009c
>>> transforms = list_transforms(
... from_space="MNI152NLin6Asym",
... to_space="MNI152NLin2009cAsym"
... )