#![forbid(unsafe_code)]
#![doc = include_str!("../README.md")]
use std::error::Error as StdError;
use std::path::PathBuf;
mod annotations;
pub mod metadata;
#[cfg(test)]
mod annotation_tests;
#[cfg(test)]
mod linear_measurement_tests;
#[cfg(all(test, feature = "parametric-map"))]
mod parametric_map_tests;
#[cfg(test)]
mod pathology_geojson_tests;
#[cfg(test)]
mod scheme_tests;
#[cfg(test)]
mod test_support;
pub use annotations::*;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("invalid input: {0}")]
InvalidInput(String),
#[error("unsupported input: {0}")]
Unsupported(String),
#[error("I/O error at {path}: {source}")]
Io {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("DICOM read error at {path}: {source}")]
DicomRead {
path: PathBuf,
#[source]
source: Box<dyn StdError + Send + Sync>,
},
#[error("DICOM write error at {path}: {source}")]
DicomWrite {
path: PathBuf,
#[source]
source: Box<dyn StdError + Send + Sync>,
},
}
pub type Result<T> = std::result::Result<T, Error>;