Struct nifti::object::InMemNiftiObject [−][src]
pub struct InMemNiftiObject { /* fields omitted */ }
Data type for a NIFTI object that is fully contained in memory.
Methods
impl InMemNiftiObject
[src]
impl InMemNiftiObject
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<InMemNiftiObject>
[src]
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<InMemNiftiObject>
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::InMemNiftiObject; let obj = InMemNiftiObject::from_file("minimal.nii.gz")?;
pub fn from_file_pair<P, Q>(
hdr_path: P,
vol_path: Q
) -> Result<InMemNiftiObject> where
P: AsRef<Path>,
Q: AsRef<Path>,
[src]
pub fn from_file_pair<P, Q>(
hdr_path: P,
vol_path: Q
) -> Result<InMemNiftiObject> where
P: AsRef<Path>,
Q: AsRef<Path>,
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.
pub fn new_from_stream<R: Read>(&self, source: R) -> Result<InMemNiftiObject>
[src]
pub fn new_from_stream<R: Read>(&self, source: R) -> Result<InMemNiftiObject>
Retrieve a NIFTI object from a stream of data.
Errors
NiftiError::NoVolumeData
if the source only contains (or claims to contain) a header.
Trait Implementations
impl Debug for InMemNiftiObject
[src]
impl Debug for InMemNiftiObject
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for InMemNiftiObject
[src]
impl PartialEq for InMemNiftiObject
fn eq(&self, other: &InMemNiftiObject) -> bool
[src]
fn eq(&self, other: &InMemNiftiObject) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &InMemNiftiObject) -> bool
[src]
fn ne(&self, other: &InMemNiftiObject) -> bool
This method tests for !=
.
impl Clone for InMemNiftiObject
[src]
impl Clone for InMemNiftiObject
fn clone(&self) -> InMemNiftiObject
[src]
fn clone(&self) -> InMemNiftiObject
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl NiftiObject for InMemNiftiObject
[src]
impl NiftiObject for InMemNiftiObject
type Volume = InMemNiftiVolume
The concrete type of the volume.
fn header(&self) -> &NiftiHeader
[src]
fn header(&self) -> &NiftiHeader
Obtain a reference to the NIFTI header.
fn header_mut(&mut self) -> &mut NiftiHeader
[src]
fn header_mut(&mut self) -> &mut NiftiHeader
Obtain a mutable reference to the NIFTI header.
fn extensions(&self) -> &ExtensionSequence
[src]
fn extensions(&self) -> &ExtensionSequence
Obtain a reference to the object's extensions.
fn volume(&self) -> &Self::Volume
[src]
fn volume(&self) -> &Self::Volume
Obtain a reference to the object's volume.
fn into_volume(self) -> Self::Volume
[src]
fn into_volume(self) -> Self::Volume
Move the volume out of the object, discarding the header and extensions. Read more
Auto Trait Implementations
impl Send for InMemNiftiObject
impl Send for InMemNiftiObject
impl Sync for InMemNiftiObject
impl Sync for InMemNiftiObject