Find the longest straight line between two points on surface of polygon My shape is a slightly concave polygon, and I'd like to know the maximal diameter. I imagine a straight line between two points on the surface of the polygon, such that the line does not pass outside the polygon.

Is there a general algorithm for this? 

In my case I am interested in 2D. My shapes are tumors in medical images. So we can also assume:
1 the centroid is always inside the polygon. 
2 a high vertex density, i.e. the next vertex is always close to the previous one.
I don't have an exact answer for this, as the answer is far from trivial. I would suggest that you have a look into computational geometry as this clearly is a visibility problem - my guess is that a solution already exist. My own idea would be: for each line segment in polygon find the visible parts of the other line segments and then pick the pair of points that are furthest apart. Inspirational link: Wikipedia on 'visibility polygon'.