NRRD slice export CLI
Project description
btsp-cli
btsp-cli is a Python command-line tool for exporting orthogonal slice PNGs from paired NRRD image and label volumes.
Environment Setup
Create and activate the Conda environment:
conda create -n sp python=3.11
conda activate sp
Install the project in editable mode with development dependencies:
python -m pip install -e ".[dev]"
Single-File Usage
Export 6 PNG slices for one paired sample:
sp print \
--nrrd \
--data data/MR201202161060.image.nrrd \
--label label/MR201202161060.label.nrrd \
--point "[120,180,9]" \
--output output \
--header se
This writes:
{header}_{point}_x_image.png{header}_{point}_x_label.png{header}_{point}_y_image.png{header}_{point}_y_label.png{header}_{point}_z_image.png{header}_{point}_z_label.png
Directory Usage
Apply one shared point to every matched sample pair in two directories:
sp print \
--nrrd \
--data data \
--label label \
--point "[120,180,9]" \
--output output \
--workers 4
Samples with out-of-bounds shared points are skipped without aborting the full batch.
Directory Usage With CSV Points
Use a CSV file to supply per-sample points and restrict processing to listed samples only.
CSV schema:
name_header,point
MR201202161060,"[120,180,9]"
MR201206080468,"[98,164,8]"
Command:
sp print \
--nrrd \
--data data \
--label label \
--point-csv points.csv \
--output output \
--header se \
--workers 4
In directory mode, output headers are automatically expanded to {header}_{sample_name} to avoid overwriting files across samples.
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
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 btsp_cli-0.1.0.tar.gz.
File metadata
- Download URL: btsp_cli-0.1.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1a8c13fd29e72472a3c0543d6e385f7a29f0f16651c5822ed40ef63cded7644
|
|
| MD5 |
3dff5191c63aa8e308461f6845e4e0f9
|
|
| BLAKE2b-256 |
d43d615fbf696d2a78bf898f7bcf4e1ea9f863de4b6f0444400b30bdc41455dd
|
File details
Details for the file btsp_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: btsp_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d14902629e3a229fa6a06c029736c6299f6a724129835e6edf8bfecebd28f9a3
|
|
| MD5 |
f29eae23547e90562045aa22ed8e2d5f
|
|
| BLAKE2b-256 |
a3c1163500abafe48dac686e9057f30b799ebc03431a34a559ea9cbb4ec01bce
|