Dynamic shape detection and analysis of deformable structures in biomedical imaging