fn sample_intensity( data: &[f64], nx: usize, ny: usize, nz: usize, x: f64, y: f64, z: f64, ) -> f64
Trilinear interpolation