mip#

k3d.factory.mip(volume: List | ndarray | Tuple, color_map: List[List[float]] | Dict[str, Any] | ndarray | None = None, opacity_function: List[float] | None = None, color_range: List[float] = None, samples: float = 512.0, gradient_step: float = 0.005, interpolation: bool = True, mask: List | ndarray | Tuple = None, mask_opacities: List | ndarray | Tuple = None, name: str | None = None, group: str | None = None, custom_data: Dict[str, Any] | None = None, compression_level: int = 0, **kwargs: Any) MIP[source]#

See also

Examples#

Render mhd volumetric data#

heart.mhd heart.zraw

import k3d
import numpy as np
import SimpleITK as sitk

im_sitk = sitk.ReadImage('heart.mhd')
img = sitk.GetArrayFromImage(im_sitk)

plt_mip = k3d.mip(img.astype(np.float32))

plot = k3d.plot()
plot += plt_mip
plot.display()