separate_single_crystal.m code includes 3D volume generation (isosurface), smoothing, reducing the number of triangles in mesh.
You can use this code for your own system. Also, the 3D volume can be saved as .mat format.
You can load mat file and easily generate 3D volume, recon_singlecrystal.m has an example.