#[repr(u16)]pub enum NiftiType {
Show 16 variants
Uint8,
Int16,
Int32,
Float32,
Complex64,
Float64,
Rgb24,
Int8,
Uint16,
Uint32,
Int64,
Uint64,
Float128,
Complex128,
Complex256,
Rgba32,
}
Expand description
Data type for representing a NIFTI value type in a volume. Methods for reading values of that type from a source are also included.
Variants§
Uint8
unsigned char.
Int16
signed short.
Int32
signed int.
Float32
32 bit float.
Complex64
64 bit complex = 2 32 bit floats.
Float64
64 bit float = double.
Rgb24
3 8 bit bytes.
Int8
signed char.
Uint16
unsigned short.
Uint32
unsigned int.
Int64
signed long long.
Uint64
unsigned long long.
Float128
128 bit float = long double.
Complex128
128 bit complex = 2 64 bit floats.
Complex256
256 bit complex = 2 128 bit floats
Rgba32
4 8 bit bytes.
Implementations§
source§impl NiftiType
impl NiftiType
sourcepub fn read_primitive_value<S, T>(
self,
source: S,
endianness: Endianness,
slope: f32,
inter: f32
) -> Result<T>where
S: Read,
T: Mul<Output = T> + Add<Output = T> + DataElement + NiftiDataRescaler<T>,
pub fn read_primitive_value<S, T>( self, source: S, endianness: Endianness, slope: f32, inter: f32 ) -> Result<T>where S: Read, T: Mul<Output = T> + Add<Output = T> + DataElement + NiftiDataRescaler<T>,
Read a primitive voxel value from a source.
Trait Implementations§
source§impl FromPrimitive for NiftiType
impl FromPrimitive for NiftiType
source§fn from_i64(n: i64) -> Option<Self>
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>
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>
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>
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>
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>
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>
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 moresource§fn from_usize(n: usize) -> Option<Self>
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>
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>
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>
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>
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 moresource§impl PartialEq<NiftiType> for NiftiType
impl PartialEq<NiftiType> for NiftiType
impl Copy for NiftiType
impl Eq for NiftiType
impl StructuralEq for NiftiType
impl StructuralPartialEq for NiftiType
Auto Trait Implementations§
impl RefUnwindSafe for NiftiType
impl Send for NiftiType
impl Sync for NiftiType
impl Unpin for NiftiType
impl UnwindSafe for NiftiType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.