use crate::Real;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CellRecord {
pub label: i32,
pub centroid: [Real; 2],
pub area: Real,
pub perimeter: Real,
pub shape_index: Real,
pub convexity: Real,
pub elongation: Real,
pub elongation_angle: Real,
pub shape_katic: [Real; 4],
pub internal_katic: [Real; 4],
pub optimal_scale: Real,
pub nuclear_aspect_ratio: Real,
pub nuclear_angle: Real,
pub n_neighbors: usize,
}
impl CellRecord {
pub fn new(label: i32, centroid: [Real; 2]) -> Self {
Self {
label,
centroid,
area: 0.0,
perimeter: 0.0,
shape_index: 0.0,
convexity: 0.0,
elongation: 0.0,
elongation_angle: 0.0,
shape_katic: [0.0; 4],
internal_katic: [0.0; 4],
optimal_scale: 0.0,
nuclear_aspect_ratio: 0.0,
nuclear_angle: 0.0,
n_neighbors: 0,
}
}
}