Skip to main content

openkspace_recon/
lib.rs

1//! OpenKSpace-Recon: K-space -> image reconstruction math.
2//!
3//! Core pipeline:
4//!   1. (optional) noise pre-whitening      -- `prewhiten`
5//!   2. (optional) navigator phase correction -- `phasecorr`
6//!   3. fftshift -> IFFT -> fftshift           -- `fft` + `shift`
7//!   4. RSS coil combine                     -- `coil`
8//!   5. (optional) centre crop to recon matrix -- `crop`
9//!
10//! Reconstructions are composed behind the [`ReconStrategy`] trait so that
11//! future parallel-imaging / compressed-sensing back-ends can slot in
12//! without touching this crate's public shape.
13//!
14//! # Quick start
15//!
16//! ```rust,no_run
17//! use openkspace_recon::{IfftRss, ReconStrategy};
18//! use openkspace_io::ismrmrd::IsmrmrdFile;
19//!
20//! let file = IsmrmrdFile::open("scan.h5").unwrap();
21//! let mut strategy = IfftRss::default();
22//! strategy.prewhiten = true;
23//! strategy.phase_correct = true;
24//! let volume = strategy.reconstruct(&file).unwrap();
25//! println!("Reconstructed {} slices", volume.data.shape()[0]);
26//! ```
27
28pub mod coil;
29pub mod crop;
30pub mod cs;
31pub mod espirit;
32pub mod fft;
33pub mod grappa;
34pub mod oversampling;
35pub mod partial_fourier;
36pub mod phasecorr;
37pub mod prewhiten;
38pub mod sense;
39pub mod sensitivity;
40pub mod shift;
41pub mod strategy;
42pub mod wavelet;
43
44pub use coil::{rss_combine, rss_combine_4d};
45pub use crop::center_crop_3d;
46pub use cs::{fista_cs_single_coil, CsError};
47pub use espirit::espirit_sensitivity_maps;
48pub use fft::{ifft1_inplace, ifft2_inplace, ifft3_inplace};
49pub use grappa::{GrappaError, GrappaKernel, SamplingPattern};
50pub use oversampling::OversamplingRemover;
51pub use partial_fourier::{homodyne_reconstruct, PartialFourierPlan};
52pub use phasecorr::PhaseCorrector;
53pub use prewhiten::NoisePrewhitener;
54pub use sense::{sense_gfactor_1d, sense_unfold_1d, SenseError};
55pub use sensitivity::walsh_sensitivity_maps;
56pub use shift::{fftshift_axis, ifftshift_axis};
57pub use strategy::{
58    CsRss, FftMode, GrappaRss, IfftRss, ImageVolume, ReconStrategy, SenseMapSource, SenseRss,
59};