tomo3D.viewers.viewer_triangulations module

class tomo3D.viewers.viewer_triangulations.TriangulationPlot(meshes, clouds=None, extNormals_List=None, extNormals_coords=None)[source]

Bases: object

Class to visualize triangulation(s) and/or point cloud(s) with their associated normals Input paramters:

  • meshes (Mandatory): List containing the pyvista triangulations to be shown by the viewer
  • clouds (Optional): List containing the original point clouds associated to the triangulations.
    This parameter is useful to compare the coordinates adjusted to the mesh and the original ones
-extNormals (Optional): List containing the original normals associated to each vertex in the
Delaunay triangulation. In general, this parameter is used to compare the normals computed inside Scipion (Pyvista normals stored in the meshes objects) and those normals obtained with other software (PySeg, Dynamo…)
import TriangulationPlot plt = TriangulationPlot([mesh], clouds=[cloud], extNormals=[extNormal]) plt.initializePlot()
tomo3D.viewers.viewer_triangulations.guiThread(classObj, methodName, *args, **kwargs)[source]

Create a new process to prevent the exec_ loop of the GUI from blocking the main thread. In order to work, the GUI classes must be instantiated withing the process.

tomo3D.viewers.viewer_triangulations.instantiateClass(classObj, methodName, *args, **kwargs)[source]
Create an instance of any class and call a visualization method (or any other method).
  • classObj (class): Class to be instantiated
  • methodName (string): Method from the class to be called after the instantiation
  • *args (list): extra argument needed to call the class method
  • **kwargs (dict): arguments to be passed to the contructor of the class
tomo3D.viewers.viewer_triangulations.runMethod(instance, methodName, *args)[source]
Execute a method from an instantiated class:
  • instance (obj): object instantiated from a given class
  • methodName (string): method belonging to instance to be called
  • *args (list): extra arguments needed by the method