A method and apparatus for treating abnormal mucosa in the esophagus is disclosed,such that the depth of the treated tissue is controlled. The depth of ablationis controlled by monitoring the tissue impedance and/or the tissue temperature.A desired ablation depth is also achieved by controlling the energy density orpower density, and the amount of time required for energy delivery. A method andapparatus is disclosed for measuring an inner diameter of a body lumen, wherea balloon is inflated inside the body lumen at a fixed pressure.