Slide

Struct Slide 

Source
pub struct Slide<R> { /* private fields */ }
Expand description

Represents a slide (contains multiple panoramas) in the *.mcd format

Implementations§

Source§

impl<R: Read + Seek> Slide<R>

Source

pub fn create_overview_image( &self, width: u32, channel_to_show: Option<(&ChannelIdentifier, Option<f32>)>, ) -> Result<RgbaImage, MCDError>

Create an overview image of the slide scaled to the supplied width.

This will scale the slide image to the supplied width, and overlay any panorama images acquired. If an channel_to_show is supplied, then the selected channel (ChannelIdentifier) will be overlayed with the data clipped at the specified maximum value (f32).

Source§

impl<R> Slide<R>

Source

pub fn id(&self) -> u16

Returns the slide ID

Source

pub fn uid(&self) -> Option<&str>

Returns the slide UID

Source

pub fn description(&self) -> &str

Returns the description given to the slide

Source

pub fn width_in_um(&self) -> f64

Returns the width of the slide in μm

Source

pub fn height_in_um(&self) -> f64

Returns the height of the slide in μm

Source

pub fn filename(&self) -> &str

Returns the *.mcd filename

Source

pub fn image_file(&self) -> &str

Returns the name of the image file used as a slide image

Source

pub fn software_version(&self) -> &str

Returns the version of the software used to produce this *.mcd file

Source

pub fn energy_db(&self) -> Option<u32>

Returns the energy in Db

Source

pub fn frequency(&self) -> Option<u32>

Returns the frequency

Source

pub fn fmark_slide_length(&self) -> Option<u64>

Returns the fmark slide length

Source

pub fn fmark_slide_thickness(&self) -> Option<u64>

Returns the fmark slide thickness

Source

pub fn name(&self) -> Option<&str>

Returns the name given to the slide

Source

pub fn image(&self) -> OpticalImage<R>

Returns the image associated with the slide

Source

pub fn panorama_ids(&self) -> Vec<u16>

Returns a vector of panorama ids sorted by ID number. This allocates a new vector on each call.

Source

pub fn panorama(&self, id: u16) -> Option<&Panorama<R>>

Returns panorama with a given ID number, or None if no such panorama exists

Source

pub fn panoramas(&self) -> Vec<&Panorama<R>>

Returns a vector of references to panoramas sorted by ID number. This allocates a new vector on each call.

Trait Implementations§

Source§

impl<R: Debug> Debug for Slide<R>

Source§

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

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

impl<R> Display for Slide<R>

Source§

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

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

impl<R> Print for Slide<R>

Source§

fn print<W: Write + ?Sized>(&self, writer: &mut W, indent: usize) -> Result

Formats and prints to writer

Auto Trait Implementations§

§

impl<R> Freeze for Slide<R>

§

impl<R> RefUnwindSafe for Slide<R>

§

impl<R> Send for Slide<R>
where R: Send,

§

impl<R> Sync for Slide<R>
where R: Send,

§

impl<R> Unpin for Slide<R>

§

impl<R> UnwindSafe for Slide<R>

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.