Skip to main content

PreviewRequest

Struct PreviewRequest 

Source
#[non_exhaustive]
pub struct PreviewRequest {
Show 33 fields pub image: Option<u32>, pub select: Vec<String>, pub mip: Option<Axis>, pub view: Option<View>, pub sum: Option<Axis>, pub fft: bool, pub composite: bool, pub level: Option<u32>, pub region: Option<Region>, pub max_size: u32, pub contrast: Contrast, pub lut: Option<Lut>, pub trace: Option<u32>, pub sweep: Option<u32>, pub channels: Vec<u32>, pub x_range: Option<[f64; 2]>, pub run: Option<u32>, pub spectrum: Option<u64>, pub scan: Option<u64>, pub centroid: bool, pub table: Option<u32>, pub columns: Vec<String>, pub marks: Marks, pub objects: Option<ObjectsRequest>, pub lanes: Option<LanesRequest>, pub annotations: Vec<Annotation>, pub dark: bool, pub axes: bool, pub grid: bool, pub figure: bool, pub title: Option<String>, pub caption: Option<String>, pub max_read_bytes: Option<u64>,
}
Expand description

What to render. Default previews image 0 (middle z, t 0, channel 0) at 1024 px.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§image: Option<u32>

Image index (default 0).

§select: Vec<String>

Plane selection (c=1, z=3, t=0, or a combined c=0,1,z=2); see split_select.

§mip: Option<Axis>

Maximum-intensity projection axis.

§view: Option<View>

Which plane of a volume to show (default: the stored planes, or for medical images the anatomical plane they were acquired in, oriented the radiology way).

§sum: Option<Axis>

Sum projection axis (the frames of a movie added up: its dose image).

§fft: bool

Image preview: a power-spectrum (FFT) inset in the top-right corner.

§composite: bool

Blend all (or the selected) channels additively in their colours.

§level: Option<u32>

Pyramid level (default: the level nearest max_size).

§region: Option<Region>

Only this rectangle of the image: in the pixel coordinates of level when a level is given, else in full-resolution (level 0) coordinates, and the level is then chosen so that the region renders at about max_size.

§max_size: u32

Longest side of the output in pixels.

§contrast: Contrast

How sample values map to brightness.

§lut: Option<Lut>

Default: gray for one channel, channel-color for composites.

§trace: Option<u32>

Trace preview: trace index (default 0).

§sweep: Option<u32>

Trace preview: sweep (default 0).

§channels: Vec<u32>

Trace preview: channel indices (default: the first 8).

§x_range: Option<[f64; 2]>

Trace preview: only this window of the x axis, [a, b] in its units (bp of a sized electropherogram, base positions of a Sanger read, minutes, ppm, …).

§run: Option<u32>

Spectrum preview: run index (default 0).

§spectrum: Option<u64>

Spectrum preview: zero-based spectrum index (default 0).

§scan: Option<u64>

Spectrum preview: instrument scan number instead of an index.

§centroid: bool

Spectrum preview: the instrument’s centroid list instead of the profile.

§table: Option<u32>

Plate or event preview: table index (default 0).

§columns: Vec<String>

Table columns to draw: a plate’s value column (long layout; default the first that is not a position), or the x and y parameters of an event preview (one gives a histogram; default FSC-A and SSC-A, else the first two).

§marks: Marks

Marks drawn from the data (peak labels, action potentials, objects).

§objects: Option<ObjectsRequest>

Image preview: how objects are found for marks: objects (setting it implies them).

§lanes: Option<LanesRequest>

Image preview: how lanes are found for marks: lanes (setting it implies them).

§annotations: Vec<Annotation>

The caller’s own marks, drawn on top.

§dark: bool

Draw in the dark theme (light ink on a dark ground).

§axes: bool

Image preview: frame the picture with coordinate rulers (full-resolution pixels) and a scale bar (default true); false gives the bare downsampled plane. max_size bounds the whole picture, rulers included.

§grid: bool

Image preview: faint grid lines over the data at the ruler ticks (default false; only with axes).

§figure: bool

Image preview: frame the picture as a figure for people instead of with rulers: a scale bar under it, and title and caption (default false; only with axes).

§title: Option<String>

Image preview: a title above the picture (drawn with figure).

§caption: Option<String>

Image preview: a caption under the picture (drawn with figure).

§max_read_bytes: Option<u64>

Image preview: refuse (an unsupported error) to read more than this many bytes of decoded pixels in total, so a quick look never decodes a huge plane.

Trait Implementations§

Source§

impl Clone for PreviewRequest

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 PreviewRequest

Source§

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

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

impl Default for PreviewRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> ErasedDestructor for T
where T: 'static,

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.