How to implement CPR (curved planar reconstruction) from centerline?

The module is already completely generic, so it can straighten snakes just as well as vessels. It would be great if you could post a few examples.

Here is one snake from MorphoSource straightened:

if the specimen touches itself then you need to apply masking and sharp breaks and wrinkles due to squeezing into a container cannot be fully compensated for, but it works quite well.