Simplifying morphological representations of 2D and 3D scalar fields