armcrop
This package contains a machine learning model that can crop a CT scan to any of the following classes:
- clavicle
- scapula
- humerus
- radius_ulna
- hand
It can do both axis aligned cropping and oriented bounding box (obb) cropping. The obb cropping allows for rigid registration of CT scans.
This model was trained on arm only scans and proximal half chest scans. A limitation of this model is that when using a full chest CT where the spine is present the model will struggle to differentiate between it and the scapula.
Installation
To use CPU execution install with:
pip install armcrop
To use CUDA execution you will need to also install torch and onnxruntime-gpu.
Usage
import armcrop
import SimpleITK as sitk
# load CT scan
volume = sitk.ReadImage("path/to/ct_scan.nrrd")
# Oriented Bounding Box Cropping
cropper = armcrop.CropOrientedBoundingBox(volume)
cropped_images = cropper.process(bone="humerus")
for i, img in enumerate(cropped_images):
sitk.WriteImage(img, f"aligned_humerus-{i}.nrrd")
# Bounding Box Cropping
cropper = armcrop.Crop(volume)
output = cropper.process(bone="scapula")
for i, img in enumerate(output):
sitk.WriteImage(img, f"cropped_scapula-{i}.nrrd")
Metadata
Release files for armcrop 1.2.1
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 | Actions |
|---|---|---|---|---|
| armcrop-1.2.1.tar.gz | 14.6 kB | Without provenance | Details for armcrop-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| armcrop-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for armcrop-1.2.1-py3-none-any.whl |
Total release size: 31.6 kB
Release files / armcrop-1.2.1.tar.gz
| Download URL | armcrop-1.2.1.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49b418d7bccc419b19ce63c48ab0c38e41b48f7bf551d03e46c5115720361944
|
|
BLAKE2b-256 checksum How to use checksums |
fa70daf8b9e07983e8cf56103d3f191759b88b062314e50b0fe7c5833d23929c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.7 Linux/6.11.0-26-generic
|
Release files / armcrop-1.2.1-py3-none-any.whl
| Download URL | armcrop-1.2.1-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76455a365795ad875aa4c7053c2a2725c611c1cef501d4d4d52edb746e6378b6
|
|
BLAKE2b-256 checksum How to use checksums |
6a2b0e306f0cd1a3262e841365b70af8ff470053e10fc982fe513b13d4fe13ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.12.7 Linux/6.11.0-26-generic
|
Security for armcrop 1.2.1
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.