Writer for CloudCompare .bin format
Project description
CloudCompare bin writer
Writer / Reader for the CloudCompare BIN Format
Installation
pip install ccwriter
Example
import numpy as np
from ccwriter import CCReader, CCWriter
amount = 10_000
cloud = np.random.uniform(-100, 100, (amount, 3))
color = np.random.uniform(-100, 100, (amount, 3))
normal = np.random.uniform(-100, 100, (amount, 3))
scaler = np.random.uniform(-100, 100, amount)
cloud_scaler = np.random.uniform(-100, 100, (amount, 4))
with CCWriter("cloud.bin") as cc:
cc.add_cloud(cloud, name="cloud")
cc.add_cloud(cloud, name="cloud & color", color=color)
cc.add_cloud(cloud, name="cloud & color & normal", color=color, normal=normal)
cc.add_cloud(cloud, name="cloud & color & normal & scaler", color=color, normal=normal, scalar=scaler)
cc.add_cloud(cloud_scaler, name="cloud_scaler & scaler_index", scalar=3)
reader = CCReader("cloud.bin")
print(reader[0].dtype)
# (10000,) [('x', '<f4'), ('y', '<f4'), ('z', '<f4')]
print(reader["cloud"].dtype)
# (10000,) [('x', '<f4'), ('y', '<f4'), ('z', '<f4')]
print(reader.keys())
# dict_keys([0, 'cloud', 1, 'cloud & color', 2, 'cloud & color & normal', 3, 'cloud & color & normal & scaler', 4, 'cloud_scaler & scaler_index'])
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ccwriter-0.2.3.tar.gz
(5.2 kB
view details)
Built Distribution
File details
Details for the file ccwriter-0.2.3.tar.gz
.
File metadata
- Download URL: ccwriter-0.2.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41f2f65b24c3d629ebed51144fe65be2c3950255a36ac451702b40627f3c8b1b |
|
MD5 | 027ca68ffccc14fb8861797b6fb75369 |
|
BLAKE2b-256 | f7022d442474597610aff7ae0c4915c5d8bceee8f008cc0bad5d453a437e5c1d |
File details
Details for the file ccwriter-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: ccwriter-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a16ec6a36fc6c7837dee122f2f090365ff12500f26139790f5ab99dcd849ec |
|
MD5 | 94098a60959e05d5d6cd2dd7700882c7 |
|
BLAKE2b-256 | ad27f62dd0ed852cc70e2fcdd153ab1d53c2cfcb74eb8ce276a7c4f8e25298eb |