Implemented working 3d distance transform. Modified to fold thrid dimension. Wrote blob fill code based on Scott's algorithm, still debugging.