From 597db58dd692185accb6e8a1e9137220ad25f2a2 Mon Sep 17 00:00:00 2001 From: cinarturhan <105860395+cinarturhan@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:05:50 -0600 Subject: [PATCH] added a check for a class --- dpm_tools/visualization/_plot_3d.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dpm_tools/visualization/_plot_3d.py b/dpm_tools/visualization/_plot_3d.py index f36f722..a780a80 100644 --- a/dpm_tools/visualization/_plot_3d.py +++ b/dpm_tools/visualization/_plot_3d.py @@ -6,7 +6,7 @@ from copy import deepcopy import cc3d import scipy.stats - +import inspect def orthogonal_slices(data, fig: pv.DataSet = None, show_slices: list = None, plotter_kwargs: dict = None, mesh_kwargs: dict = None, slider: bool = False) -> pv.Plotter: @@ -520,6 +520,8 @@ def plot_medial_axis(data, fig: pv.Plotter = None, pore_class=0, interactive=Fal data = deepcopy(data.image) elif str(type(data)) == "": data = deepcopy(data.scalar) + elif inspect.isclass(data): + data = deepcopy(data.image) else: data = deepcopy(data)