[−][src]Struct nifti::object::ReaderStreamedOptions
Options and flags which can be used to configure how a NIfTI image is read and iterated.
Implementations
impl ReaderStreamedOptions
[src]
pub fn new() -> ReaderStreamedOptions
[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<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
[src]
&self,
path: P
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
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, ReaderStreamedOptions}; let obj = ReaderStreamedOptions::new().read_file("minimal.nii.gz")?; let volume = obj.into_volume(); for slice in volume { let slice = slice?; // manipulate slice here }
pub fn read_file_rank<P>(
&self,
path: P,
slice_rank: u16
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
[src]
&self,
path: P,
slice_rank: u16
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
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 read_file_pair<P, Q>(
&self,
hdr_path: P,
vol_path: Q
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
Q: AsRef<Path>,
[src]
&self,
hdr_path: P,
vol_path: Q
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
Q: AsRef<Path>,
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, ReaderStreamedOptions}; let obj = ReaderStreamedOptions::new().read_file_pair("abc.hdr", "abc.img.gz")?; let volume = obj.into_volume(); for slice in volume { let slice = slice?; // manipulate slice here }
pub fn read_file_pair_rank<P, Q>(
&self,
hdr_path: P,
vol_path: Q,
slice_rank: u16
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
Q: AsRef<Path>,
[src]
&self,
hdr_path: P,
vol_path: Q,
slice_rank: u16
) -> Result<StreamedNiftiObject<MaybeGzDecodedFile>> where
P: AsRef<Path>,
Q: AsRef<Path>,
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.
Trait Implementations
impl Clone for ReaderStreamedOptions
[src]
pub fn clone(&self) -> ReaderStreamedOptions
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ReaderStreamedOptions
[src]
impl PartialEq<ReaderStreamedOptions> for ReaderStreamedOptions
[src]
pub fn eq(&self, other: &ReaderStreamedOptions) -> bool
[src]
pub fn ne(&self, other: &ReaderStreamedOptions) -> bool
[src]
impl StructuralPartialEq for ReaderStreamedOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for ReaderStreamedOptions
[src]
impl Send for ReaderStreamedOptions
[src]
impl Sync for ReaderStreamedOptions
[src]
impl Unpin for ReaderStreamedOptions
[src]
impl UnwindSafe for ReaderStreamedOptions
[src]
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>,