Session.open#

Session.open(filepath, offset=0, scale=None, sampling_rate=None, persist=True, segmentation=False, **kwargs)[source]#

Load geometries from a file.

Parameters:
filepathstr

Path to the input file.

offsetfloat or array-like, optional

Coordinate offset subtracted from scaled vertices as vertices * scale - offset (default 0).

scalefloat or array-like, optional

Scale factor applied to raw vertices. Defaults to the file’s native sampling rate, which converts voxel-index vertices returned by volume loaders into physical units.

sampling_ratefloat, optional

Override the file’s native sampling rate.

persistbool, optional

When True (default), add geometries to session containers. When False, geometries are only available via @last.

segmentationbool, optional

When True, treat the volume as a segmentation and extract surface meshes via VTK’s FlyingEdges3D.

**kwargs

Additional arguments passed to open_file().

Returns:
list of int

Global indices of the newly added geometries.