[][src]Trait nifti::volume::RandomAccessNiftiVolume

pub trait RandomAccessNiftiVolume: NiftiVolume {
    fn get_f64(&self, coords: &[u16]) -> Result<f64>;

    fn get_f32(&self, coords: &[u16]) -> Result<f32> { ... }
fn get_u8(&self, coords: &[u16]) -> Result<u8> { ... }
fn get_i8(&self, coords: &[u16]) -> Result<i8> { ... }
fn get_u16(&self, coords: &[u16]) -> Result<u16> { ... }
fn get_i16(&self, coords: &[u16]) -> Result<i16> { ... }
fn get_u32(&self, coords: &[u16]) -> Result<u32> { ... }
fn get_i32(&self, coords: &[u16]) -> Result<i32> { ... }
fn get_u64(&self, coords: &[u16]) -> Result<u64> { ... }
fn get_i64(&self, coords: &[u16]) -> Result<i64> { ... } }

Public API for a NIFTI volume with full random access to data.

This API is currently experimental and will likely be subjected to various changes and additions in future versions.

Required methods

fn get_f64(&self, coords: &[u16]) -> Result<f64>

Fetch a single voxel's value in the given voxel index coordinates as a double precision floating point value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.
Loading content...

Provided methods

fn get_f32(&self, coords: &[u16]) -> Result<f32>

Fetch a single voxel's value in the given voxel index coordinates as a single precision floating point value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_u8(&self, coords: &[u16]) -> Result<u8>

Fetch a single voxel's value in the given voxel index coordinates as an unsigned 8-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_i8(&self, coords: &[u16]) -> Result<i8>

Fetch a single voxel's value in the given voxel index coordinates as a signed 8-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_u16(&self, coords: &[u16]) -> Result<u16>

Fetch a single voxel's value in the given voxel index coordinates as an unsigned 16-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_i16(&self, coords: &[u16]) -> Result<i16>

Fetch a single voxel's value in the given voxel index coordinates as a signed 16-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_u32(&self, coords: &[u16]) -> Result<u32>

Fetch a single voxel's value in the given voxel index coordinates as an unsigned 32-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_i32(&self, coords: &[u16]) -> Result<i32>

Fetch a single voxel's value in the given voxel index coordinates as a signed 32-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_u64(&self, coords: &[u16]) -> Result<u64>

Fetch a single voxel's value in the given voxel index coordinates as an unsigned 64-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.

fn get_i64(&self, coords: &[u16]) -> Result<i64>

Fetch a single voxel's value in the given voxel index coordinates as a signed 64-bit value. All necessary conversions and transformations are made when reading the voxel, including scaling. Note that using this function continuously to traverse the volume is inefficient. Prefer using iterators or the ndarray API for volume traversal.

Errors

  • NiftiError::OutOfBounds if the given coordinates surpass this volume's boundaries.
Loading content...

Implementors

impl RandomAccessNiftiVolume for InMemNiftiVolume[src]

impl<'a> RandomAccessNiftiVolume for &'a InMemNiftiVolume[src]

impl<V> RandomAccessNiftiVolume for SliceView<V> where
    V: RandomAccessNiftiVolume
[src]

Loading content...