[][src]Struct nifti::object::GenericNiftiObject

pub struct GenericNiftiObject<V> { /* fields omitted */ }

Generic data type for a NIfTI object.

Implementations

impl GenericNiftiObject<InMemNiftiVolume>[src]

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>[src]

👎 Deprecated since 0.10.0:

use read_file from ReaderOptions instead

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, InMemNiftiObject};

let obj = InMemNiftiObject::from_file("minimal.nii.gz")?;

pub fn from_file_pair<P, Q>(hdr_path: P, vol_path: Q) -> Result<Self> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

👎 Deprecated since 0.10.0:

use read_file_pair from ReaderOptions instead

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.

impl GenericNiftiObject<StreamedNiftiVolume<R>>[src]

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>[src]

👎 Deprecated since 0.10.0:

use read_file from ReaderStreamedOptions instead

Retrieve the NIfTI object and prepare the volume for streamed reading. 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, StreamedNiftiObject};

let obj = StreamedNiftiObject::from_file("minimal.nii.gz")?;

let volume = obj.into_volume();
for slice in volume {
    let slice = slice?;
    // manipulate slice here
}

pub fn from_file_rank<P: AsRef<Path>>(path: P, slice_rank: u16) -> Result<Self>[src]

👎 Deprecated since 0.10.0:

use read_file_rank from ReaderStreamedOptions instead

Retrieve the NIfTI object and prepare the volume for streamed reading, using slice_rank as the dimensionality of each slice. 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.

pub fn from_file_pair<P, Q>(hdr_path: P, vol_path: Q) -> Result<Self> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

👎 Deprecated since 0.10.0:

use read_file_pair from ReaderStreamedOptions instead

Retrieve a NIfTI object as separate header and volume files, for streamed volume reading. This method is useful when file names are not conventional for a NIfTI file pair.

Example

use nifti::{NiftiObject, StreamedNiftiObject};

let obj = StreamedNiftiObject::from_file_pair("abc.hdr", "abc.img.gz")?;

let volume = obj.into_volume();
for slice in volume {
    let slice = slice?;
    // manipulate slice here
}

pub fn from_file_pair_rank<P, Q>(
    hdr_path: P,
    vol_path: Q,
    slice_rank: u16
) -> Result<Self> where
    P: AsRef<Path>,
    Q: AsRef<Path>, 
[src]

👎 Deprecated since 0.10.0:

use read_file_pair_rank from ReaderStreamedOptions instead

Retrieve a NIfTI object as separate header and volume files, for streamed volume reading, using slice_rank as the dimensionality of each slice. This method is useful when file names are not conventional for a NIfTI file pair.

impl<V> GenericNiftiObject<V>[src]

pub fn from_reader<R>(mut source: R) -> Result<Self> where
    R: Read,
    V: FromSource<R>, 
[src]

Construct a NIfTI object from a data reader, first by fetching the header, the extensions, and then the volume.

Errors

  • NiftiError::NoVolumeData if the source only contains (or claims to contain) a header.

Trait Implementations

impl<V: Clone> Clone for GenericNiftiObject<V>[src]

impl<V: Debug> Debug for GenericNiftiObject<V>[src]

impl<V> NiftiObject for GenericNiftiObject<V> where
    V: NiftiVolume
[src]

type Volume = V

The concrete type of the volume.

impl<V: PartialEq> PartialEq<GenericNiftiObject<V>> for GenericNiftiObject<V>[src]

impl<V> StructuralPartialEq for GenericNiftiObject<V>[src]

Auto Trait Implementations

impl<V> RefUnwindSafe for GenericNiftiObject<V> where
    V: RefUnwindSafe
[src]

impl<V> Send for GenericNiftiObject<V> where
    V: Send
[src]

impl<V> Sync for GenericNiftiObject<V> where
    V: Sync
[src]

impl<V> Unpin for GenericNiftiObject<V> where
    V: Unpin
[src]

impl<V> UnwindSafe for GenericNiftiObject<V> where
    V: UnwindSafe
[src]

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