You would use quadruple integrals for the general case.

It's a direct extension of the 3D case but now "volume" has an additional component.

Note that finding integration boundaries for all but the simplest shapes is going to get complicated very quickly.