Make a density plot from a file where the data makes a shape with a hole in it

I have a .dat file and I want to make preferably a density (or surface) plot with it.

ListDensityPlot[f, ColorFunction -> "Rainbow", Axes -> False,   Background -> Black,   PlotLegends ->    Placed[BarLegend[Automatic, LegendMargins -> {{0, 0}, {10, 6}},      LegendMarkerSize -> {15, 300}, LegendLabel -> "F"], After] ,   AspectRatio -> 0.5,  PlotRange -> All] 

The data has the shape of a not perfectly round donut seen from above, so there’s a hole inside and the density and surface plot commands apply the color of the ColorFunction as if it’s 0 to the part in the center that corresponds to the hole. Is there a way that the part in the middle doesn’t get colored? Or can I assign specifically black to the values that are "0" (but where in reality there’s not data) and still use the Color Function?