Skip to main content

Obsessive Coder's Dependency Toolkit — Python utilities for array manipulation, GPU dispatch, image I/O, morphology, and plotting.

Project description

ocdkit

Obsessive Coder's Dependency Toolkit — Python utilities for 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.2.tar.gz (86.2 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.2-py3-none-any.whl (71.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ocdkit-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ebc164a575adbc3065e62f4c8c151cdf376ccc1758d32a84b86c301ff87e8ae5
MD5 1e0a97bcb9eb3fe6a67911c321c580fd
BLAKE2b-256 0cc1c4f50c7fc30977b448f7a31022165ba3d62ae4b2e53d9c3677bea5fd6ec4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ocdkit-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b92245ebe20176db2e0a3ec9c254d364aa96afd9262cb11fdc959895e95a7400
MD5 10276498a36146c2699b1c9ac28d66dd
BLAKE2b-256 33dec864d4e3df158b856bb80f790b07566cf2e712d099dbb50d22a2804cddb1

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