q3dviewer 1.1.6__tar.gz → 1.1.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.
Files changed (48) hide show
  1. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/PKG-INFO +3 -3
  2. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/README.md +2 -2
  3. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/cloud_item.py +6 -2
  4. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/cloud_vert.glsl +9 -0
  5. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/lidar_cam_calib.py +2 -3
  6. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/viewer.py +4 -1
  7. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/PKG-INFO +3 -3
  8. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/setup.py +1 -1
  9. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/LICENSE +0 -0
  10. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/Qt/__init__.py +0 -0
  11. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/__init__.py +0 -0
  12. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/base_glwidget.py +0 -0
  13. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/base_item.py +0 -0
  14. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/__init__.py +0 -0
  15. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/axis_item.py +0 -0
  16. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/cloud_io_item.py +0 -0
  17. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/frame_item.py +0 -0
  18. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/gaussian_item.py +0 -0
  19. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/grid_item.py +0 -0
  20. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/image_item.py +0 -0
  21. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/line_item.py +0 -0
  22. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/custom_items/text_item.py +0 -0
  23. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/glwidget.py +0 -0
  24. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/cloud_frag.glsl +0 -0
  25. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/gau_frag.glsl +0 -0
  26. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/gau_prep.glsl +0 -0
  27. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/gau_vert.glsl +0 -0
  28. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/shaders/sort_by_key.glsl +0 -0
  29. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/__init__.py +0 -0
  30. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/cloud_viewer.py +0 -0
  31. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/example_viewer.py +0 -0
  32. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/film_maker.py +0 -0
  33. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/gaussian_viewer.py +0 -0
  34. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/lidar_calib.py +0 -0
  35. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/tools/ros_viewer.py +0 -0
  36. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/__init__.py +0 -0
  37. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/cloud_io.py +0 -0
  38. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/convert_ros_msg.py +0 -0
  39. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/gl_helper.py +0 -0
  40. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/helpers.py +0 -0
  41. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/maths.py +0 -0
  42. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer/utils/range_slider.py +0 -0
  43. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/SOURCES.txt +0 -0
  44. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/dependency_links.txt +0 -0
  45. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/entry_points.txt +0 -0
  46. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/requires.txt +0 -0
  47. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/q3dviewer.egg-info/top_level.txt +0 -0
  48. {q3dviewer-1.1.6 → q3dviewer-1.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q3dviewer
3
- Version: 1.1.6
3
+ Version: 1.1.7
4
4
  Summary: A library designed for quickly deploying a 3D viewer.
5
5
  Home-page: https://github.com/scomup/q3dviewer
6
6
  Author: Liu Yang
@@ -26,7 +26,7 @@ Requires-Dist: matplotlib
26
26
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
27
27
  [![PyPI version](https://badge.fury.io/py/q3dviewer.svg)](https://badge.fury.io/py/q3dviewer)
28
28
 
29
- `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt (PySide6) and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
29
+ `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
30
30
 
31
31
 
32
32
  To show how to use `q3dviewer` as a library, we also provide some [very useful tools](#tools).
@@ -205,7 +205,7 @@ In addition to the standard 3D items provided, you can visualize custom 3D items
205
205
  from OpenGL.GL import *
206
206
  import numpy as np
207
207
  import q3dviewer as q3d
208
- from PySide6.QtWidgets import QLabel, QSpinBox
208
+ from q3dviewer.Qt.QtWidgets import QLabel, QSpinBox
209
209
 
210
210
  class YourItem(q3d.BaseItem):
211
211
  def __init__(self):
@@ -4,7 +4,7 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![PyPI version](https://badge.fury.io/py/q3dviewer.svg)](https://badge.fury.io/py/q3dviewer)
6
6
 
7
- `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt (PySide6) and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
7
+ `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
8
8
 
9
9
 
10
10
  To show how to use `q3dviewer` as a library, we also provide some [very useful tools](#tools).
@@ -183,7 +183,7 @@ In addition to the standard 3D items provided, you can visualize custom 3D items
183
183
  from OpenGL.GL import *
184
184
  import numpy as np
185
185
  import q3dviewer as q3d
186
- from PySide6.QtWidgets import QLabel, QSpinBox
186
+ from q3dviewer.Qt.QtWidgets import QLabel, QSpinBox
187
187
 
188
188
  class YourItem(q3d.BaseItem):
189
189
  def __init__(self):
@@ -40,7 +40,7 @@ class CloudItem(BaseItem):
40
40
  except ValueError:
41
41
  print(f"Invalid color: {color}, please use matplotlib color format")
42
42
  exit(1)
43
- self.mode_table = {'FLAT': 0, 'I': 1, 'RGB': 2}
43
+ self.mode_table = {'FLAT': 0, 'I': 1, 'RGB': 2, 'GRAY': 3}
44
44
  self.point_type_table = {'PIXEL': 0, 'SQUARE': 1, 'SPHERE': 2}
45
45
  self.color_mode = self.mode_table[color_mode]
46
46
  self.CAPACITY = 10000000 # 10MB * 3 (x,y,z, color) * 4
@@ -89,6 +89,7 @@ class CloudItem(BaseItem):
89
89
  self.combo_color.addItem("flat color")
90
90
  self.combo_color.addItem("intensity")
91
91
  self.combo_color.addItem("RGB")
92
+ self.combo_color.addItem("gray")
92
93
  self.combo_color.setCurrentIndex(self.color_mode)
93
94
  self.combo_color.currentIndexChanged.connect(self._on_color_mode)
94
95
  layout.addWidget(self.combo_color)
@@ -127,10 +128,13 @@ class CloudItem(BaseItem):
127
128
  self.edit_rgb.show()
128
129
  elif (index == self.mode_table['I']): # flat color
129
130
  self.slider_v.show()
131
+ elif (index == self.mode_table['GRAY']): # flat color
132
+ self.slider_v.show()
133
+
130
134
  self.need_update_setting = True
131
135
 
132
136
  def set_color_mode(self, color_mode):
133
- if color_mode in {'FLAT', 'RGB', 'I'}:
137
+ if color_mode in {'FLAT', 'RGB', 'I', 'GRAY'}:
134
138
  try:
135
139
  self.combo_color.setCurrentIndex(self.mode_table[color_mode])
136
140
  except:
@@ -62,6 +62,15 @@ void main()
62
62
  c.y = float((value & uint(0x0000FF00)) >> 8)/255.;
63
63
  c.x = float((value & uint(0x00FF0000)) >> 16)/255.;
64
64
  }
65
+ else if(color_mode == 3)
66
+ {
67
+ uint intensity = value >> 24;
68
+ float range = vmax - vmin;
69
+ float value = 1.0 - (float(intensity) - vmin) / range;
70
+ c.z = value;
71
+ c.y = value;
72
+ c.x = value;
73
+ }
65
74
  else
66
75
  {
67
76
  c.z = float( uint(flat_rgb) & uint(0x000000FF))/255.;
@@ -17,8 +17,7 @@ import cv2
17
17
  import argparse
18
18
  from q3dviewer.utils.convert_ros_msg import convert_pointcloud2_msg, convert_image_msg
19
19
  from q3dviewer.utils.maths import euler_to_matrix, matrix_to_quaternion, matrix_to_euler
20
-
21
-
20
+ from q3dviewer.utils.helpers import rainbow
22
21
  clouds = []
23
22
  remap_info = None
24
23
  K = None
@@ -254,7 +253,7 @@ def image_cb(data):
254
253
  intensity = cloud_local['irgb'][u_mask][valid_points] >> 24
255
254
  vmin = viewer['scan'].vmin
256
255
  vmax = viewer['scan'].vmax
257
- intensity_color = q3d.rainbow(intensity, scalar_min=vmin, scalar_max=vmax).astype(np.uint8)
256
+ intensity_color = rainbow(intensity, scalar_min=vmin, scalar_max=vmax).astype(np.uint8)
258
257
  draw_image = image_un.copy()
259
258
  draw_image = draw_larger_points(draw_image, u, intensity_color, radius)
260
259
  rgb = image_un[u[:, 1], u[:, 0]]
@@ -17,7 +17,7 @@ def handler(signal, frame):
17
17
  class Viewer(QMainWindow):
18
18
  def __init__(self, name='Viewer', win_size=[1920, 1080],
19
19
  gl_widget_class=GLWidget, update_interval=20):
20
- signal.signal(signal.SIGINT, handler)
20
+ self.set_quit_handler(handler)
21
21
  super(Viewer, self).__init__()
22
22
  self.setGeometry(0, 0, win_size[0], win_size[1])
23
23
  self.gl_widget_class = gl_widget_class
@@ -27,6 +27,9 @@ class Viewer(QMainWindow):
27
27
  self.setWindowTitle(name)
28
28
  self.installEventFilter(self)
29
29
 
30
+ def set_quit_handler(self, handler):
31
+ signal.signal(signal.SIGINT, handler)
32
+
30
33
  def init_ui(self):
31
34
  center_widget = QWidget()
32
35
  self.setCentralWidget(center_widget)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: q3dviewer
3
- Version: 1.1.6
3
+ Version: 1.1.7
4
4
  Summary: A library designed for quickly deploying a 3D viewer.
5
5
  Home-page: https://github.com/scomup/q3dviewer
6
6
  Author: Liu Yang
@@ -26,7 +26,7 @@ Requires-Dist: matplotlib
26
26
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
27
27
  [![PyPI version](https://badge.fury.io/py/q3dviewer.svg)](https://badge.fury.io/py/q3dviewer)
28
28
 
29
- `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt (PySide6) and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
29
+ `q3dviewer` is a library designed for quickly deploying a 3D viewer. It is based on Qt and provides efficient OpenGL items for displaying 3D objects (e.g., point clouds, cameras, and 3D Gaussians). You can use it to visualize your 3D data or set up an efficient viewer application. It is inspired by PyQtGraph but focuses more on efficient 3D rendering.
30
30
 
31
31
 
32
32
  To show how to use `q3dviewer` as a library, we also provide some [very useful tools](#tools).
@@ -205,7 +205,7 @@ In addition to the standard 3D items provided, you can visualize custom 3D items
205
205
  from OpenGL.GL import *
206
206
  import numpy as np
207
207
  import q3dviewer as q3d
208
- from PySide6.QtWidgets import QLabel, QSpinBox
208
+ from q3dviewer.Qt.QtWidgets import QLabel, QSpinBox
209
209
 
210
210
  class YourItem(q3d.BaseItem):
211
211
  def __init__(self):
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='q3dviewer',
5
- version='1.1.6',
5
+ version='1.1.7',
6
6
  author="Liu Yang",
7
7
  description="A library designed for quickly deploying a 3D viewer.",
8
8
  long_description=open("README.md").read(),
File without changes
File without changes