-->
It is not possible to save multiple meshes in a single STL file. It is not a limitation of gVXR but one of the STL file format. Each mesh must be store in a separate file. This way they can all have a different label, colour in the 3D visualisution, and material composition. Note that if they all have the same material composition, you could combine them all in the same mesh.
The code below shows how to save all the meshes and use their labels (unique ID) as a base for their file names:
- STL_path = "where_do_you_want_to_save_the_STL_files"
- list_of_meshes = ["root"]
- while len(list_of_meshes):
- label = list_of_meshes.pop(0)
- if gvxr.getNumberOfPrimitives(label):
- gvxr.saveSTLfile(label, os.path.join(STL_path, label + ."stl")
- for i in range(gvxr.getNumberOfChildren(label)):
- list_of_meshes.append(gvxr.getChildLabel(label, i))
It is possible to compute the number of photons for each pixel instead of integrating the energy.
TBA