Enum nifti::error::NiftiError
[−]
pub enum NiftiError { InvalidFormat, OutOfBounds(Vec<u16>), MissingVolumeFile(IOError), NoVolumeData, IncorrectVolumeDimensionality(u16, u16), UnsupportedDataType(NiftiType), Io(IOError), }
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.
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
Trait Implementations
impl Debug for NiftiError
[src]
impl Display for NiftiError
impl Error for NiftiError
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<IOError> for NiftiError
fn from(err: IOError) -> NiftiError
Performs the conversion.