pl-spleendata is a ChRIS FS plugin which downloads an exemplar spleen dataset useful for training and inference experiments.
Abstract
This is a simple FS plugin suitable for training and inference on 3D spleen NiFTI volumes, as part of the MONAI spleen segmentation exemplar notebook. FS plugins are suitable as root nodes of ChRIS compute trees, i.e. the data node from which all processing continues. If you need to inject spleen data into a non-root tree node, use the companion DS spleen data node.
By default, the download is pretty big – 1.2Gb, so make sure you have time and space. It is possible to post-download prune this. For example, if you are only interested in training, you can use a --trainingOnly flag which will prune out the 43Mb of testing NiFTI volumes. Conversely, if you are just interested in inference, the --testingOnly will remove the post download 1.2Gb of training data, saving lots of space.
You still need to download the whole set, however, before you can prune.
Installation
pl-spleendata is a ChRIS plugin, meaning it can run from either within ChRIS or the command-line.
Local Usage
On the metal
If you have checked out the repo, you can simply run spleendata using
source venv/bin/activate
pip install -U ./
spleendata output/
PyPI
Alternatively, you can just do a
pip install spleendata
to get directly from PyPI.
apptainer
The recommended way is to use Apptainer (a.k.a. Singularity) to run pl-spleendata as a container:
apptainer exec docker://fnndsc/pl-spleendata spleendata [--args values...] output/
To print its available options, run:
apptainer exec docker://fnndsc/pl-spleendata spleendata --help
Examples
spleendata, being a ChRIS FS plugin, only requires one positional argument: a directory that will contain the output data. Simply create an empty output.
mkdir output
apptainer exec docker://fnndsc/pl-spleendata:latest spleendata [--args] incoming/ outgoing/
Development
Instructions for developers.
Building
Build a local container image:
docker build -t localhost/fnndsc/pl-spleendata .
Running
Mount the source code spleendata.py into a container to try out changes without rebuild.
docker run --rm -it --userns=host -u $(id -u):$(id -g) \
-v $PWD/spleendata.py:/usr/local/lib/python3.11/site-packages/spleendata.py:ro \
-v $PWD/in:/incoming:ro -v $PWD/out:/outgoing:rw -w /outgoing \
localhost/fnndsc/pl-spleendata spleendata /incoming /outgoing
Testing
Run unit tests using pytest. It’s recommended to rebuild the image to ensure that sources are up-to-date. Use the option --build-arg extras_require=dev to install extra dependencies for testing.
docker build -t localhost/fnndsc/pl-spleendata:dev --build-arg extras_require=dev .
docker run --rm -it localhost/fnndsc/pl-spleendata:dev pytest
Release
Steps for release can be automated by Github Actions. This section is about how to do those steps manually.
Increase Version Number
Increase the version number in setup.py and commit this file.
Push Container Image
Build and push an image tagged by the version. For example, for version 1.2.3:
docker build -t docker.io/fnndsc/pl-spleendata:1.2.3 . docker push docker.io/fnndsc/pl-spleendata:1.2.3
Get JSON Representation
Run `chris_plugin_info <https://github.com/FNNDSC/chris_plugin#usage>`__ to produce a JSON description of this plugin, which can be uploaded to ChRIS.
docker run --rm docker.io/fnndsc/pl-spleendata:1.2.3 chris_plugin_info -d docker.io/fnndsc/pl-spleendata:1.2.3 > chris_plugin_info.json
Intructions on how to upload the plugin to ChRIS can be found here: https://chrisproject.org/docs/tutorials/upload_plugin
Metadata
Release files for spleendata 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| spleendata-1.0.10.tar.gz | 6.8 kB | Without provenance | Details |
Release files / spleendata-1.0.10.tar.gz
| Download URL | spleendata-1.0.10.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15f839b31360fe2c9cafbd814050f826f26f5850be3a7a925917244d677493db
|
|
BLAKE2b-256 checksum How to use checksums |
a8a87ad34912c8b7b1a1f4abe90421c858e1c8d9b558d896955a3a90bba1fe81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for spleendata 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.