volume

Contents

load_labelled_volume [#9]

Check the source code online
1
def load_labelled_volume(data, vmin=0, alpha=1, **kwargs):
Copied!
  docstring:
1
Load volume image from .nrrd file.
2
3
It assume that voxels with value = 0 are empty while voxels with
4
values > 0
5
6
are labelles (e.g. to indicate the location of a brain region in a
7
reference atlas)
8
9
:param data: str, path to file with volume data or 3d numpy array
10
11
:param vmin: float, values below this numner will be assigned an
12
alpha=0 and not be visualized
13
14
:param **kwargs: kwargs to pass to the Volume class from vedo
15
16
:param alpha: float in range [0, 1], transparency [for the part of
17
volume with value > vmin]
Copied!

extract_volume_surface [#40]

Check the source code online
1
def extract_volume_surface(vol, threshold=0.1, smooth=False):
Copied!
  docstring:
1
Returns a vedo mesh actor with just the outer surface of a volume
2
3
:param vol: instance of Volume class from vedo
4
5
:param threshold: float, min value to threshold the volume for
6
isosurface extraction
7
8
:param smooth: bool, if True the surface mesh is smoothed
Copied!

extract_label_mesh [#62]

Check the source code online
1
def extract_label_mesh(vol, lbl):
Copied!
  docstring:
1
Given a vedo Volume with a scalar value labelling each voxel,
2
3
this function returns a mesh of only the voxels whose value matches
4
the lbl argument
5
6
:param vol: a vedo Volume
7
8
:param lbl: float or int
Copied!
Last modified 1yr ago