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

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> { ... } }
Expand description

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

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.

Provided methods

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.

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.

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.

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.

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.

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.

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.

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.

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.

Implementors