Skip to main content

Opcode

Enum Opcode 

Source
pub enum Opcode {
Show 14 variants WarpRectilinear { planes: Vec<([f64; 4], [f64; 2])>, cx: f64, cy: f64, }, WarpFisheye, FixVignetteRadial { k: [f64; 5], cx: f64, cy: f64, }, FixBadPixelsConstant { constant: u32, bayer_phase: u32, }, FixBadPixelsList { bayer_phase: u32, points: Vec<(u32, u32)>, rects: Vec<(u32, u32, u32, u32)>, }, TrimBounds { top: u32, left: u32, bottom: u32, right: u32, }, MapTable { region: Region, table: Vec<u16>, }, MapPolynomial { region: Region, coeffs: Vec<f64>, }, GainMap { region: Region, points_v: u32, points_h: u32, spacing_v: f64, spacing_h: f64, origin_v: f64, origin_h: f64, map_planes: u32, gains: Vec<f32>, }, DeltaPerRow { region: Region, deltas: Vec<f32>, }, DeltaPerColumn { region: Region, deltas: Vec<f32>, }, ScalePerRow { region: Region, scales: Vec<f32>, }, ScalePerColumn { region: Region, scales: Vec<f32>, }, Other { id: u32, optional: bool, },
}
Expand description

A parsed opcode.

Variants§

§

WarpRectilinear

Lens distortion / lateral CA model (DNG 1.3 §6.2): per plane radial kr[0..4] and tangential kt[0..2] coefficients around the optical centre (cx, cy) (relative image coordinates). Reported, never applied.

Fields

§planes: Vec<([f64; 4], [f64; 2])>
§cx: f64
§cy: f64
§

WarpFisheye

§

FixVignetteRadial

Radial gain 1 + k0 r^2 + k1 r^4 + ... + k4 r^10 around (cx, cy) (relative image coordinates), r normalised to 1 at the farthest image corner.

Fields

§k: [f64; 5]
§cx: f64
§cy: f64
§

FixBadPixelsConstant

Fields

§constant: u32
§bayer_phase: u32
§

FixBadPixelsList

Fields

§bayer_phase: u32
§points: Vec<(u32, u32)>
§rects: Vec<(u32, u32, u32, u32)>
§

TrimBounds

Fields

§top: u32
§left: u32
§bottom: u32
§right: u32
§

MapTable

Fields

§region: Region
§table: Vec<u16>
§

MapPolynomial

Fields

§region: Region
§coeffs: Vec<f64>
§

GainMap

Fields

§region: Region
§points_v: u32
§points_h: u32
§spacing_v: f64
§spacing_h: f64
§origin_v: f64
§origin_h: f64
§map_planes: u32
§gains: Vec<f32>
§

DeltaPerRow

Fields

§region: Region
§deltas: Vec<f32>
§

DeltaPerColumn

Fields

§region: Region
§deltas: Vec<f32>
§

ScalePerRow

Fields

§region: Region
§scales: Vec<f32>
§

ScalePerColumn

Fields

§region: Region
§scales: Vec<f32>
§

Other

Unknown or unsupported opcode (id, flags); optional ones may be skipped.

Fields

§id: u32
§optional: bool

Implementations§

Source§

impl Opcode

Source

pub fn name(&self) -> &'static str

Source

pub fn is_row_local(&self) -> bool

Whether apply computes each sample of this opcode from that sample and its coordinates alone (no neighbours): such opcodes give the same result applied to any window of rows (e.g. band by band) as applied to the whole image. True for everything except the bad-pixel repairs.

Source

pub fn is_pixel_opcode(&self) -> bool

Whether apply implements this opcode.

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Opcode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Opcode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.