Heterogeneous Modeling of Medical Image Data Using B-Spline Functions