Skip to main content

kallo_core/
lib.rs

1//! # kallo-core
2//!
3//! The reference implementation of the Kallo film model.
4//!
5//! Phase 0 is deliberately small: a negative emulsion with a characteristic
6//! curve, a development-time dependency, and a paper that the negative is
7//! printed onto. Every quantity is in `f64` and in physical units, so that the
8//! GPU implementation in `kallo-gpu` (later) can be checked against it.
9//!
10//! ## The model
11//!
12//! ```text
13//! linear RGB ──► log10 E ──► negative density ──► print density ──► linear RGB
14//!                              (H&D curve,          (paper curve,
15//!                               development)         auto-balanced)
16//! ```
17//!
18//! ## What is deliberately *not* here yet
19//!
20//! - Spectral quantities beyond the exposure step (dye absorption, illuminants).
21//! - Colour management: the phase-0 model carries no primaries.
22//! - Couplers, grain, halation.
23//!
24//! Those land in later phases.
25
26#![forbid(unsafe_code)]
27
28pub mod color;
29pub mod contact;
30pub mod couplers;
31pub mod curve;
32pub mod densitometer;
33pub mod development;
34pub mod dye;
35pub mod emulsion;
36pub mod filters;
37mod filters_measured;
38pub mod grain;
39pub mod halation;
40pub mod interimage;
41pub mod lut;
42mod measured;
43pub mod meter;
44pub mod model;
45pub mod mtf;
46pub mod pipeline;
47pub mod print;
48pub mod psf;
49pub mod scan;
50pub mod scanner;
51pub mod spectral;
52
53pub use color::{linear_to_srgb, srgb_to_linear};
54pub use contact::print as contact_print;
55pub use contact::{Contact, ContactSpec, LADDER_MINUTES, SheetGeometry};
56pub use couplers::{Couplers, fit_inhibition};
57pub use curve::CharacteristicCurve;
58pub use densitometer::Densitometer;
59pub use development::DevelopmentParams;
60pub use emulsion::{
61    FILM_STOCKS, FilmProcess, FilmStock, PAPER_STOCKS, PaperEmulsion, PaperStock, Provenance,
62    film_stock, paper_stock,
63};
64pub use grain::GrainField;
65pub use halation::{Halation, Halo};
66pub use interimage::InterImage;
67pub use lut::ExposureLut;
68pub use meter::Metering;
69pub use model::{ExposureModel, PrintModel, ScanModel, SpectralModel};
70pub use mtf::EmulsionBlur;
71pub use pipeline::{
72    Finishing, PreparedRender, RenderParams, ScalarModel, render_pixels, render_pixels_finished,
73    render_pixels_with_grain,
74};
75pub use print::{Masking, PrintContext};
76pub use scan::ScanContext;
77pub use scanner::Scanner;
78pub use spectral::{CameraProfile, SpectralContext};