[][src]Struct nifti::object::ReaderOptions

pub struct ReaderOptions { /* fields omitted */ }

Options and flags which can be used to configure how a NIfTI image is read.

Implementations

impl ReaderOptions[src]

pub fn new() -> ReaderOptions[src]

Creates a blank new set of options ready for configuration.

All options are initially set to false.

pub fn fix_header(&mut self, fix_header: bool) -> &mut Self[src]

Sets the options to fix some known header problems.

pub fn read_file<P>(&self, path: P) -> Result<InMemNiftiObject> where
    P: AsRef<Path>, 
[src]

Retrieve the full contents of a NIFTI object.

The given file system path is used as reference. If the file only contains the header, this method will look for the corresponding file with the extension ".img", or ".img.gz" if the former wasn't found.

Example

use nifti::{NiftiObject, ReaderOptions};

let obj = ReaderOptions::new().read_file("minimal.nii.gz")?;

pub fn read_file_pair<P, Q>(
    &self,
    hdr_path: P,
    vol_path: Q
) -> Result<InMemNiftiObject> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

Retrieve a NIFTI object as separate header and volume files.

This method is useful when file names are not conventional for a NIFTI file pair.

Trait Implementations

impl Clone for ReaderOptions[src]

impl Debug for ReaderOptions[src]

impl PartialEq<ReaderOptions> for ReaderOptions[src]

impl StructuralPartialEq for ReaderOptions[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>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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>,