[−][src]Struct nifti::object::GenericNiftiObject
Generic data type for a NIfTI object.
Implementations
impl GenericNiftiObject<InMemNiftiVolume>
[src]
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
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]
P: AsRef<Path>,
Q: AsRef<Path>,
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]
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]
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]
P: AsRef<Path>,
Q: AsRef<Path>,
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]
hdr_path: P,
vol_path: Q,
slice_rank: u16
) -> Result<Self> where
P: AsRef<Path>,
Q: AsRef<Path>,
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]
R: Read,
V: FromSource<R>,
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]
pub fn clone(&self) -> GenericNiftiObject<V>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V: Debug> Debug for GenericNiftiObject<V>
[src]
impl<V> NiftiObject for GenericNiftiObject<V> where
V: NiftiVolume,
[src]
V: NiftiVolume,
type Volume = V
The concrete type of the volume.
pub fn header(&self) -> &NiftiHeader
[src]
pub fn header_mut(&mut self) -> &mut NiftiHeader
[src]
pub fn extensions(&self) -> &ExtensionSequence
[src]
pub fn volume(&self) -> &Self::Volume
[src]
pub fn into_volume(self) -> Self::Volume
[src]
impl<V: PartialEq> PartialEq<GenericNiftiObject<V>> for GenericNiftiObject<V>
[src]
pub fn eq(&self, other: &GenericNiftiObject<V>) -> bool
[src]
pub fn ne(&self, other: &GenericNiftiObject<V>) -> bool
[src]
impl<V> StructuralPartialEq for GenericNiftiObject<V>
[src]
Auto Trait Implementations
impl<V> RefUnwindSafe for GenericNiftiObject<V> where
V: RefUnwindSafe,
[src]
V: RefUnwindSafe,
impl<V> Send for GenericNiftiObject<V> where
V: Send,
[src]
V: Send,
impl<V> Sync for GenericNiftiObject<V> where
V: Sync,
[src]
V: Sync,
impl<V> Unpin for GenericNiftiObject<V> where
V: Unpin,
[src]
V: Unpin,
impl<V> UnwindSafe for GenericNiftiObject<V> where
V: UnwindSafe,
[src]
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,