pymaid.get_volume

pymaid.get_volume(volume_name=None, color=(120, 120, 120, 0.6), combine_vols=False, remote_instance=None)[source]

Retrieves volume (mesh).

Parameters:
  • volume_name (int | str | list of str or int) – Name(s) (as str) or ID (as int) of the volume to import. Names must be EXACT! If volume_name=None, will return list of all available CATMAID volumes. If list of volume names, will return a dictionary {name: Volume, ... }

  • color (tuple, optional) – (R, G, B, alpha) values used by plot3d().

  • combine_vols (bool, optional) – If True and multiple volumes are requested, the will be combined into a single volume.

  • remote_instance (CATMAIDInstance, optional) – If not passed directly, will try using global.

Returns:

If volume_name is list of volumes, returns a dictionary of Volumes: {name1: Volume1, name2: Volume2, ...}

Return type:

navis.Volume

Examples

>>> import pymaid
>>> rm = CatmaidInstance('server_url', 'api_token', 'http_user', 'http_pw')
>>> # Retrieve volume
>>> vol = pymaid.get_volume('LH_R')
>>> # Plot volume
>>> vol.plot3d()