Enum nifti::typedef::Intent

source ·
#[repr(u16)]
pub enum Intent {
Show 47 variants None, Correl, Ttest, Ftest, Zscore, Chisq, Beta, Binom, Gamma, Poisson, Normal, FtestNonc, ChisqNonc, Logistic, Laplace, Uniform, TtestNonc, Weibull, Chi, Invgauss, Extval, Pval, Logpval, Log10pval, Estimate, Label, Neuroname, Genmatrix, Symmatrix, Dispvect, Vector, Pointset, Triangle, Quaternion, Dimless, TimeSeries, NodeIndex, RgbVector, RgbaVector, Shape, FslFnirtDisplacementField, FslCubicSplineCoefficients, FslDctCoefficients, FslQuadraticSplineCoefficients, FslTopupCubicSplineCoefficients, FslTopupQuadraticSplineCoefficients, FslTopupField,
}
Expand description

An enum type for representing a NIFTI intent code.

Variants§

§

None

default: no intention is indicated in the header.

§

Correl

nifti1 intent codes, to describe intended meaning of dataset contents

§

Ttest

[C2, chap 28] Student t statistic (1 param): p1 = DOF.

§

Ftest

[C2, chap 27] Fisher F statistic (2 params): p1 = numerator DOF, p2 = denominator DOF.

§

Zscore

[C1, chap 13] Standard normal (0 params): Density = N(0,1).

§

Chisq

[C1, chap 18] Chi-squared (1 param): p1 = DOF. Density(x) proportional to exp(-x/2) * x^(p1/2-1).

§

Beta

[C2, chap 25] Beta distribution (2 params): p1=a, p2=b. Density(x) proportional to x^(a-1) * (1-x)^(b-1).

§

Binom

[U, chap 3] Binomial distribution (2 params): p1 = number of trials, p2 = probability per trial. Prob(x) = (p1 choose x) * p2^x * (1-p2)^(p1-x), for x=0,1,...,p1.

§

Gamma

[C1, chap 17] Gamma distribution (2 params): p1 = shape, p2 = scale. Density(x) proportional to x^(p1-1) * exp(-p2*x).

§

Poisson

[U, chap 4] Poisson distribution (1 param): p1 = mean. Prob(x) = exp(-p1) * p1^x / x! , for x=0,1,2,....

§

Normal

[C1, chap 13] Normal distribution (2 params): p1 = mean, p2 = standard deviation.

§

FtestNonc

[C2, chap 30] Noncentral F statistic (3 params): p1 = numerator DOF, p2 = denominator DOF, p3 = numerator noncentrality parameter.

§

ChisqNonc

[C2, chap 29] Noncentral chi-squared statistic (2 params): p1 = DOF, p2 = noncentrality parameter.

§

Logistic

[C2, chap 23] Logistic distribution (2 params): p1 = location, p2 = scale. Density(x) proportional to sech^2((x-p1)/(2*p2)).

§

Laplace

[C2, chap 24] Laplace distribution (2 params): p1 = location, p2 = scale. Density(x) proportional to exp(-abs(x-p1)/p2).

§

Uniform

[C2, chap 26] Uniform distribution: p1 = lower end, p2 = upper end.

§

TtestNonc

[C2, chap 31] Noncentral t statistic (2 params): p1 = DOF, p2 = noncentrality parameter.

§

Weibull

[C1, chap 21] Weibull distribution (3 params): p1 = location, p2 = scale, p3 = power. Density(x) proportional to ((x-p1)/p2)^(p3-1) * exp(-((x-p1)/p2)^p3) for x > p1.

§

Chi

[C1, chap 18] Chi distribution (1 param): p1 = DOF. Density(x) proportional to x^(p1-1) * exp(-x^2/2) for x > 0. p1 = 1 = ‘half normal’ distribution p1 = 2 = Rayleigh distribution p1 = 3 = Maxwell-Boltzmann distribution.

§

Invgauss

[C1, chap 15] Inverse Gaussian (2 params): p1 = mu, p2 = lambda Density(x) proportional to exp(-p2*(x-p1)^2/(2*p1^2*x)) / x^3 for x > 0.

§

Extval

[C2, chap 22] Extreme value type I (2 params): p1 = location, p2 = scale cdf(x) = exp(-exp(-(x-p1)/p2)).

§

Pval

Data is a ‘p-value’ (no params).

§

Logpval

Data is ln(p-value) (no params). To be safe, a program should compute p = exp(-abs(this_value)). The nifti_stats.c library returns this_value as positive, so that this_value = -log(p).

§

Log10pval

Data is log10(p-value) (no params). To be safe, a program should compute p = pow(10.,-abs(this_value)). The nifti_stats.c library returns this_value as positive, so that this_value = -log10(p).

§

Estimate

To signify that the value at each voxel is an estimate of some parameter, set intent_code = NIFTI_INTENT_ESTIMATE. The name of the parameter may be stored in intent_name.

§

Label

To signify that the value at each voxel is an index into some set of labels, set intent_code = NIFTI_INTENT_LABEL. The filename with the labels may stored in aux_file.

§

Neuroname

To signify that the value at each voxel is an index into the NeuroNames labels set, set intent_code = NIFTI_INTENT_NEURONAME.

§

Genmatrix

To store an M x N matrix at each voxel:

  • dataset must have a 5th dimension (dim[0]=5 and dim[5]>1)
  • intent_code must be NIFTI_INTENT_GENMATRIX
  • dim[5] must be M*N
  • intent_p1 must be M (in float format)
  • intent_p2 must be N (ditto)
  • the matrix values A[i][j] are stored in row-order:
    • A[0][0] A[0][1] ... A[0][N-1]
    • A[1][0] A[1][1] ... A[1][N-1]
    • etc., until
    • A[M-1][0] A[M-1][1] ... A[M-1][N-1]
§

Symmatrix

To store an NxN symmetric matrix at each voxel:

  • dataset must have a 5th dimension
  • intent_code must be NIFTI_INTENT_SYMMATRIX
  • dim[5] must be N*(N+1)/2
  • intent_p1 must be N (in float format)
  • the matrix values A[i][j] are stored in row-order:
    • A[0][0]
    • A[1][0] A[1][1]
    • A[2][0] A[2][1] A[2][2]
    • etc.: row-by-row
§

Dispvect

To signify that the vector value at each voxel is to be taken as a displacement field or vector:

  • dataset must have a 5th dimension
  • intent_code must be NIFTI_INTENT_DISPVECT
  • dim[5] must be the dimensionality of the displacment vector (e.g., 3 for spatial displacement, 2 for in-plane)

(specifically for displacements)

§

Vector

(for any other type of vector)

§

Pointset

To signify that the vector value at each voxel is really a spatial coordinate (e.g., the vertices or nodes of a surface mesh):

  • dataset must have a 5th dimension
  • intent_code must be NIFTI_INTENT_POINTSET
  • dim[0] = 5
  • dim[1] = number of points
  • dim[2] = dim[3] = dim[4] = 1
  • dim[5] must be the dimensionality of space (e.g., 3 => 3D space).
  • intent_name may describe the object these points come from (e.g., “pial”, “gray/white” , “EEG”, “MEG”).
§

Triangle

To signify that the vector value at each voxel is really a triple of indexes (e.g., forming a triangle) from a pointset dataset:

  • dataset must have a 5th dimension
  • intent_code must be NIFTI_INTENT_TRIANGLE
  • dim[0] = 5
  • dim[1] = number of triangles
  • dim[2] = dim[3] = dim[4] = 1
  • dim[5] = 3
  • datatype should be an integer type (preferably NiftiType::Int32)
  • the data values are indexes (0,1,…) into a pointset dataset.
§

Quaternion

To signify that the vector value at each voxel is a quaternion:

  • dataset must have a 5th dimension
  • intent_code must be NIFTI_INTENT_QUATERNION
  • dim[0] = 5
  • dim[5] = 4
  • datatype should be a floating point type
§

Dimless

Dimensionless value - no params - although, as in _ESTIMATE the name of the parameter may be stored in intent_name.

§

TimeSeries

To signify that the value at each location is from a time series.

§

NodeIndex

To signify that the value at each location is a node index, from a complete surface dataset.

§

RgbVector

To signify that the vector value at each location is an RGB triplet, of whatever type.

  • dataset must have a 5th dimension
  • dim[0] = 5
  • dim[1] = number of nodes
  • dim[2] = dim[3] = dim[4] = 1
  • dim[5] = 3
§

RgbaVector

To signify that the vector value at each location is a 4 valued RGBA vector, of whatever type.

  • dataset must have a 5th dimension
  • dim[0] = 5
  • dim[1] = number of nodes
  • dim[2] = dim[3] = dim[4] = 1
  • dim[5] = 4
§

Shape

To signify that the value at each location is a shape value, such as the curvature.

§

FslFnirtDisplacementField

FSL FNIRT Displacement field.

§

FslCubicSplineCoefficients

FSL Cubic spline coefficients.

§

FslDctCoefficients

FSL Discrete cosine transform coefficients.

§

FslQuadraticSplineCoefficients

FSL Quadratic spline coefficients.

§

FslTopupCubicSplineCoefficients

FSL Topup cubic spline coefficients.

§

FslTopupQuadraticSplineCoefficients

FSL Topup quadratic spline coefficients.

§

FslTopupField

FSL Topup field.

Implementations§

source§

impl Intent

source

pub fn is_statcode(self) -> bool

Check whether this intent code is used for statistics.

Trait Implementations§

source§

impl Clone for Intent

source§

fn clone(&self) -> Intent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Intent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromPrimitive for Intent

source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
source§

impl Hash for Intent

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<Intent> for Intent

source§

fn eq(&self, other: &Intent) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Intent

source§

impl Eq for Intent

source§

impl StructuralEq for Intent

source§

impl StructuralPartialEq for Intent

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,

source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Scalar for Twhere T: 'static + Clone + PartialEq<T> + Debug,