VTKio 0.1.0.dev6__tar.gz → 0.1.0.dev8__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.
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/PKG-INFO +1 -1
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/pyproject.toml +8 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/version.py +1 -1
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/vtkhdf.py +4 -6
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/writers.py +5 -5
- vtkio-0.1.0.dev6/examples/cow2.vtp +0 -2283
- vtkio-0.1.0.dev6/examples/hdf_multiblock_test.vtkhdf +0 -0
- vtkio-0.1.0.dev6/examples/ibm_with_data.vtp +0 -280
- vtkio-0.1.0.dev6/examples/line_dedup_test.vtp +0 -43
- vtkio-0.1.0.dev6/examples/line_dedup_test_base64.vtp +0 -29
- vtkio-0.1.0.dev6/examples/line_dedup_test_binary.vtp +0 -38
- vtkio-0.1.0.dev6/examples/line_test.vtp +0 -51
- vtkio-0.1.0.dev6/examples/line_test_base64.vtp +0 -31
- vtkio-0.1.0.dev6/examples/line_test_binary.vtp +0 -44
- vtkio-0.1.0.dev6/examples/map.vtkhdf +0 -0
- vtkio-0.1.0.dev6/examples/map.vtp +0 -54226
- vtkio-0.1.0.dev6/examples/map_appended.vtp +0 -30
- vtkio-0.1.0.dev6/examples/map_base64.vtp +0 -41
- vtkio-0.1.0.dev6/examples/map_base64_ref.vtp +0 -73
- vtkio-0.1.0.dev6/examples/multi_cell_type_example.vtu +0 -0
- vtkio-0.1.0.dev6/examples/multi_cell_type_example_new.vtu +0 -50
- vtkio-0.1.0.dev6/examples/new_vtk_multiblock_file.vtm +0 -29
- vtkio-0.1.0.dev6/examples/plate_vectors.vtp +0 -1058
- vtkio-0.1.0.dev6/examples/plate_vectors_hdf_new.vtkhdf +0 -0
- vtkio-0.1.0.dev6/examples/polyline_test.vtp +0 -43
- vtkio-0.1.0.dev6/examples/polyline_test_base64.vtp +0 -29
- vtkio-0.1.0.dev6/examples/polyline_test_binary.vtp +0 -38
- vtkio-0.1.0.dev6/examples/polytest.vtkhdf +0 -0
- vtkio-0.1.0.dev6/examples/polytest.vtp +0 -65
- vtkio-0.1.0.dev6/examples/polytest_base64.vtp +0 -31
- vtkio-0.1.0.dev6/examples/polytest_binary.vtp +0 -48
- vtkio-0.1.0.dev6/examples/revolution_triangular_mesh_test_new.vtu +0 -657
- vtkio-0.1.0.dev6/examples/test.vtu +0 -138
- vtkio-0.1.0.dev6/examples/test_appended.vtu +0 -30
- vtkio-0.1.0.dev6/examples/test_binary.vtu +0 -51
- vtkio-0.1.0.dev6/examples/test_blank_vti_new.vti +0 -7
- vtkio-0.1.0.dev6/examples/test_blank_vtp.vtp +0 -16
- vtkio-0.1.0.dev6/examples/test_blank_vtu.vtu +0 -20
- vtkio-0.1.0.dev6/examples/test_image_data_grid_appended_new.vti +0 -22
- vtkio-0.1.0.dev6/examples/test_image_data_grid_binary_new.vti +0 -35
- vtkio-0.1.0.dev6/examples/test_image_data_grid_new.vti +0 -645
- vtkio-0.1.0.dev6/examples/test_image_data_grid_raw_appended_new.vti +0 -0
- vtkio-0.1.0.dev6/examples/test_lines_polydata_appended_encoded.vtp +0 -31
- vtkio-0.1.0.dev6/examples/test_points_polydata.vtp +0 -145
- vtkio-0.1.0.dev6/examples/test_points_polydata_appended_encoded.vtp +0 -31
- vtkio-0.1.0.dev6/examples/test_points_polydata_appended_raw.vtp +0 -0
- vtkio-0.1.0.dev6/examples/test_points_polydata_ascii.vtp +0 -135
- vtkio-0.1.0.dev6/examples/test_points_polydata_binary.vtp +0 -48
- vtkio-0.1.0.dev6/examples/test_points_polydata_vtkhdf.vtkhdf +0 -0
- vtkio-0.1.0.dev6/examples/test_uniform_image_data.vti +0 -645
- vtkio-0.1.0.dev6/examples/test_uniform_image_data_2.vti +0 -650
- vtkio-0.1.0.dev6/examples/test_uniform_image_data_appended.vti +0 -22
- vtkio-0.1.0.dev6/examples/test_uniform_image_data_binary.vti +0 -35
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/.gitignore +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/CITATION.cff +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/LICENSE +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/README.md +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/ImageData.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/PolyData.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/RectilinearData.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/StructuredGrid.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/UnstructuredGrid.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/benchmarking.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/new_vtkhdf_test.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/examples/read_vtk_files.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/__init__.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/helpers.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/reader/__init__.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/reader/hdf5.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/reader/xml.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/simplified.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/utilities.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/vtk_cell_types.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/vtk_structures.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/__init__.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/base_writer.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/pvd_writer.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/validation.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/src/vtkio/writer/xml.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/__init__.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_vtkhdf_vti.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_xml_vti.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_xml_vtp.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_xml_vtr.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_xml_vts.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_read_xml_vtu.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_vtkhdf_writer.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_vtkhdf_vts.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_xml_vti.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_xml_vtp.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_xml_vtr.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_xml_vts.py +0 -0
- {vtkio-0.1.0.dev6 → vtkio-0.1.0.dev8}/tests/test_write_xml_vtu.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: VTKio
|
|
3
|
-
Version: 0.1.0.
|
|
3
|
+
Version: 0.1.0.dev8
|
|
4
4
|
Summary: A simple package for converting data between VTK files (XML and HDF5) and NumPy arrays.
|
|
5
5
|
Project-URL: Homepage, https://jpmorr.gitlab.io/vtkio
|
|
6
6
|
Project-URL: Documentation, https://jpmorr.gitlab.io/vtkio
|
|
@@ -101,6 +101,14 @@ include = [
|
|
|
101
101
|
]
|
|
102
102
|
exclude = [
|
|
103
103
|
"/examples/example_data",
|
|
104
|
+
"/examples/*.vti",
|
|
105
|
+
"/examples/*.vtp",
|
|
106
|
+
"/examples/*.vtu",
|
|
107
|
+
"/examples/*.vtr",
|
|
108
|
+
"/examples/*.vts",
|
|
109
|
+
"/examples/*.vtm",
|
|
110
|
+
"/examples/*.vtkhdf",
|
|
111
|
+
"/examples/*.pvd",
|
|
104
112
|
"/TestData"
|
|
105
113
|
]
|
|
106
114
|
|
|
@@ -536,12 +536,10 @@ class VTKHDFMultiBlockWriter(VTKHDFWriterBase):
|
|
|
536
536
|
field_data=blk_data.field_data, multiblock_index=blk_indx
|
|
537
537
|
)
|
|
538
538
|
elif 'UnstructuredGrid' in class_names:
|
|
539
|
-
writer = VTKHDFUnstructuredGridWriter(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
field_data=blk_data.field_data, multiblock_index=blk_indx
|
|
544
|
-
)
|
|
539
|
+
writer = VTKHDFUnstructuredGridWriter(self.path, blk_data.points, blk_data.cells.types,
|
|
540
|
+
blk_data.cells.connectivity, blk_data.cells.offsets,
|
|
541
|
+
multiblock_index=blk_indx, cell_data=blk_data.cell_data,
|
|
542
|
+
point_data=blk_data.point_data, field_data=blk_data.field_data)
|
|
545
543
|
elif 'ImageData' in class_names:
|
|
546
544
|
writer = VTKHDFImageDataWriter(
|
|
547
545
|
self.path, blk_data.grid.whole_extents, blk_data.grid.origin,
|
|
@@ -251,7 +251,7 @@ def write_vts(filepath, points, whole_extent=None, piece_extent=None, num_cells=
|
|
|
251
251
|
raise ValueError(f"Unsupported file format: {file_format}. Supported formats are 'xml' and 'vtkhdf'.")
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
def write_vtu(filepath, nodes,
|
|
254
|
+
def write_vtu(filepath, nodes, cell_types=None, connectivity=None, offsets=None, point_data=None, cell_data=None,
|
|
255
255
|
field_data=None, additional_metadata=None, encoding='ascii', ascii_precision=16, ascii_ncolumns=6,
|
|
256
256
|
add_declaration=True, appended_encoding='base64', version='1.0', file_format='xml'):
|
|
257
257
|
"""
|
|
@@ -267,7 +267,7 @@ def write_vtu(filepath, nodes, cell_type=None, connectivity=None, offsets=None,
|
|
|
267
267
|
Path to the generated VTU file.
|
|
268
268
|
nodes : numpy.ndarray
|
|
269
269
|
Array of node coordinates, typically shape (N, 3) for 3D points.
|
|
270
|
-
|
|
270
|
+
cell_types : numpy.ndarray, optional
|
|
271
271
|
Array specifying VTK cell types for each cell.
|
|
272
272
|
connectivity : numpy.ndarray, optional
|
|
273
273
|
Array defining node connectivity for each cell.
|
|
@@ -299,7 +299,7 @@ def write_vtu(filepath, nodes, cell_type=None, connectivity=None, offsets=None,
|
|
|
299
299
|
"""
|
|
300
300
|
if file_format.lower() == 'xml':
|
|
301
301
|
|
|
302
|
-
file = XMLUnstructuredGridWriter(filepath, nodes,
|
|
302
|
+
file = XMLUnstructuredGridWriter(filepath, nodes, cell_types=cell_types, connectivity=connectivity, offsets=offsets,
|
|
303
303
|
cell_data=cell_data, field_data=field_data, point_data=point_data, encoding=encoding,
|
|
304
304
|
appended_encoding=appended_encoding, version=version, ascii_precision=ascii_precision,
|
|
305
305
|
ascii_ncolumns=ascii_ncolumns, declaration=add_declaration)
|
|
@@ -307,7 +307,7 @@ def write_vtu(filepath, nodes, cell_type=None, connectivity=None, offsets=None,
|
|
|
307
307
|
file.write_xml_file()
|
|
308
308
|
|
|
309
309
|
elif file_format.lower() in ['vtkhdf', 'hdf5', 'hdf', 'vtk hdf']:
|
|
310
|
-
file = VTKHDFUnstructuredGridWriter(filepath, nodes=nodes, cell_types=
|
|
310
|
+
file = VTKHDFUnstructuredGridWriter(filepath, nodes=nodes, cell_types=cell_types, connectivity=connectivity, offsets=offsets,
|
|
311
311
|
point_data=point_data, cell_data=cell_data, field_data=field_data,
|
|
312
312
|
additional_metadata=additional_metadata,)
|
|
313
313
|
file.write_vtkhdf_file()
|
|
@@ -322,7 +322,7 @@ def write_vtp(filepath, point_data=None, cell_data=None, field_data=None, points
|
|
|
322
322
|
"""
|
|
323
323
|
Write VTK PolyData (VTP) files, in either ASCII or binary formats.
|
|
324
324
|
|
|
325
|
-
Supports configuration of precision, encoding, and data
|
|
325
|
+
Supports configuration of precision, encoding, and data organisation in the output file and
|
|
326
326
|
includes geometric data, topology, and attributes.
|
|
327
327
|
|
|
328
328
|
Parameters
|