1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//! Image transformation operations for medical imaging.
//!
//! This module provides high-performance transforms commonly used in medical image
//! processing and deep learning pipelines. All transforms operate on [`NiftiImage`]
//! and return new images (immutable design).
//!
//! # Categories
//!
//! ## Resampling
//! - [`resample_to_spacing`] - Resample to target voxel spacing
//! - [`resample_to_shape`] - Resample to target dimensions
//!
//! ## Orientation
//! - [`reorient`] - Reorient to standard orientation (RAS, LPS, etc.)
//! - [`orientation_from_affine`] - Detect orientation from affine matrix
//!
//! ## Intensity
//! - [`z_normalization`] - Zero mean, unit variance normalization
//! - [`rescale_intensity`] - Scale to [min, max] range
//! - [`clamp`] - Clamp values to range
//!
//! ## Spatial
//! - [`crop_or_pad`] - Crop or pad to target shape (centered)
//! - [`flip`] - Flip along specified axes
//!
//! ## Random Augmentation
//! - [`random_flip`] - Probabilistic axis flipping
//! - [`random_gaussian_noise`] - Additive Gaussian noise
//! - [`random_intensity_scale`] - Random intensity scaling
//! - [`random_intensity_shift`] - Random intensity offset
//! - [`random_rotate_90`] - Random 90-degree rotations
//! - [`random_gamma`] - Random gamma correction
//! - [`random_augment`] - Combined augmentation pipeline
//!
//! ## Crop-First Loading
//! - [`CropRegion`] - Region specification for crop operations
//! - [`compute_label_aware_crop_regions`] - MONAI-style positive/negative sampling
//! - [`compute_random_spatial_crop_regions`] - Random spatial crops
//! - [`compute_center_crop_regions`] - Center crop computation
//!
//! # Example
//!
//! ```ignore
//! use medrs::transforms::{resample_to_spacing, z_normalization, Interpolation};
//!
//! let img = medrs::load("brain.nii.gz")?;
//! let resampled = resample_to_spacing(&img, [1.0, 1.0, 1.0], Interpolation::Trilinear);
//! let normalized = z_normalization(&resampled);
//! ```
//!
//! [`NiftiImage`]: crate::nifti::NiftiImage
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;