miblab-plot 0.0.5__tar.gz → 0.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {miblab_plot-0.0.5/src/miblab_plot.egg-info → miblab_plot-0.0.7}/PKG-INFO +1 -1
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/pyproject.toml +1 -1
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/gui.py +1 -1
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/pvplot.py +14 -16
- {miblab_plot-0.0.5 → miblab_plot-0.0.7/src/miblab_plot.egg-info}/PKG-INFO +1 -1
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/LICENSE +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/README.md +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/setup.cfg +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/__init__.py +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/image_3d.py +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/movie.py +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot/mp4.py +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot.egg-info/SOURCES.txt +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot.egg-info/dependency_links.txt +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot.egg-info/requires.txt +0 -0
- {miblab_plot-0.0.5 → miblab_plot-0.0.7}/src/miblab_plot.egg-info/top_level.txt +0 -0
|
@@ -420,7 +420,7 @@ def display_two_kidneys(kidney1, kidney2,
|
|
|
420
420
|
centroid_1, axes_1 = compute_principal_axes(kidney1, kidney1_voxel_size)
|
|
421
421
|
centroid_2, axes_2 = compute_principal_axes(kidney2, kidney2_voxel_size)
|
|
422
422
|
|
|
423
|
-
plotter = pv.Plotter(window_size=(1000,600), shape=(1,2))
|
|
423
|
+
plotter = pv.Plotter(window_size=(1000,600), shape=(1,2), off_screen=False)
|
|
424
424
|
plotter.background_color = 'white'
|
|
425
425
|
|
|
426
426
|
# Original
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from pathlib import Path
|
|
3
2
|
from typing import Union
|
|
4
|
-
import
|
|
3
|
+
import platform
|
|
5
4
|
|
|
6
5
|
import numpy as np
|
|
7
6
|
from tqdm import tqdm
|
|
@@ -10,25 +9,24 @@ import dbdicom as db
|
|
|
10
9
|
import zarr
|
|
11
10
|
|
|
12
11
|
import miblab_ssa as ssa
|
|
13
|
-
import platform
|
|
14
12
|
|
|
15
13
|
|
|
16
14
|
def setup_rendering_env():
|
|
15
|
+
|
|
16
|
+
# Default is no interactive rendering
|
|
17
|
+
pv.OFF_SCREEN = True
|
|
18
|
+
|
|
17
19
|
current_os = platform.system().lower()
|
|
18
|
-
|
|
19
|
-
is_headless = (os.environ.get("DISPLAY") is None) if current_os == "linux" else False
|
|
20
|
-
|
|
21
|
-
if is_headless:
|
|
22
|
-
try:
|
|
23
|
-
pv.start_xvfb()
|
|
24
|
-
except Exception:
|
|
25
|
-
pass
|
|
26
|
-
|
|
27
|
-
# IMPORTANT: We want to ALLOW off-screen rendering even on Windows
|
|
28
|
-
# So we don't force pv.OFF_SCREEN to be False just because we have a screen.
|
|
29
|
-
pv.OFF_SCREEN = True
|
|
20
|
+
if current_os == "linux":
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
|
|
23
|
+
# 2. Environment variables to bypass X11 requirements
|
|
24
|
+
os.environ['QT_QPA_PLATFORM'] = 'offscreen'
|
|
25
|
+
os.environ['PYVISTA_OFF_SCREEN'] = 'true'
|
|
26
|
+
|
|
27
|
+
print("Linux Cluster: OSMesa/Software rendering enabled.")
|
|
28
|
+
|
|
29
|
+
|
|
32
30
|
|
|
33
31
|
setup_rendering_env()
|
|
34
32
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|