Skip to content

Commit

Permalink
added a check for a class
Browse files Browse the repository at this point in the history
  • Loading branch information
cinarturhan committed Dec 6, 2024
1 parent 5d02563 commit 597db58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dpm_tools/visualization/_plot_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)) == "<class 'dpm_tools.io.read_data.Image'>":
data = deepcopy(data.scalar)
elif inspect.isclass(data):
data = deepcopy(data.image)
else:
data = deepcopy(data)

Expand Down

0 comments on commit 597db58

Please sign in to comment.