Frequently asked questions

How do I save multiple meshes/labels to my STL file?

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:

  1. STL_path = "where_do_you_want_to_save_the_STL_files"
  2. list_of_meshes = ["root"]
  3. while len(list_of_meshes):
  4. label = list_of_meshes.pop(0)
  5. if gvxr.getNumberOfPrimitives(label):
  6. gvxr.saveSTLfile(label, os.path.join(STL_path, label + ."stl")
  7. for i in range(gvxr.getNumberOfChildren(label)):
  8. list_of_meshes.append(gvxr.getChildLabel(label, i))

How do I the number of photons for each pixel of the detector (after going through the object)?

It is possible to compute the number of photons for each pixel instead of integrating the energy.


        TBA