Using Python Module to Render an Image in 3D

Here is the link to the GitHub Page:

We are open to any suggestions. We are trying to use a pre-placed seed point and use the local threshold function to segment individual lumbar vertebrae, render it in 3D, and save it as an stl file. Thank you for all of your help.