Skip to content

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: None parameters, 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

scanner

"scanner"

NIfTI xform code 1: scanner-based anatomical coordinates

aligned

"aligned"

NIfTI xform code 2: aligned to another file

talairach

"talairach"

NIfTI xform code 3: Talairach-Tournoux atlas

mni

"mni"

NIfTI xform code 4: MNI 152

template

"template"

NIfTI xform code 5: another template

ICBM452AirSpace

"ICBM452AirSpace"

BIDS standard template (volume)

ICBM452Warp5Space

"ICBM452Warp5Space"

BIDS standard template (volume)

IXI549Space

"IXI549Space"

BIDS standard template (volume)

MNI152Lin

"MNI152Lin"

BIDS standard template (volume)

MNI152NLin2009aAsym

"MNI152NLin2009aAsym"

BIDS standard template (volume)

MNI152NLin2009aSym

"MNI152NLin2009aSym"

BIDS standard template (volume)

MNI152NLin2009bAsym

"MNI152NLin2009bAsym"

BIDS standard template (volume)

MNI152NLin2009bSym

"MNI152NLin2009bSym"

BIDS standard template (volume)

MNI152NLin2009cAsym

"MNI152NLin2009cAsym"

BIDS standard template (volume)

MNI152NLin2009cSym

"MNI152NLin2009cSym"

BIDS standard template (volume)

MNI152NLin6Asym

"MNI152NLin6Asym"

BIDS standard template (volume)

MNI152NLin6Sym

"MNI152NLin6Sym"

BIDS standard template (volume)

MNI305

"MNI305"

BIDS standard template (volume)

MNIColin27

"MNIColin27"

BIDS standard template (volume)

MNIInfant

"MNIInfant"

BIDS standard template (volume)

MNIPediatricAsym

"MNIPediatricAsym"

BIDS standard template (volume)

NMT31Sym

"NMT31Sym"

BIDS standard template (volume)

OASIS30AntsOASISAnts

"OASIS30AntsOASISAnts"

BIDS standard template (volume)

OASIS30Atropos

"OASIS30Atropos"

BIDS standard template (volume)

Talairach

"Talairach"

BIDS standard template (volume)

UNCInfant

"UNCInfant"

BIDS standard template (volume)

fsaverage

"fsaverage"

BIDS standard template (surface)

fsaverage3

"fsaverage3"

BIDS standard template (surface)

fsaverage4

"fsaverage4"

BIDS standard template (surface)

fsaverage5

"fsaverage5"

BIDS standard template (surface)

fsaverage6

"fsaverage6"

BIDS standard template (surface)

fsaveragesym

"fsaveragesym"

BIDS standard template (surface)

fsLR

"fsLR"

BIDS standard template (surface)

fsnative

"fsnative"

BIDS standard template (surface)

orig

"orig"

BIDS non-standard space

anat

"anat"

BIDS non-standard space

T1w

"T1w"

BIDS non-standard space

T2w

"T2w"

BIDS non-standard space

individual

"individual"

BIDS non-standard space

study

"study"

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

correlation

"correlation"

2

t_test

"t test"

3

f_test

"f test"

4

z_score

"z score"

5

chi2

"chi2"

6

beta

"beta"

7

binomial

"binomial"

8

gamma

"gamma"

9

poisson

"poisson"

10

normal

"normal"

11

non_central_f_test

"non central f test"

12

non_central_chi2

"non central chi2"

13

logistic

"logistic"

14

laplace

"laplace"

15

uniform

"uniform"

16

non_central_t_test

"non central t test"

17

weibull

"weibull"

18

chi

"chi"

19

inverse_gaussian

"inverse gaussian"

20

extreme_value_1

"extreme value 1"

21

p_value

"p value"

22

log_p_value

"log p value"

23

log10_p_value

"log10 p value"

24

estimate

"estimate"

1001

label

"label"

1002

neuroname

"neuroname"

1003

general_matrix

"general matrix"

1004

symmetric_matrix

"symmetric matrix"

1005

displacement_vector

"displacement vector"

1006

vector

"vector"

1007

pointset

"pointset"

1008

triangle

"triangle"

1009

quaternion

"quaternion"

1010

dimensionless

"dimensionless"

1011

time_series

"time series"

2001

node_index

"node index"

2002

rgb_vector

"rgb vector"

2003

rgba_vector

"rgba vector"

2004

shape

"shape"

2005

fnirt_disp_field

"fnirt disp field"

2006

fnirt_cubic_spline_coef

"fnirt cubic spline coef"

2007

fnirt_dct_coef

"fnirt dct coef"

2008

fnirt_quad_spline_coef

"fnirt quad spline coef"

2009

topup_field

"topup field"

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

Siemens

"Siemens"

GE

"GE"

Philips

"Philips"

Canon

"Canon"

Toshiba

"Toshiba"

Hitachi

"Hitachi"

Bruker

"Bruker"

UIH

"UIH"

MRSolutions

"MRSolutions"

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

Transmitted

"Transmitted"

Epifluorescence

"Epifluorescence"

Oblique

"Oblique"

NonLinear

"NonLinear"

Other

"Other"

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

Brightfield

"Brightfield"

Phase

"Phase"

DIC

"DIC"

HoffmanModulation

"HoffmanModulation"

ObliqueIllumination

"ObliqueIllumination"

PolarizedLight

"PolarizedLight"

Darkfield

"Darkfield"

Fluorescence

"Fluorescence"

Other

"Other"