Coorx
Coorx implements object-oriented linear and nonlinear coordinate system transforms. Optionally, coorx also keeps track of a graph of coordinate systems (such as a scene graph) that are connected by transforms, allowing automatic mapping between coordinate systems.
- A collection of different types of coordinate system transform classes with unit test coverage
- Easy methods for mapping coordinate data through these transforms
- Transform composition and simplification
- Transforms intelligently map data types including numpy arrays, lists, etc.
- Automatic generation of composite transforms from a coordinate system graph
- Coordinate arrays that know which coordinate system they live in to handle automatic mapping
- Using named coordinate systems, coorx warns you wnen you try to map data through the wrong transform
- Automatic conversion of (some) transforms between ITK, Qt, scikit-image, and vispy
Installation
To install the package from PyPI, use the following command:
pip install coorx
Usage
Scale and translate 2D coordinates:
import numpy as np
from coorx import STTransform
coords = np.array([
[ 0, 0],
[ 1, 2],
[20, 21],
])
tr = STTransform(scale=(10, 1), offset=(5, 5))
print(tr.map(coords))
Compose multiple transforms together:
import numpy as np
from coorx import STTransform, AffineTransform, CompositeTransform
coords = np.array([
[0, 0, 0],
[1, 2, 3],
[-10, -200, -3000],
])
tr1 = STTransform(scale=(1, 10, 100))
tr2 = AffineTransform(dims=3)
tr2.rotate(90, axis=(0, 0, 1))
tr3 = CompositeTransform([tr2, tr1])
print(tr3.map(coords))
Local CI
To run GitHub Actions workflows locally with act, first build the runner image once:
docker build -t coorx-act-runner -f .github/act-ubuntu.dockerfile .github/
Then run act as normal; .actrc maps ubuntu-latest to this image.
Todo
- import bilinear, SRT transforms from pyqtgraph
- import coordinate system graph handling from vispy
- make coordinate system dimensionality explicit
- unit tests against ITK output
Credit
Coorx is adapted from code originally written for VisPy (vispy.org), inspired by the nice transform classes in ITK, and maintained by the Allen Institute for Brain Science.
Metadata
Release files for coorx 3.0.0
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 |
|---|---|---|---|---|
| coorx-3.0.0.tar.gz | 46.5 kB | With provenance | Details for coorx-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coorx-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for coorx-3.0.0-py3-none-any.whl |
Total release size: 97.5 kB
Release files / coorx-3.0.0.tar.gz
| Download URL | coorx-3.0.0.tar.gz |
|---|---|
| Size | 46.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96bb37186c6b27424777b9f6eea89d7f9bad4d4f5ca9b4c05e2ed63bf7515177
|
|
BLAKE2b-256 checksum How to use checksums |
14b85b17183296bf2973197ef5e6714a11e92d7c2530f7fe5384a827432f56d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / coorx-3.0.0-py3-none-any.whl
| Download URL | coorx-3.0.0-py3-none-any.whl |
|---|---|
| Size | 51.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9d9f75491a42a8422b966717ff7946ac0739cf2bc1b916f8503f0fcf64f9a33
|
|
BLAKE2b-256 checksum How to use checksums |
8a47d8b82c5cea615acb496402448c651d90c1e672efb9cc6ac20de7e5da08c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for coorx 3.0.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for coorx-3.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA 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.