fn apply_a( x: &[f64], bg_mask: &[f64], d_kernel: &[f64], brain_mask: &[f64], nx: usize, ny: usize, nz: usize, ) -> Vec<f64>
Apply A = W * D * M_bg