struct Preprocessed {
data: Vec<f32>,
dims: [usize; 3],
aligned_dims: [usize; 3],
origin: [isize; 3],
valid: [(usize, usize); 3],
perm: [usize; 3],
flip: [bool; 3],
source_dims: [usize; 3],
res: f64,
out_dims: (usize, usize, usize),
resampled: bool,
}Expand description
The network input plus everything needed to map predictions back onto the caller’s grid.
Fields§
§data: Vec<f32>Normalised network input in RAS orientation, C-order [d0, d1, d2]: the padded volume,
or the head’s box in it.
dims: [usize; 3]§aligned_dims: [usize; 3]Shape of the RAS-aligned volume before cropping and padding.
origin: [isize; 3]Where the network grid’s first voxel sits in the RAS-aligned volume, per axis (negative where the grid starts in padding).
valid: [(usize, usize); 3]The network-grid range that holds aligned data, [start, end) per axis: inside the
padding, and inside any crop.
perm: [usize; 3]perm[i] is the pre-alignment axis that became RAS axis i.
flip: [bool; 3]Whether RAS axis i was flipped during alignment.
source_dims: [usize; 3]Shape of the volume the alignment consumed (post-resampling, pre-alignment).
res: f64Resolution the network saw, mm.
out_dims: (usize, usize, usize)The caller’s grid, for mapping the result back.
resampled: boolWhether a resample to 1 mm happened (the label map is returned on the caller’s grid either way).
Auto Trait Implementations§
impl Freeze for Preprocessed
impl RefUnwindSafe for Preprocessed
impl Send for Preprocessed
impl Sync for Preprocessed
impl Unpin for Preprocessed
impl UnsafeUnpin for Preprocessed
impl UnwindSafe for Preprocessed
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
§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>
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>
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)
&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)
&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
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> ⓘ
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> ⓘ
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