Problem getting get size measurements

Problem getting get size measurements

I'm trying to get simple size measurements on a FIB cross-section feature. In this case, I want the max width of the top feature, and both the min and max width of the bottom feature. Sometimes it works, as shown below, but sometimes the roughness between the two features messes up the line measurement. If there were some directional averaging/smoothing/smearing (e.g. just in X direction) I think this could easily be achieved. I can think of a kludge where I take the image and segment it multiple times after a set of translations, and then use Math, but surely there's a better way. Thanks in advance! --Martin

good 
bad