It is possible if you have a closed form expression for E(k), including all dimensions involved.
E(k) is your dispersion
relation that connects the discrete "states" (k) to their individual "energies" (E).
You first sum the discrete k-states up to an energy in k-space (which is usually done by converting the sum to an integral, because you are summing over a very large number of states) - then you write the sum in terms of E using your E(k) relation, if it is in closed form, and take the derivative. That's it.
Let me give an example:
In 2D, you switch to polar coordinates and draw a
circle (corresponding to any energy--say E) and you write the total number of states under this circle as a function of k:
where the denominator is the "area" a single state occupies. So total area/ area by a single state gives the total number of states for a
given energy. I am assuming periodic boundary conditions here, i.e, the spacing between the states is 2pi/L.
Then you write N_total as a function of energy, if you you have a parabolic band this will be:
where I assumed:
Note that k is the wave"vector" here. Its components are kx and ky.
Now you know the TOTAL number of states up to any given energy E... If you take the derivative with respect to E, you know the
density of states for a 2D material, which is independent of energy (for a parabolic band).