CLI Tools for Cell Locator
Project description
Cell Locator CLI Tools
Provides some utility CLI tools for dealing with Cell Locator annotation files.
- cl-export enables converting an annotation file to VTK model or binary labelmap.
- cl-convert enables upgrading annotation files for compatibility with different versions of Cell Locator.
Quick Start
Installation
$ pip install cell-locator-cli
Sample Usage
Update an old annotation file
$ cl-convert convert -v'?' -t v0.2 older.json newer.json
Inferred version 'v0.0.0+2020.08.26'
$ cl-convert infer newer.json
v0.2.1+2022.03.04
Export a CCF annotation to labelmap and model
$ cl-export \
ccf-annotation.json \
-m ccf-annotation.vtk \
-l ccf-annotation.label.nrrd \
-a ccf_annotation_25_contiguous.nrrd \
--pir
$ f3d ccf-annotation.vtk
$ f3d -v ccf-annotation.label.nrrd
Export a MNI annotation to labelmap and model
$ cl-export \
mni-annotation.json \
-m mni-annotation.vtk \
-l mni-annotation.label.nrrd \
-a mni_annotation_contiguous.nrrd
$ f3d mni-annotation.vtk
$ f3d -v mni-annotation.label.nrrd
CLI Documentation
cl-export
usage: cl-export [-h] [-m MODEL_PATH] [-l LABELMAP_PATH] [-a ATLAS_PATH]
[--pir]
annotation
Export Cell Locator annotations to VTK model or labelmap.
positional arguments:
annotation Input Cell Locator annotation file (JSON).
options:
-h, --help show this help message and exit
-m MODEL_PATH, --model MODEL_PATH
Output path for annotation model. If not provided,
model generation is skipped.
-l LABELMAP_PATH, --labelmap LABELMAP_PATH
Output path for annotation labelmap. If not provided,
labelmap generation is skipped. Requires --atlas for
spacing information.
-a ATLAS_PATH, --atlas ATLAS_PATH
Atlas volume or labelmap. Used to set
spacing/direction on the output labelmap.
--pir If set, read the annotation in PIR format rather than
RAS. This should only be necessary for old-style CCF
annotations.
Future Work
- Add option for different strategies regarding merged/separated model files, or use a multi-valued segmentation format rather than binary labelmap.
cl-convert
usage: cl-convert convert [-h] -v VERSION [-t TARGET] [--no-indent] src dst
positional arguments:
src Source JSON file. Use '-' to read from stdin.
dst Destination JSON file. Use '-' to write to stdout.
options:
-h, --help show this help message and exit
-v VERSION, --version VERSION
Source file version. Use '-v?' to infer the version.
-t TARGET, --target TARGET
Target file version. Defaults to the latest version.
--no-indent Do not indent output JSON.
usage: cl-convert versions [-h] [target]
positional arguments:
target Show versions matching this target. If empty, show all versions.
options:
-h, --help show this help message and exit
usage: cl-convert infer [-h] src
positional arguments:
src Source JSON file. Use '-' to read from stdin.
options:
-h, --help show this help message and exit
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
cell_locator_cli-0.0.1.tar.gz
(15.7 kB
view details)
Built Distribution
File details
Details for the file cell_locator_cli-0.0.1.tar.gz
.
File metadata
- Download URL: cell_locator_cli-0.0.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c826ba3b05fb7460cd1b2a483c82d89681fe186340d80a2eb57a5c192bc1f4b |
|
MD5 | 2a7b65d4e9ea7216fb9e469e00e15d92 |
|
BLAKE2b-256 | 18cfcb87f3532c7bd044890b6722db1c2469579e963ec2814f954da6642c3803 |
File details
Details for the file cell_locator_cli-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: cell_locator_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84f765370227c649c4dc1b5858adf25d171f792e3d307cadbc49bed052723738 |
|
MD5 | 9db47c918a6f6cb59cc547877827e697 |
|
BLAKE2b-256 | 69f140c285aacd1e6bda43f3d31b3f08637020010ab5052cec7fac260b9ca7ce |