pub struct CropBox {
pub origin: (isize, isize, isize),
pub dims: (usize, usize, usize),
pub full_dims: (usize, usize, usize),
}Expand description
A box within a larger grid: where reconstruction actually happens.
Fields§
§origin: (isize, isize, isize)Index of the box’s first voxel in the full grid. May be negative, which means the box extends past the edge and those voxels are padding rather than data.
dims: (usize, usize, usize)Size of the box.
full_dims: (usize, usize, usize)Size of the grid the box sits in.
Implementations§
Source§impl CropBox
impl CropBox
Sourcepub fn full(full_dims: (usize, usize, usize)) -> Self
pub fn full(full_dims: (usize, usize, usize)) -> Self
A box covering the whole grid — cropping is then a no-op.
Sourcepub fn pads(&self) -> bool
pub fn pads(&self) -> bool
Whether any axis reaches outside the grid, i.e. whether this box pads.
pub fn voxels(&self) -> usize
pub fn full_voxels(&self) -> usize
Trait Implementations§
impl Copy for CropBox
impl Eq for CropBox
impl StructuralPartialEq for CropBox
Auto Trait Implementations§
impl Freeze for CropBox
impl RefUnwindSafe for CropBox
impl Send for CropBox
impl Sync for CropBox
impl Unpin for CropBox
impl UnsafeUnpin for CropBox
impl UnwindSafe for CropBox
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
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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