struct QForm {
quatern: [f64; 3],
offset: [f64; 3],
qfac: f64,
}Expand description
NIfTI-1’s quaternion (“qform”) description of a voxel→world transform — method 2 in the spec.
A reader rebuilds the matrix from the quaternion, the voxel sizes in pixdim[1..=3], and
qfac. The quaternion’s scalar part is not stored: it is implied by the other three
components, which is why only b, c, d appear here.
Fields§
§quatern: [f64; 3]quatern_b, quatern_c, quatern_d.
offset: [f64; 3]qoffset_x, qoffset_y, qoffset_z — the affine’s translation, verbatim.
qfac: f64pixdim[0]: -1 for a left-handed (negative determinant) transform, +1 otherwise.
A quaternion only ever describes a rotation, so a mirrored acquisition cannot be expressed
by one. This is how the spec carries the reflection separately: the reader negates the
third column after rotating. 0 is not a legal value, and the spec says to read it as
+1.
Trait Implementations§
impl Copy for QForm
impl StructuralPartialEq for QForm
Auto Trait Implementations§
impl Freeze for QForm
impl RefUnwindSafe for QForm
impl Send for QForm
impl Sync for QForm
impl Unpin for QForm
impl UnsafeUnpin for QForm
impl UnwindSafe for QForm
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> 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>
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