Type Definition nifti::object::InMemNiftiObject
source · pub type InMemNiftiObject = GenericNiftiObject<InMemNiftiVolume>;
Expand description
A NIfTI object containing an in-memory volume.
Implementations§
source§impl InMemNiftiObject
impl InMemNiftiObject
sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
👎Deprecated since 0.10.0: use read_file
from ReaderOptions
instead
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
read_file
from ReaderOptions
insteadRetrieve 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")?;
sourcepub fn from_file_pair<P, Q>(hdr_path: P, vol_path: Q) -> Result<Self>where
P: AsRef<Path>,
Q: AsRef<Path>,
👎Deprecated since 0.10.0: use read_file_pair
from ReaderOptions
instead
pub fn from_file_pair<P, Q>(hdr_path: P, vol_path: Q) -> Result<Self>where P: AsRef<Path>, Q: AsRef<Path>,
read_file_pair
from ReaderOptions
insteadRetrieve a NIFTI object as separate header and volume files. This method is useful when file names are not conventional for a NIFTI file pair.