Skip to main content

Obsessively precise utilities for array manipulation, GPU dispatch, image I/O, morphology, and plotting.

Project description

ocdkit

Obsessively precise utilities for scientific Python — array manipulation, GPU dispatch, image I/O, spatial operations, morphology, and plotting.

Install

pip install ocdkit             # core (numpy, scipy, scikit-image, tifffile, matplotlib)
pip install ocdkit[torch]      # + PyTorch GPU support
pip install ocdkit[plot]       # + ncolor, cmap, opt_einsum
pip install ocdkit[spatial]    # + numba, fastremap (contour extraction, skeletonization)
pip install ocdkit[all]        # everything

Modules

Module What's in it
ocdkit.array rescale, safe_divide, is_integer, get_module, unique_nonzero
ocdkit.gpu resolve_device, empty_cache, torch_GPU, torch_CPU
ocdkit.io imread, imwrite, getname, check_dir
ocdkit.spatial kernel_setup, get_neighbors, get_neigh_inds, masks_to_affinity, get_contour, boundary_to_masks
ocdkit.morphology find_boundaries, skeletonize
ocdkit.measure crop_bbox, bbox_to_slice, make_square, diameters
ocdkit.plot figure, image_grid, split_list, colorize, rgb_flow, vector_contours, apply_ncolor, color_swatches, recolor_label, add_label_background

Quick start

from ocdkit.array import rescale
from ocdkit.gpu import resolve_device
from ocdkit.plot import figure, image_grid

device = resolve_device()  # auto-detect CUDA / MPS / CPU

License

BSD-3-Clause

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocdkit-0.0.1.tar.gz (86.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocdkit-0.0.1-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

File details

Details for the file ocdkit-0.0.1.tar.gz.

File metadata

  • Download URL: ocdkit-0.0.1.tar.gz
  • Upload date:
  • Size: 86.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for ocdkit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 da3ca562e263f2e3f49108f142a2899656401b288f933b9572cc0a3e886bf8f0
MD5 f4a06cc848ee1124d84ec499ae9fd7d5
BLAKE2b-256 d9d57f109af0bbff567a15c772c3f5f2dc6ed6022c4654dc26c0b7ae982c08dc

See more details on using hashes here.

File details

Details for the file ocdkit-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: ocdkit-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 71.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for ocdkit-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fac89107ff995eb124070dca321bbae1cb8b1c284a3d2175d3bf16b64a1bf45
MD5 b17b55f15a50e90ec77071fa3745ca42
BLAKE2b-256 ed05c1b19b9ad9b0d51c7d1a24ec8b2ab4af559afa63ae2d53be7461eb13041f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page