#[non_exhaustive]pub struct Dataset {
pub id: DatasetId,
pub scenes: Vec<Scene>,
pub associated_images: HashMap<String, AssociatedImage>,
pub properties: Properties,
pub icc_profiles: HashMap<IccProfileKey, Vec<u8>>,
pub source_icc_profiles: Vec<SourceIccProfile>,
}Expand description
A whole-slide image file (or set of files for DICOM).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: DatasetId§scenes: Vec<Scene>§associated_images: HashMap<String, AssociatedImage>§properties: Properties§icc_profiles: HashMap<IccProfileKey, Vec<u8>>§source_icc_profiles: Vec<SourceIccProfile>Source ICC profiles with provenance and optional source-specific refinements.
Implementations§
Source§impl Dataset
impl Dataset
pub fn new(id: DatasetId, scenes: Vec<Scene>) -> Self
pub fn with_associated_images( self, associated_images: HashMap<String, AssociatedImage>, ) -> Self
pub fn with_properties(self, properties: Properties) -> Self
pub fn with_icc_profiles( self, icc_profiles: HashMap<IccProfileKey, Vec<u8>>, ) -> Self
Sourcepub fn push_source_icc_profile(
&mut self,
profile: SourceIccProfile,
) -> Result<(), SourceIccProfileConflict>
pub fn push_source_icc_profile( &mut self, profile: SourceIccProfile, ) -> Result<(), SourceIccProfileConflict>
Adds a source ICC profile and keeps legacy ICC metadata in sync.
Profiles with no optical_path and no channel are unqualified
scene/series profiles, so their bytes are also written to
Dataset::icc_profiles. Qualified profiles are appended only to
Dataset::source_icc_profiles.
If an unqualified profile would overwrite different existing legacy
bytes for the same typed IccProfileKey, this returns
SourceIccProfileConflict and leaves both ICC collections unchanged.
Identical unqualified bytes are accepted because they do not create
legacy-map ambiguity.
Sourcepub fn source_icc_profiles_for_series(
&self,
scene: impl Into<SceneId>,
series: impl Into<SeriesId>,
) -> impl Iterator<Item = &SourceIccProfile>
pub fn source_icc_profiles_for_series( &self, scene: impl Into<SceneId>, series: impl Into<SeriesId>, ) -> impl Iterator<Item = &SourceIccProfile>
Iterates over source ICC profiles for a normalized scene/series pair.
Matching is limited to the scene and series fields. Optional
optical_path and channel refinements remain available on each
returned SourceIccProfile.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dataset
impl RefUnwindSafe for Dataset
impl Send for Dataset
impl Sync for Dataset
impl Unpin for Dataset
impl UnsafeUnpin for Dataset
impl UnwindSafe for Dataset
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more