iblviewer.objects

Functions

Cross3D

Build a 3D cross shape, mainly useful as a 3D marker.

Classes

Lines

Improved Lines class that supports point sets of varying lengths

Points

Improved Points class that supports time series and screen-space mode

Spheres

Reimplementation of vedo.Spheres that was not handling things properly when it comes to setting time series and to visualising them with colors.

Cross3D(pos=(0, 0, 0), size=1.0, thickness=0.5, color='black', alpha=1, res=4, lines_mode=True)[source]

Build a 3D cross shape, mainly useful as a 3D marker.

Parameters
  • pos – Position of the cross

  • size – Size of the cross

  • thickness – Thickness in pixels (remains constant on screen)

  • color – Color of the cross

  • alpha – Alpha/opacity of the cross

  • res – Resolution of the cylinders if not used in line_mode

  • lines_mode – Whether lines are used or cylinders. The difference is in how they look like when you zoom in on the cross. If you use lines, their thickness is constant on screen, whether close or far. If you use cylinders, they will get thicker the closer you approach the camera (in perspective mode of course)

Returns

vedo.Mesh

class Lines(points, end_points=None, c='gray', alpha=1, lw=1, dotted=False)[source]

Bases: vedo.shapes.Lines

Improved Lines class that supports point sets of varying lengths

class Points(positions, radius=1, values=None, color_map='viridis', screen_space=False, alpha=1, res=6, min_v=None, max_v=None, scalars_prefix=None)[source]

Bases: vedo.pointcloud.Points

Improved Points class that supports time series and screen-space mode

get_number_of_arrays(ignore=['GlyphScale', 'Normals'])[source]
add_scalar_data(polydata, values, step_id=None)[source]

Add scalar data to a VTK polydata

Parameters
  • polydata – vtkPolyData

  • values – Numpy 1D array or list

  • step_id – ID for naming the scalar with Scalars_#ID

Returns

vtkFloatArray

update_data(positions, scalars=None)[source]

Update the positions of points and optionally their scalar values

Parameters

positions – 3D coordinates the same length as the number

of points in the object :param scalars: 1D list or numpy array the same length as positions

class Spheres(centers, r=1, c='r', alpha=1, res=8)[source]

Bases: vedo.mesh.Mesh

Reimplementation of vedo.Spheres that was not handling things properly when it comes to setting time series and to visualising them with colors.

This class isn’t used at the moment. Points is preferred as it acts either as vedo.Spheres or as screen space Points depending on screen_space param.

In general, vedo uses “c” and “r” short variable names which are a hindrance… utils.Spheres is deprecated and you should favor utils.Points instead.