Enum nifti::error::NiftiError [−]
pub enum NiftiError { InvalidFormat, OutOfBounds(Vec<u16>), AxisOutOfBounds(u16), MissingVolumeFile(IOError), NoVolumeData, IncorrectVolumeDimensionality(u16, u16), UnsupportedDataType(NiftiType), Io(IOError), IncompatibleLength, InvalidCode(&'static str, i16), }
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
.
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(u16, u16)
An incorrect number of dimensions was provided when interacting with a volume.
UnsupportedDataType(NiftiType)
This voxel data type is not supported. Sorry. :(
Io(IOError)
I/O Error
IncompatibleLength
Raw data and buffer length are incompatible
InvalidCode(&'static str, i16)
Header contains a code which is not valid for the given attribute
Trait Implementations
impl Debug for NiftiError
[src]
impl Debug for NiftiError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for NiftiError
impl Display for NiftiError
impl Error for NiftiError
impl Error for NiftiError
fn description(&self) -> &str
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<IOError> for NiftiError
impl From<IOError> for NiftiError
fn from(err: IOError) -> NiftiError
fn from(err: IOError) -> NiftiError
Performs the conversion.
Auto Trait Implementations
impl Send for NiftiError
impl Send for NiftiError
impl Sync for NiftiError
impl Sync for NiftiError