Skip to main content

Nyxus

Documentation Status PyPI PyPI Downloads Conda Conda Downloads

Nyxus computes intensity, texture, morphology and image quality features for every region of interest (ROI) in 2D images and 3D volumes: 758 features in all, 539 for 2D images, 213 for 3D volumes and 6 image quality features. It runs from Python or the command line, reads TIFF, OME-TIFF, OME-Zarr, NIfTI and DICOM files (OME-TIFF and OME-Zarr with up to five dimensions), and assembles ROIs that span several image tiles. Each feature's validation against reference tools such as PyRadiomics, MIRP, MATLAB and CellProfiler is listed in the documentation.

ROIs larger than the memory budget are processed out of core when they come from files; which features then keep their in-memory values is listed under large images.

The Nyxus pipeline

Documentation: https://nyxus.readthedocs.io

Installation

pip install nyxus

or

conda install nyxus -c conda-forge

The conda-forge package has no build for Apple Silicon Macs or Linux aarch64; use pip there. On Windows, the PyPI wheels do not read OME-Zarr or compressed NIfTI (.nii.gz), and the conda-forge packages of 0.11.0 need Visual Studio installed (they were built in Debug mode). GPU wheels, the Docker image and building from source are described in Installation.

Quick start

2D, from arrays in memory

import numpy as np
from nyxus import Nyxus

intensity = np.array([[1, 4, 4, 1],
                      [1, 4, 6, 1],
                      [4, 1, 6, 4],
                      [4, 4, 6, 4]], dtype=np.uint16)
labels = np.array([[1, 1, 0, 2],
                   [1, 1, 0, 2],
                   [1, 1, 0, 2],
                   [1, 1, 0, 2]], dtype=np.uint32)

nyx = Nyxus(["*ALL_INTENSITY*"])
features = nyx.featurize(intensity, labels)
print(features[["ROI_label", "MEAN", "MAX"]])

A directory of image files and their label images is featurized with nyx.featurize_directory("intensities/", "labels/").

3D, from volume files

This example writes its volume with tifffile (pip install tifffile).

import numpy as np
import tifffile
from nyxus import Nyxus3D

volume = np.random.default_rng(0).integers(1, 100, size=(8, 32, 32), dtype=np.uint16)
labels = np.zeros_like(volume)
labels[2:6, 8:24, 8:24] = 1
tifffile.imwrite("volume.ome.tif", volume, ome=True, metadata={"axes": "ZYX"})
tifffile.imwrite("labels.ome.tif", labels, ome=True, metadata={"axes": "ZYX"})

nyx = Nyxus3D(["*3D_ALL_INTENSITY*"])
features = nyx.featurize_files(["./volume.ome.tif"], ["./labels.ome.tif"], False)
print(features[["ROI_label", "3MEAN", "3MAX"]])

Command line

The Python packages do not include the command-line program; run it from the Docker image or build it from source (see Installation). The output directory must already exist.

nyxus --features="*ALL_INTENSITY*,*ALL_MORPHOLOGY*" --intDir=/data/int --segDir=/data/seg --outDir=/data/out --outputType=singlecsv

Where to go next

Citing Nyxus

If you use Nyxus in your work, please cite it as described in CITATION.cff; GitHub's Cite this repository button gives APA and BibTeX.

License

Nyxus is released under the MIT License.

Metadata

Release files for nyxus-cuda11x 0.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for nyxus-cuda11x 0.12.1
File Actions
nyxus_cuda11x-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for nyxus_cuda11x-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
nyxus_cuda11x-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for nyxus_cuda11x-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
nyxus_cuda11x-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for nyxus_cuda11x-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
nyxus_cuda11x-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for nyxus_cuda11x-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Total release size: 95.1 MB

Release files / nyxus_cuda11x-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nyxus_cuda11x-0.12.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 23.8 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b913e5a39cae268586d2123c7e48f5e5e90a53f024bd3b64c80d9af8e36df943
BLAKE2b-256 checksum
How to use checksums
2e30f318ecb75a58525b8230fbeef2f5657b572cbb698a0139f04c6435b1e2de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / nyxus_cuda11x-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nyxus_cuda11x-0.12.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 23.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
091bd62d1758a2f24ac80630857b377baf213e336f16d1ba50eb91f843fe1b56
BLAKE2b-256 checksum
How to use checksums
4cdd7482a9b380087acafe94060975e397bf803cacfc2876a38e35635bd0ce1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / nyxus_cuda11x-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nyxus_cuda11x-0.12.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 23.8 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
00beea51852885abaf70ea19d0470ac0258f9a645f357e2c2c657f6e5e9a4f40
BLAKE2b-256 checksum
How to use checksums
c7256ae82da9089109bb69d5075dee4bbf8136cf38fc45109c245f8f6bff22a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / nyxus_cuda11x-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL nyxus_cuda11x-0.12.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 23.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
a470fdf99de991cfb2ce3947848e2da0e1f58959b5aef889df544a87b5a729a0
BLAKE2b-256 checksum
How to use checksums
e1bba6bfe3d2f067c76998d01d8fe08ff15582f484b8ce0666d235c9bf0b5351
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for nyxus-cuda11x 0.12.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page