pye57 0.4.15__cp312-cp312-win_amd64.whl → 0.4.17__cp312-cp312-win_amd64.whl

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.

Potentially problematic release.


This version of pye57 might be problematic. Click here for more details.

pye57/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.4.15"
1
+ __version__ = "0.4.17"
pye57/e57.py CHANGED
@@ -110,6 +110,11 @@ class E57:
110
110
  self.root.set("images2D", libe57.VectorNode(imf, True))
111
111
 
112
112
  def make_buffer(self, field_name, capacity, do_conversion=True, do_scaling=True):
113
+ # now this exception should never get hit through read_scan or read_scan_raw
114
+ # for read_scan, the headers are constructed, so they should all be supported
115
+ # for read_scan_raw, it now filters out the unsupported headers
116
+ # however, if make_buffer or make_buffers gets called, an unsupported field name could be passed in directly
117
+ # if we don't want users calling them, maybe we could make them private, and this would be an assertion
113
118
  if field_name not in SUPPORTED_POINT_FIELDS:
114
119
  raise ValueError("Unsupported point field: %s" % field_name)
115
120
 
@@ -131,11 +136,22 @@ class E57:
131
136
  buffers.append(b)
132
137
  return data, buffers
133
138
 
134
- def read_scan_raw(self, index) -> Dict:
139
+ def read_scan_raw(self, index, ignore_unsupported_fields=False) -> Dict:
135
140
  header = self.get_header(index)
141
+ supported_point_fields = []
142
+ unsupported_point_fields = []
143
+ for field in header.point_fields:
144
+ if field in SUPPORTED_POINT_FIELDS:
145
+ supported_point_fields.append(field)
146
+ else:
147
+ unsupported_point_fields.append(field)
148
+ if unsupported_point_fields != [] and not ignore_unsupported_fields:
149
+ raise ValueError("Unsupported point fields: %s.\n"
150
+ "Consider using 'ignore_unsupported_fields' to skip them." % unsupported_point_fields)
151
+ # could it call make_buffers instead, it looks like the code's identical
136
152
  data = {}
137
153
  buffers = libe57.VectorSourceDestBuffer()
138
- for field in header.point_fields:
154
+ for field in supported_point_fields:
139
155
  np_array, buffer = self.make_buffer(field, header.point_count)
140
156
  data[field] = np_array
141
157
  buffers.append(buffer)
@@ -376,9 +392,9 @@ class E57:
376
392
  max_row = np.max(data["rowIndex"])
377
393
  min_col = np.min(data["columnIndex"])
378
394
  max_col = np.max(data["columnIndex"])
379
- points_prototype.set("rowIndex", libe57.IntegerNode(self.image_file, 0, min_row, max_row))
395
+ points_prototype.set("rowIndex", libe57.IntegerNode(self.image_file, min_row, min_row, max_row))
380
396
  field_names.append("rowIndex")
381
- points_prototype.set("columnIndex", libe57.IntegerNode(self.image_file, 0, min_col, max_col))
397
+ points_prototype.set("columnIndex", libe57.IntegerNode(self.image_file, min_col, min_col, max_col))
382
398
  field_names.append("columnIndex")
383
399
 
384
400
  if "cartesianInvalidState" in data:
Binary file
pye57/xerces-c_3_2.dll CHANGED
Binary file
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pye57
3
- Version: 0.4.15
3
+ Version: 0.4.17
4
4
  Summary: Python .e57 files reader/writer
5
5
  Home-page: https://www.github.com/davidcaron/pye57
6
6
  Author: David Caron
@@ -11,20 +11,33 @@ License: MIT
11
11
  Classifier: License :: OSI Approved :: MIT License
12
12
  Classifier: Programming Language :: Python
13
13
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.8
15
14
  Classifier: Programming Language :: Python :: 3.9
16
15
  Classifier: Programming Language :: Python :: 3.10
17
16
  Classifier: Programming Language :: Python :: 3.11
18
17
  Classifier: Programming Language :: Python :: 3.12
19
18
  Classifier: Programming Language :: Python :: 3.13
20
19
  Classifier: Programming Language :: Python :: Implementation :: CPython
21
- Requires-Python: >=3.8
20
+ Requires-Python: >=3.9
22
21
  Description-Content-Type: text/markdown
23
22
  License-File: LICENSE
24
23
  Requires-Dist: numpy
25
24
  Requires-Dist: pyquaternion
26
25
  Provides-Extra: test
27
26
  Requires-Dist: pytest; extra == "test"
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: license
34
+ Dynamic: license-file
35
+ Dynamic: maintainer
36
+ Dynamic: maintainer-email
37
+ Dynamic: provides-extra
38
+ Dynamic: requires-dist
39
+ Dynamic: requires-python
40
+ Dynamic: summary
28
41
 
29
42
 
30
43
  # pye57
@@ -68,10 +81,10 @@ assert isinstance(data["columnIndex"], np.ndarray)
68
81
  data_raw = e57.read_scan_raw(0)
69
82
 
70
83
  # writing is also possible, but only using raw data for now
71
- e57_write = pye57.E57("e57_file_write.e57", mode='w')
72
- e57_write.write_scan_raw(data_raw)
73
- # you can specify a header to copy information from
74
- e57_write.write_scan_raw(data_raw, scan_header=e57.get_header(0))
84
+ with pye57.E57("e57_file_write.e57", mode='w') as e57_write:
85
+ e57_write.write_scan_raw(data_raw)
86
+ # you can specify a header to copy information from
87
+ e57_write.write_scan_raw(data_raw, scan_header=e57.get_header(0))
75
88
 
76
89
  # the ScanHeader object wraps most of the scan information:
77
90
  header = e57.get_header(0)
@@ -0,0 +1,13 @@
1
+ pye57/__init__.py,sha256=keWVF2W7Jau5voY0aufr6bayvjfDJSWf_bmawIvvj88,95
2
+ pye57/__version__.py,sha256=4aW0U0UNijNF-wcZduMEIIsv1YFF2CLlpOHjUj01UNk,24
3
+ pye57/e57.py,sha256=FQp3eCa0-4mARIbVebhssW6bNW5VYl7F_IzxEM_yc6Q,20112
4
+ pye57/exception.py,sha256=9Qgriir0IsSpHhStN5uvI5mlbKrc_P5ZURsi_PIW_q8,50
5
+ pye57/libe57.cp312-win_amd64.pyd,sha256=wlLDuYDshgAfhe5WQOOjdjclI9gykAmkoVGR-pgyu1E,813568
6
+ pye57/scan_header.py,sha256=eCPId1MGxTJmKaqPwHjMJV6bFRvhorcxVmumZOrbLow,6301
7
+ pye57/utils.py,sha256=4jZrQ0sbrsaaFjVkgm_Tf8cLU9fBFb8hvYUDGD2ZJic,4297
8
+ pye57/xerces-c_3_2.dll,sha256=Zwv4i2eMSJq50uWuT_b4HnGSIy9mwm7Lnh1UeorvFI4,2787328
9
+ pye57-0.4.17.dist-info/licenses/LICENSE,sha256=Q0K1iCfVm6UmnR4AAyqME5q7flnU6aGh5OarEIa2K6Y,1056
10
+ pye57-0.4.17.dist-info/METADATA,sha256=otiAqPlP3GKPZHEIgnDxZMeC5HQHSlgroD65r9BKWQY,4947
11
+ pye57-0.4.17.dist-info/WHEEL,sha256=UPBFOm4-IJguDqBVRoKS6hxTeqWyP0GpijaCQTBHWKA,101
12
+ pye57-0.4.17.dist-info/top_level.txt,sha256=xD9HDzQ3BfGMuz1kI2uNKUR0KXcR-RtNEKigrkh48Nk,6
13
+ pye57-0.4.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: setuptools (80.3.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp312-cp312-win_amd64
5
5
 
@@ -1,13 +0,0 @@
1
- pye57/__init__.py,sha256=keWVF2W7Jau5voY0aufr6bayvjfDJSWf_bmawIvvj88,95
2
- pye57/__version__.py,sha256=GeEGiiyvw88sVxIJqg7n5M1eCS6IY2LfKAvd2Gy-VLc,24
3
- pye57/e57.py,sha256=ec9_zxTvZ9TlnIVPMrzzB2wRHQg428F6EtWCCeg05K0,18950
4
- pye57/exception.py,sha256=9Qgriir0IsSpHhStN5uvI5mlbKrc_P5ZURsi_PIW_q8,50
5
- pye57/libe57.cp312-win_amd64.pyd,sha256=27HD37mYRRnJDS_3riv1H8emwPbUd82uTvLcBwR-xLo,771072
6
- pye57/scan_header.py,sha256=eCPId1MGxTJmKaqPwHjMJV6bFRvhorcxVmumZOrbLow,6301
7
- pye57/utils.py,sha256=4jZrQ0sbrsaaFjVkgm_Tf8cLU9fBFb8hvYUDGD2ZJic,4297
8
- pye57/xerces-c_3_2.dll,sha256=1RCaxUfD0ljxUb_K0Ls5ddCsBHAo0KEqoO9iUwbis7Q,2787328
9
- pye57-0.4.15.dist-info/LICENSE,sha256=Q0K1iCfVm6UmnR4AAyqME5q7flnU6aGh5OarEIa2K6Y,1056
10
- pye57-0.4.15.dist-info/METADATA,sha256=gyvQh475wEkfT-9NjCpk46WlTud61os_7YTkaBfQQ7s,4659
11
- pye57-0.4.15.dist-info/WHEEL,sha256=3vidnDuZ-QSnHIxLhNbI1gIM-KgyEcMHuZuv1mWPd_Q,101
12
- pye57-0.4.15.dist-info/top_level.txt,sha256=xD9HDzQ3BfGMuz1kI2uNKUR0KXcR-RtNEKigrkh48Nk,6
13
- pye57-0.4.15.dist-info/RECORD,,