pub struct MCD<R> { /* private fields */ }
Expand description
Represents a imaging mass cytometry (*.mcd) file.
Implementations§
Source§impl MCD<File>
impl MCD<File>
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<MCD<File>>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<MCD<File>>
Open an .mcd file from the specified path.
Sourcepub fn set_location<P: AsRef<Path>>(&mut self, location: P)
pub fn set_location<P: AsRef<Path>>(&mut self, location: P)
Returns the location (path) of the .mcd file
Sourcepub fn with_dcm(self) -> Result<Self>
pub fn with_dcm(self) -> Result<Self>
Use a temporary file for faster access to channel images.
If this file does not already exist, then it is created.
Data is stored in the .mcd file spectrum-wise which means to load a single image, the entire acquired acquisition must be loaded first.
This method creates a temporary file (.dcm) in the same location as the *.mcd file (if it doesn’t already exist) which has the channel
data stored image-wise. If this file is present and loaded, then Mcd
will choose the fastest method to use to return the requested data.
§Errors
If the location is not set either automatically via MCD::from_path
or manually via MCD::set_location
then a MCDError::LocationNotSpecified
will occur.
Source§impl<R> MCD<R>
impl<R> MCD<R>
Sourcepub fn slide(&self, id: u16) -> Option<&Slide<R>>
pub fn slide(&self, id: u16) -> Option<&Slide<R>>
Returns slide with a given ID number, or None
if no such slide exists
Sourcepub fn slides(&self) -> Vec<&Slide<R>>
pub fn slides(&self) -> Vec<&Slide<R>>
Returns a vector of references to slides sorted by ID number. This allocates a new vector on each call.
Sourcepub fn acquisitions(&self) -> Vec<&Acquisition<R>>
pub fn acquisitions(&self) -> Vec<&Acquisition<R>>
Return a vector of references to all acquisitions in the .mcd file (iterates over all slides and all panoramas).
Sourcepub fn acquisition<A: Into<AcquisitionIdentifier>>(
&self,
identifier: A,
) -> Option<&Acquisition<R>>
pub fn acquisition<A: Into<AcquisitionIdentifier>>( &self, identifier: A, ) -> Option<&Acquisition<R>>
Return an acquisition which matches the supplied AcquisitionIdentifier
or None if no match found
Sourcepub fn acquisitions_in(&self, region: &BoundingBox<f64>) -> Vec<&Acquisition<R>>
pub fn acquisitions_in(&self, region: &BoundingBox<f64>) -> Vec<&Acquisition<R>>
Returns a list of acquisitions which are at least partially contained within the specified bounding box.
Sourcepub fn channels(&self) -> Vec<&AcquisitionChannel>
pub fn channels(&self) -> Vec<&AcquisitionChannel>
Returns a vector of all channels present within any acquisition performed on the slide, sorted by channel order number.
Sourcepub fn channels_excluding(
&self,
exclusion_list: Vec<&str>,
) -> Vec<&AcquisitionChannel>
pub fn channels_excluding( &self, exclusion_list: Vec<&str>, ) -> Vec<&AcquisitionChannel>
Returns a vector of all channels, excluding those from the acquisitions with names matching those specified
Sourcepub fn calibration_final(&self, id: u16) -> Option<&CalibrationFinal>
pub fn calibration_final(&self, id: u16) -> Option<&CalibrationFinal>
Returns an instance of CalibrationFinal
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Sourcepub fn calibration_params(&self, id: u16) -> Option<&CalibrationParams>
pub fn calibration_params(&self, id: u16) -> Option<&CalibrationParams>
Returns an instance of CalibrationParams
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Sourcepub fn calibration_channels(&self, id: u16) -> Option<&CalibrationChannel>
pub fn calibration_channels(&self, id: u16) -> Option<&CalibrationChannel>
Returns an instance of CalibrationChannel
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Sourcepub fn calibration(&self, id: u16) -> Option<&Calibration>
pub fn calibration(&self, id: u16) -> Option<&Calibration>
Returns an instance of Calibration
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Sourcepub fn slide_fiducal_marks(&self, id: u16) -> Option<&SlideFiducialMarks>
pub fn slide_fiducal_marks(&self, id: u16) -> Option<&SlideFiducialMarks>
Returns an instance of SlideFiducialMarks
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Sourcepub fn slide_profile(&self, id: u16) -> Option<&SlideProfile>
pub fn slide_profile(&self, id: u16) -> Option<&SlideProfile>
Returns an instance of SlideProfile
with the specified ID, or None if none exists (this is always the case in version 1 of the Schema)
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for MCD<R>
impl<R> RefUnwindSafe for MCD<R>
impl<R> Send for MCD<R>where
R: Send,
impl<R> Sync for MCD<R>where
R: Send,
impl<R> Unpin for MCD<R>
impl<R> UnwindSafe for MCD<R>
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
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.