[][src]Enum nifti::error::NiftiError

pub enum NiftiError {
    InvalidFormat,
    InconsistentDim(u8u16),
    OutOfBounds(Vec<u16>),
    AxisOutOfBounds(u16),
    MissingVolumeFile(IOError),
    NoVolumeData,
    IncorrectVolumeDimensionality(u16u16),
    BadVolumeSize,
    UnsupportedDataType(NiftiType),
    Io(IOError),
    IncompatibleLength(usizeusize),
    IncorrectDescriptionLength(usize),
    InvalidCode(&'static stri16),
}

Error type for all error variants originated by this crate.

Variants

InvalidFormat

An invalid NIfTI-1 file was parsed. This is detected when reading the file's magic code, which should be either b"ni1\0" or b"n+1\0.

InconsistentDim(u8u16)

The field dim is in an invalid state, as a consequence of dim[0] or one of the elements in 1..dim[0] + 1 not being positive.

OutOfBounds(Vec<u16>)

Attempted to read volume outside boundaries.

AxisOutOfBounds(u16)

Attempted to read a volume over a volume's unexistent dimension.

MissingVolumeFile(IOError)

Could not retrieve a volume file based on the given header file.

NoVolumeData

An attempt to read a complete NIFTI-1 object from a header file was made. It can also be triggered when a NIFTI object contains the magic code "ni-1\0", even if the following bytes contain the volume.

IncorrectVolumeDimensionality(u16u16)

An incorrect number of dimensions was provided when interacting with a volume.

BadVolumeSize

Inconsistent or unsupported volume size (due to one or more dimensions being too large).

UnsupportedDataType(NiftiType)

This voxel data type is not supported. Sorry. :(

I/O Error

IncompatibleLength(usizeusize)

Raw data buffer length and volume dimensions are incompatible

IncorrectDescriptionLength(usize)

Description length must be lower than or equal to 80 bytes

InvalidCode(&'static stri16)

Header contains a code which is not valid for the given attribute

Trait Implementations

impl Debug for NiftiError[src]

impl Display for NiftiError[src]

impl Error for NiftiError[src]

impl From<Error> for NiftiError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,