nD variational restoration of curvilinear structures with directional regularization