pub enum ComplexMetricError {
ShapeMismatch {
reference: (usize, usize),
estimate: (usize, usize),
},
MaskShapeMismatch {
actual: (usize, usize),
expected: (usize, usize),
},
EmptyMask,
UnsupportedScalar {
input: &'static str,
},
NonFinite {
input: &'static str,
},
ZeroReferenceNormalization {
metric: &'static str,
},
ZeroEstimateNormalization {
metric: &'static str,
},
DegenerateAlignment {
alignment: ComplexAlignment,
reason: &'static str,
},
}Expand description
Errors returned by explicit-alignment complex-image metrics.
Variants§
ShapeMismatch
Reference and estimate have different (height, width) shapes.
Fields
MaskShapeMismatch
A selection mask does not match the field shape.
EmptyMask
No pixel was selected by the optional mask.
UnsupportedScalar
A generic complex component could not be represented as f64.
NonFinite
An input contains a non-finite real or imaginary component.
ZeroReferenceNormalization
A relative metric has zero reference norm.
ZeroEstimateNormalization
A normalized correlation has zero aligned-estimate norm.
DegenerateAlignment
The selected alignment cannot be fitted to the selected pixels.
Fields
§
alignment: ComplexAlignmentRequested alignment mode.
Trait Implementations§
Source§impl Debug for ComplexMetricError
impl Debug for ComplexMetricError
Source§impl Display for ComplexMetricError
impl Display for ComplexMetricError
Source§impl Error for ComplexMetricError
impl Error for ComplexMetricError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ComplexMetricError
impl PartialEq for ComplexMetricError
Source§fn eq(&self, other: &ComplexMetricError) -> bool
fn eq(&self, other: &ComplexMetricError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ComplexMetricError
Auto Trait Implementations§
impl Freeze for ComplexMetricError
impl RefUnwindSafe for ComplexMetricError
impl Send for ComplexMetricError
impl Sync for ComplexMetricError
impl Unpin for ComplexMetricError
impl UnsafeUnpin for ComplexMetricError
impl UnwindSafe for ComplexMetricError
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> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more