BUG: Fix memory leak in ImageToTubeRigidMetric