Trait nifti::object::NiftiObject

source ·
pub trait NiftiObject {
    type Volume: NiftiVolume;

    // Required methods
    fn header(&self) -> &NiftiHeader;
    fn header_mut(&mut self) -> &mut NiftiHeader;
    fn extensions(&self) -> &ExtensionSequence;
    fn volume(&self) -> &Self::Volume;
    fn into_volume(self) -> Self::Volume;
}
Expand description

Trait type for all possible implementations of owning NIFTI-1 objects. Objects contain a NIFTI header, a volume, and a possibly empty extension sequence.

Required Associated Types§

source

type Volume: NiftiVolume

The concrete type of the volume.

Required Methods§

source

fn header(&self) -> &NiftiHeader

Obtain a reference to the NIFTI header.

source

fn header_mut(&mut self) -> &mut NiftiHeader

Obtain a mutable reference to the NIFTI header.

source

fn extensions(&self) -> &ExtensionSequence

Obtain a reference to the object’s extensions.

source

fn volume(&self) -> &Self::Volume

Obtain a reference to the object’s volume.

source

fn into_volume(self) -> Self::Volume

Move the volume out of the object, discarding the header and extensions.

Implementors§