lucem_hist::objects
The objects of an analysis: annotations, detections, cells and tiles, with their measurements.
HistObject
Section titled “HistObject”pub struct HistObjectFields
id: u32kind: ObjectKindroi: Polygon: The outline (a cell’s whole cell).nucleus: Option<Polygon>centroid: Pointclass: Option<String>: Its class (Tumor,CD3: CD8, …).intensity: Option<IntensityClass>measurements: Measurements
Methods
pub fn new(id: u32, kind: ObjectKind, roi: Polygon) -> SelfAn object from its outline (centroid from the outline).
pub fn get(&self, name: &str) -> Option<f64>pub fn full_class(&self) -> Option<String>The class with its intensity, as shown: Tumor: 2+, Positive, Stroma.
pub fn has_class(&self, class: &str) -> boolWhether its class is class or starts with it (CD3 matches CD3: CD8).
Implements Clone, Debug, Deserialize, PartialEq, Serialize.
ObjectKind
Section titled “ObjectKind”pub enum ObjectKindVariants
Annotation: A region drawn or found (tissue, a class region of a pixel classifier).Detection: A detected object without a nucleus / cell split.Cell: A cell: its outline is the cell,nucleusits nucleus.Tile: A tile or superpixel.
Implements Clone, Copy, Debug, Deserialize, Eq, PartialEq, Serialize.
IntensityClass
Section titled “IntensityClass”pub enum IntensityClassThe intensity class of an object (staining strength of one measurement).
Variants
NegativePositive: One threshold: above it.OnePlusTwoPlusThreePlus
Methods
pub fn name(self) -> &'static strpub fn is_positive(self) -> boolImplements Clone, Copy, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, Serialize.
pub type Point = [f64; 2];A point in level-0 pixels.
Polygon
Section titled “Polygon”pub type Polygon = Vec<Point>;A closed outline in level-0 pixels (the last point joins the first).
Measurements
Section titled “Measurements”pub type Measurements = BTreeMap<String, f64>;Measurements by name (Nucleus: Area µm^2, Cell: DAB OD mean, …).