Acquisition

Struct Acquisition 

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

Acquisition represents a single region analysed by IMC.

Implementations§

Source§

impl<R> Acquisition<R>

Source

pub fn id(&self) -> u16

Returns the ID associated with the acquisition

Source

pub fn description(&self) -> &str

Returns a description of the acquisition

Source

pub fn order_number(&self) -> i16

Returns a number representing the order in which the acquisition was acquired (0 being first).

Source

pub fn width(&self) -> i32

Returns the width of the acquired region (in pixels)

Source

pub fn height(&self) -> i32

Returns the height of the acquired region (in pixels)

Source

pub fn ablation_frequency(&self) -> f64

Returns the ablation frequency

Source

pub fn acquisition_roi_id(&self) -> i16

Returns the region ID for the acquisition

Source

pub fn profiling_type(&self) -> Option<&ProfilingType>

Returns the profiling type for the acquisition, if one is present. This is not present in version 1 of the schema

Source

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

Returns the optical image of the acquisition region prior to ablation

Source

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

Returns the optical image of the acquisition region after ablation

Source

pub fn channels(&self) -> &[AcquisitionChannel]

Returns a list of all channels acquired within this acquisition

Source

pub fn is_complete(&self) -> bool

Returns whether the acquisition has run to completion (checks the size of the recorded data compared to the expected data size)

Source

pub fn pixels_in(&self, region: &BoundingBox<f64>) -> Option<Region>

Returns a Region describing the pixel region contained within the specified bounding box

Source

pub fn in_region(&self, region: &BoundingBox<f64>) -> bool

Tests whether the acquisition is (at least partially) contained within the specified bounding box (slide coordinates).

Source

pub fn spectrum_size(&self) -> usize

Returns the size of a single spectrum in bytes

Source

pub fn num_spectra(&self) -> usize

Returns the number of spectra acquired as part of the acquisition

Source§

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

Source

pub fn channel_image<C: Into<ChannelIdentifier>>( &self, identifier: C, region: Option<Region>, ) -> Result<ChannelImage>

Returns the ChannelImage for the channel matching the ChannelIdentifier. This contains the intensities of the channel for each detected pixel, the number of valid pixels and the width and height of the image.

Source

pub fn channel_images<C: AsRef<ChannelIdentifier>>( &self, identifiers: &[C], region: Option<Region>, ) -> Result<Vec<ChannelImage>>

Returns array of ChannelImages for the channels matching the ChannelIdentifiers. This contains the intensities of the channel for each detected pixel, the number of valid pixels and the width and height of the image.

Source

pub fn channel<C: AsRef<ChannelIdentifier>>( &self, identifier: C, ) -> Option<&AcquisitionChannel>

Returns the channel which matches the given identifier, or None if no match found

Source§

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

Source

pub fn spectra(&self) -> SpectrumIterator<'_, R>

Provides an iterator over all spectra (each pixel) within the acquisition

Source

pub fn spectrum(&self, x: u32, y: u32) -> Result<Vec<f32>>

Returns a spectrum at the specified (x, y) coordinate

Trait Implementations§

Source§

impl<R> Clone for Acquisition<R>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<R: Debug> Debug for Acquisition<R>

Source§

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

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

impl<R> Display for Acquisition<R>

Source§

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

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

impl<R> OnSlide for Acquisition<R>

Source§

fn to_slide_transform(&self) -> AffineTransform<f64>

Returns the affine transformation from pixel coordinates within the acquisition to to the slide coordinates (μm)

Source§

fn slide_bounding_box(&self) -> BoundingBox<f64>

Returns the bounding box encompasing the acquisition area on the slide (in μm)

Source§

impl<R> Print for Acquisition<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 Acquisition<R>

§

impl<R> RefUnwindSafe for Acquisition<R>

§

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

§

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

§

impl<R> Unpin for Acquisition<R>

§

impl<R> UnwindSafe for Acquisition<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> 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> 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> 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> 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.