From bf2b91afe1269a46d3c671e67e08f5a3f05eb12d Mon Sep 17 00:00:00 2001 From: Joao Victor Dell Agli Date: Fri, 21 Jul 2023 15:19:18 -0300 Subject: [PATCH] fix: Now using native fury.colormap native generator --- docs/experimental/viz_points_kde.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/experimental/viz_points_kde.py b/docs/experimental/viz_points_kde.py index 7ba111ca9..fb669f622 100644 --- a/docs/experimental/viz_points_kde.py +++ b/docs/experimental/viz_points_kde.py @@ -1,7 +1,7 @@ -from matplotlib import colormaps import numpy as np from fury import actor, window +from fury.colormap import create_colormap from fury.lib import Texture, WindowToImageFilter from fury.shaders import shader_apply_effects from fury.utils import rgb_to_vtk @@ -257,9 +257,7 @@ def normalize(array : np.array, min : float = 0.0, max : float = 1.0): textured_billboard = actor.billboard(np.array([[0.0, 0.0, 0.0]]), (1.0, 1.0, 1.0), scales=3.0, fs_dec=tex_dec, fs_impl=tex_impl) -cmap = colormaps["viridis"] -cmap = np.array([cmap(i) for i in np.arange(0.0, 1.0, 1/256)]) - +cmap = create_colormap(np.arange(0.0, 1.0, 1/256), "viridis") colormap_to_texture(cmap, "colormapTexture", textured_billboard)