pub fn export_current_view(
inst: &Instance,
raw: &RawImage,
window: (f64, f64),
invert: bool,
annotations: &[Annotation],
burn_annotations: bool,
out_path: &Path,
modality: &str,
) -> Result<()>Expand description
Export the active cell’s image to a PNG, optionally with annotations burned in.
§Arguments
inst— instance metadata (needed for pixel spacing on length labels).raw— pre-decoded pixel buffer.window—(center, width)to apply.invert— user-invert toggle (XOR’d withraw.photometric_invert).annotations— list to draw on top of the image.burn_annotations— whentrue, draw the annotations; whenfalsewrite a clean image.out_path— destination PNG path.modality— used by ROI labels to decide whether to suffixHU.
§Errors
PNG write failures.