Detecting, imaging and sizing defects in a bounded elastic medium is still a difficult task, especially when access is complex. Adjoint methods simplify the task as they take advantage of prior information such as the geometry and material properties. However, they still reveal a number of important limitations. Artifacts observed on the conventional topological energy image result from wave interactions with the boundaries of the inspected medium. The paper describes a method for addressing these artifacts, which involves forward and adjoint fields specified in terms of the boundary conditions. Modified topological energies are then defined according to the type of analyzed flaw (open slit or inclusion). Comparison of the numerical results with the experimental data confirms the relevance of the approach.