MCPcopy Create free account
hub / github.com/vispy/vispy / volume

Method volume

vispy/plot/plotwidget.py:394–430  ·  view source on GitHub ↗

Show a 3D volume Parameters ---------- vol : ndarray Volume to render. clim : tuple of two floats | None The contrast limits. The values in the volume are mapped to black and white corresponding to these values. Default maps

(self, vol, clim=None, method='mip', threshold=None,
               cmap='grays', **kwargs)

Source from the content-addressed store, hash-verified

392 return spec
393
394 def volume(self, vol, clim=None, method='mip', threshold=None,
395 cmap='grays', **kwargs):
396 """Show a 3D volume
397
398 Parameters
399 ----------
400 vol : ndarray
401 Volume to render.
402 clim : tuple of two floats | None
403 The contrast limits. The values in the volume are mapped to
404 black and white corresponding to these values. Default maps
405 between min and max.
406 method : {'mip', 'iso', 'translucent', 'additive'}
407 The render style to use. See corresponding docs for details.
408 Default 'mip'.
409 threshold : float
410 The threshold to use for the isosurafce render style. By default
411 the mean of the given volume is used.
412 cmap : str
413 The colormap to use.
414 kwargs : keyword arguments.
415 More args to pass to :class:`~vispy.visuals.volume.Volume`.
416
417 Returns
418 -------
419 volume : instance of Volume
420 The volume visualization.
421
422 See also
423 --------
424 Volume
425 """
426 self._configure_3d()
427 volume = scene.Volume(vol, clim, method, threshold, cmap=cmap, **kwargs)
428 self.view.add(volume)
429 self.view.camera.set_range()
430 return volume
431
432 def surface(self, zdata, **kwargs):
433 """Show a 3D surface plot.

Callers 1

volume_plot.pyFile · 0.80

Calls 3

_configure_3dMethod · 0.95
set_rangeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected