Skip to content

Commit

Permalink
Deprecation update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Dec 6, 2023
1 parent 35b6fa3 commit 77b9493
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion glue_ar/scatter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pyvista as pv
from glue_ar.utils import layer_color, xyz_for_layer


# For the 3D scatter viewer
def scatter_layer_as_points(viewer_state, layer_state):
xyz = xyz_for_layer(viewer_state, layer_state)
Expand Down Expand Up @@ -34,7 +35,7 @@ def scatter_layer_as_glyphs(viewer_state, layer_state, glyph):

def scatter_layer_as_multiblock(viewer_state, layer_state):
data = xyz_for_layer(viewer_state, layer_state, scaled=True)
spheres = [pv.Sphere(center=p, radius=layer_state.size_scaling * layer_state.size / 600, phi_resolution=10, theta_resolution=10) for p in data]
spheres = [pv.Sphere(center=p, radius=layer_state.size_scaling * layer_state.size / 600, phi_resolution=8, theta_resolution=8) for p in data]
blocks = pv.MultiBlock(spheres)
return {
"data": blocks.extract_geometry(),
Expand Down
5 changes: 3 additions & 2 deletions glue_ar/volume.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from numpy import invert
import pyvista as pv
from scipy.ndimage import filters
from scipy.ndimage import gaussian_filter

from glue.core.subset_group import GroupedSubset
from glue_ar.utils import isomin_for_layer, layer_color


# For the 3D volume viewer
# This is largely lifted from Luca's plugin
def create_meshes(viewer_state, layer_states=None, use_gaussian_filter=False, smoothing_iteration_count=0):
Expand Down Expand Up @@ -68,7 +69,7 @@ def create_meshes(viewer_state, layer_states=None, use_gaussian_filter=False, sm
isomin = item["isomin"]

if use_gaussian_filter:
data = filters.gaussian_filters(data, 1)
data = gaussian_filter(data, 1)

# Conventions between pyvista and glue data storage
data = data.transpose(2, 1, 0)
Expand Down

0 comments on commit 77b9493

Please sign in to comment.