pub struct IncrementalVolume { /* private fields */ }Expand description
A volume that can be filled one slice at a time as DICOM frames arrive.
Implementations§
Source§impl IncrementalVolume
impl IncrementalVolume
Sourcepub fn new(geometry: VolumeGeometry) -> Result<Self, IncrementalVolumeError>
pub fn new(geometry: VolumeGeometry) -> Result<Self, IncrementalVolumeError>
Creates an empty preallocated volume with the provided geometry.
Sourcepub fn insert_slice(
&mut self,
z_index: u32,
pixels: &[i16],
) -> Result<(), IncrementalVolumeError>
pub fn insert_slice( &mut self, z_index: u32, pixels: &[i16], ) -> Result<(), IncrementalVolumeError>
Inserts or replaces one slice at z_index.
Sourcepub fn geometry(&self) -> VolumeGeometry
pub fn geometry(&self) -> VolumeGeometry
Returns the preallocated geometry for the volume.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns true when every slice has been inserted.
Sourcepub fn loaded_count(&self) -> usize
pub fn loaded_count(&self) -> usize
Returns the number of inserted slices.
Sourcepub fn loaded_mask(&self) -> &[bool]
pub fn loaded_mask(&self) -> &[bool]
Returns the per-slice loaded mask.
Sourcepub fn loading_progress(&self) -> f64
pub fn loading_progress(&self) -> f64
Returns the loading progress in the range [0.0, 1.0].
Sourcepub fn scalar_range(&self) -> Option<(i16, i16)>
pub fn scalar_range(&self) -> Option<(i16, i16)>
Returns the scalar range across the loaded slices.
Sourcepub fn as_volume(&self) -> Result<Volume<i16>, IncrementalVolumeError>
pub fn as_volume(&self) -> Result<Volume<i16>, IncrementalVolumeError>
Materializes the currently loaded voxels as a typed Volume<i16>.
Sourcepub fn as_dyn_volume(&self) -> Result<DynVolume, IncrementalVolumeError>
pub fn as_dyn_volume(&self) -> Result<DynVolume, IncrementalVolumeError>
Materializes the currently loaded voxels as a type-erased DynVolume.
Trait Implementations§
Source§impl Clone for IncrementalVolume
impl Clone for IncrementalVolume
Source§fn clone(&self) -> IncrementalVolume
fn clone(&self) -> IncrementalVolume
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IncrementalVolume
impl RefUnwindSafe for IncrementalVolume
impl Send for IncrementalVolume
impl Sync for IncrementalVolume
impl Unpin for IncrementalVolume
impl UnsafeUnpin for IncrementalVolume
impl UnwindSafe for IncrementalVolume
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more