Energy Minimization Algorithms for Image-Guided Automatic Patch Clamp Systems