A simple CLI for sampling point clouds from large volumetric datasets
Project description
CLI for Point Cloud Sampling
pip install nps-cli
Get started
nps --help
Usage: nps [OPTIONS]
Options:
--cv-path TEXT Path to CloudVolume data. [required]
--mip INTEGER MIP level to use. [default: 0]
--timestamp INTEGER Optional timestamp for the dataset version
(graphene only).
--sample_svids Sample SVIDs in addition to points (default:
False).
-o, --output-dir DIRECTORY Output directory. [default: ./nps_output]
--worker-type [LocalWorker|LSFWorker|SlurmWorker]
Type of worker to use for sampling.
[default: LocalWorker]
--num-workers INTEGER Number of workers for blockwise sampling.
[default: 8]
--cpus-per-worker INTEGER Number of CPUs per worker. [default: 4]
--queue TEXT Queue name (for LSF backend). [default:
local]
--fraction FLOAT Fraction of points to sample [0.0, 1.0].
[default: 0.001]
--block-size INTEGER... Block size in voxels (X Y Z). [default:
128, 128, 128]
-h, --help Show this message and exit.
Example usage
nps --cv-path precomputed://gs://neuroglancer-janelia-flyem-hemibrain/v1.0/segmentation
Reading Point Clouds
Please refer to the pocaduck repo on how to read point clouds from the output directory:
from pocaduck import Query
# Create a query object
query = Query(storage_config=<PATH>) # path to folder where nps output is stored
# Get all available labels
labels = query.get_labels()
print(f"Available labels: {labels}")
# Get all points for a label (aggregated across all blocks)
points = query.get_points(label=12345)
print(f"Retrieved {points.shape[0]} points for label 12345")
# Close the query connection when done
query.close()
For optimized point cloud reading, consider this.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nps_cli-0.1.1.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nps_cli-0.1.1.tar.gz.
File metadata
- Download URL: nps_cli-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d1c1c04822696933ff1b1223a2e8fce5e13d41fdfebc755eb15845cb81ea4a2
|
|
| MD5 |
070ecf9559bc9353aee3f42c2fa6c42c
|
|
| BLAKE2b-256 |
8bc32a3c021a067ba426687509082d19aea81312844e699055d1a38cb5ee5b3f
|
File details
Details for the file nps_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nps_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e8bff76b7a632b06b66987f92d66ba179444209869befc86a5747f71aadc521
|
|
| MD5 |
b345392b5a4ca94a68bfbe9be781b0f5
|
|
| BLAKE2b-256 |
c7a568b3f027167bd2f3b2bd7a0b587d33db41b4ad80d3e9f5becc965d1ce446
|