Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//! Error types for image registration operations.
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors that can occur during image registration.
|
||||
#[derive(Error, Debug)]
|
||||
pub enum RegistrationError {
|
||||
/// I/O error during file operations.
|
||||
#[error("I/O error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
/// Invalid input data.
|
||||
#[error("Invalid input: {0}")]
|
||||
InvalidInput(String),
|
||||
|
||||
/// Registration failed to converge.
|
||||
#[error("Registration failed: {0}")]
|
||||
ConvergenceFailed(String),
|
||||
|
||||
/// Transform error.
|
||||
#[error("Transform error: {0}")]
|
||||
TransformError(String),
|
||||
|
||||
/// Medical I/O error.
|
||||
#[error("Medical I/O error: {0}")]
|
||||
MedicalIo(#[from] rtx_medical_io::MedicalIoError),
|
||||
}
|
||||
|
||||
/// Result type for registration operations.
|
||||
pub type Result<T> = std::result::Result<T, RegistrationError>;
|
||||
Reference in New Issue
Block a user