brainhops.datamodel.enums
Enumerations shared across the data model, such as interpolation orders and boundary conditions.
Classes
SimplifyPolicy
Bases: StrEnum
How hard a transformation may be looked at, and therefore how far it may be simplified.
none-- declared type only: nothing is inspected, nothing is rewritten.analytic-- structure only:Noneparameters, array shapes, axis lists and wrapper contents are read; no value is read and no lazy inverse is materialized. Invertibility, injectivity and surjectivity of a matrix transformation are assumed from its shape at this level (a square matrix is presumed invertible, a wide one surjective, a tall one injective).numeric-- values too: zero tests, diagonality, orthogonality, rank; a typed inverse may be materialized when a leaf is downcast. Rank replaces the analytic shape assumption, so a square singular matrix is not invertible here.
BoundaryCondition
Bases: StrEnum
Boundary conditions for interpolation and resampling.
The following boundary conditions are supported:
| Value | Aliases | Description |
|---|---|---|
nearest |
edge, border |
(a a a a | a b c d | d d d d) |
reflect |
symmetric, dct2 |
(d c b a | a b c d | d c b a) |
mirror |
dct1 |
(d c b | a b c d | c b a) |
grid-wrap |
circular, circulant, dft |
(a b c d | a b c d | a b c d) |
wrap |
(d b c d | a b c d | b c a b) |
|
constant |
zero, zeros |
(0 0 0 0 | a b c d | 0 0 0 0) |
InterpolationOrder
Bases: IntEnum
Interpolation order for interpolation and resampling.
The following interpolation orders are supported:
| Name | Aliases | Value | Description |
|---|---|---|---|
zeroth |
nearest |
0 | Nearest neighbor interpolation. |
first |
linear |
1 | Linear interpolation. |
second |
quadratic |
2 | Quadratic interpolation. |
third |
cubic |
3 | Cubic interpolation. |
fourth |
4 | Fourth-order interpolation. | |
fifth |
5 | Fifth-order interpolation. | |
barycentric |
-1 | Barycentric interpolation. | |
fourier |
-2 | Fourier interpolation. |
OrientationType
Bases: StrEnum
Orientation types for coordinate systems and transformations.
Currently, only the "anatomical" orientation is supported.
| Name | Value | Description |
|---|---|---|
anatomical |
"anatomical" |
Anatomical orientation. |
AnatomicalOrientationValue
Bases: StrEnum
Anatomical orientation values for coordinate systems and transformations.
The following values are supported:
| Name | Value | Description |
|---|---|---|
left_to_right |
"left-to-right" |
|
right_to_left |
"right-to-left" |
|
proximal_to_distal |
"proximal-to-distal" |
|
distal_to_proximal |
"distal-to-proximal" |
|
anterior_to_posterior |
"anterior-to-posterior" |
front-to-back |
posterior_to_anterior |
"posterior-to-anterior" |
back-to-front |
inferior_to_superior |
"inferior-to-superior" |
feet-to-head |
superior_to_inferior |
"superior-to-inferior" |
head-to-feet |
dorsal_to_palmar |
"dorsal-to-palmar" |
back of hand to palm |
palmar_to_dorsal |
"palmar-to-dorsal" |
palm to back of hand |
dorsal_to_plantar |
"dorsal-to-plantar" |
top of foot to sole |
plantar_to_dorsal |
"plantar-to-dorsal" |
sole to top of foot |
rostral_to_caudal |
"rostral-to-caudal" |
nose/beak-to-tail, especially for nervous system |
caudal_to_rostral |
"caudal-to-rostral" |
tail-to-nose/beak, especially for nervous system |
cranial_to_caudal |
"cranial-to-caudal" |
head-to-tail |
caudal_to_cranial |
"caudal-to-cranial" |
tail-to-head |
dorsal_to_ventral |
"dorsal-to-ventral" |
back/top-to-belly/bottom |
ventral_to_dorsal |
"ventral-to-dorsal" |
belly/bottom-to-back/top |
superficial_to_deep |
"superficial-to-deep" |
outer surface to inner depth, e.g. skin, gut, cortex |
deep_to_superficial |
"deep-to-superficial" |
inner depth to outer surface |
apical_to_basal |
"apical-to-basal" |
apical to basal surface, e.g. epithelial layers, polarized cells |
basal_to_apical |
"basal-to-apical" |
basal to apical surface |
apex_to_base |
"apex-to-base" |
tip to broad base, e.g. heart, lungs |
base_to_apex |
"base-to-apex" |
broad base to tip |
SpaceEnum
Bases: StrEnum
The known labels of a world space, used by the space, input_space
and output_space metadata fields.
The first five members are the names that NIfTI gives to its
sform_code and qform_code values. They are followed by the BIDS
template identifiers, which BIDS uses for SpatialReference and for
the space- entity of a file name, and by the spaces that BIDS
defines without a template. A label that is not listed here is kept
as a plain string.
|
Member |
Value |
Meaning |
|---|---|---|
|
|
|
NIfTI xform code 1: scanner-based anatomical coordinates |
|
|
|
NIfTI xform code 2: aligned to another file |
|
|
|
NIfTI xform code 3: Talairach-Tournoux atlas |
|
|
|
NIfTI xform code 4: MNI 152 |
|
|
|
NIfTI xform code 5: another template |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (volume) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS standard template (surface) |
|
|
|
BIDS non-standard space |
|
|
|
BIDS non-standard space |
|
|
|
BIDS non-standard space |
|
|
|
BIDS non-standard space |
|
|
|
BIDS non-standard space |
|
|
|
BIDS non-standard space |
IntentEnum
Bases: StrEnum
The known values of the intent metadata field, which says what the
values of an image represent.
The members are the NIfTI intent names, spelled as nibabel spells
them, with their NIfTI intent codes. Codes 2 to 24 name statistical
distributions, codes 1001 to 2005 name other kinds of values, and the
codes from 2006 onwards are FSL's own. An intent that is not listed
here is kept as a plain string.
|
Member |
Value |
NIfTI code |
|---|---|---|
|
|
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
|
|
1001 |
|
|
|
1002 |
|
|
|
1003 |
|
|
|
1004 |
|
|
|
1005 |
|
|
|
1006 |
|
|
|
1007 |
|
|
|
1008 |
|
|
|
1009 |
|
|
|
1010 |
|
|
|
1011 |
|
|
|
2001 |
|
|
|
2002 |
|
|
|
2003 |
|
|
|
2004 |
|
|
|
2005 |
|
|
|
2006 |
|
|
|
2007 |
|
|
|
2008 |
|
|
|
2009 |
|
|
|
2018 |
Manufacturer
Bases: StrEnum
The known values of the manufacturer metadata field (BIDS
Manufacturer), spelled as converters such as dcm2niix normalise the
DICOM Manufacturer tag. Any other manufacturer is kept as a plain
string.
|
Member |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IlluminationType
Bases: StrEnum
The known values of the illumination_type metadata field, which are
the members of the OME Channel.IlluminationType enumeration. Any
other value is kept as a plain string.
|
Member |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ContrastMethod
Bases: StrEnum
The known values of the contrast_method metadata field, which are the
members of the OME Channel.ContrastMethod enumeration. Any other
value is kept as a plain string.
|
Member |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|