spaces
ngtools.spaces
Utilities to manipulate spaces (ng.CoordinateSpace) in neuroglancer.
Functions:
| Name | Description |
|---|---|
|
Convert units of a coordinate space. |
|
Ensure that dimensions have SI units (without prefix). |
|
Convert a compact axis name ( |
|
Check whether two standard spaces can map to/from each other. |
|
Get neurospace name from spatial axis names. |
Attributes:
| Name | Type | Description |
|---|---|---|
|
|
Default display space ( |
|
|
List of all default orientations ( |
|
|
Mapping to all neuroglancer standard spaces (xyz, zyx, etc). |
|
|
Mapping from short to long axis names. |
|
|
List of all existing neuroimaging orientations ( |
|
|
Mapping to all known neuroimaging-oriented spaced (RAS, LPI, etc), as well as all neuroglancer standard spaces (xyz, zyx, etc). |
|
|
Mapping to transforms between neuroimaging spaces.
The keys are either pairs of |
name_compact2full
Convert compact axes name to long list of names.
Examples:
compact2full("ras") -> ["right", "anterior", "posterior"]
compact2full("xyz") -> ["x", "y", "z"]
space_is_compatible
Check whether two spaces can map to/from each other.
True if both spaces describe the same set of 3 axes.
convert_space
Convert units of a coordinate space.
Example
Ensure that all axes have SI unit (without prefix)
See also: normalize_space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
space
|
|
Coordinate space to convert. |
required |
units
|
|
Output unit(s).
|
'base'
|
names
|
|
Name(s) of axis to convert.
If |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
space |
|
Converted coordinate space. |
normalize_space
Ensure that dimensions have SI units (without prefix).
See also: convert_space.