Calculate volume from 3d_plot
Interesting question! I'm assuming you have a bunch of points $(X, Y, Z)$ plotting the lung you want to measure. 
So your question is actually the measure of a convex hull.

Checkout scipy.spatial.ConvexHull. The ConvexHull object has a volumn attribute which indicates the column of the convex hull you want. It supports N dimensions, which your question is about three dimensions.