Make DataSource a base class for DataSource1D/2D/3D.