Skip to content

Commit

Permalink
fix: Now using native fury.colormap native generator
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoDell committed Jul 21, 2023
1 parent 93ca6c2 commit bf2b91a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/experimental/viz_points_kde.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit bf2b91a

Please sign in to comment.