Skip to main content

tnia-python

A collection of useful python utilities from True North Intelligent Algorithms

If you need support for the library please post a question on the Image.sc Forum.

This project started as a means for me to test ideas and try out new python libraries. As the number of experiments grew I started organizing things into packages. The library is still in the very early stages of development, and is still lacking documentation, however it's at the point where I find it useful for prototyping bio-image processing protocols.

For now, the user-base of the library is mostly people I am working with directly, teaching to in a course, or discussing image processing problems with online. The helper functions make it quick for me to provide examples of image processing issues I am discussing.

There are useful helper function to

  • show max, sum and slice projections of 3D arrays
  • Generate PSFs with simple API to psfmodels and sdeconv
  • Extract PSFs from a bead image
  • Draw circles and spheres in images to create phantom images
  • Apply a forward imaging model (convolution + noise)

In the coming months and years I plan to keep iterating on the library and making it more usable. Please reach out to me if you have any questions.

Installation

The library covers a lot of ground and most people need one corner of it, so the base install is deliberately small and you add only the parts you want.

pip install tnia-python

That gives you the library and numpy, and nothing else. Pick the extras for the code you actually plan to run:

pip install "tnia-python[plotting]"

(Quotes matter on zsh and macOS, which otherwise treat the brackets as a glob.)

extra installs for
plotting matplotlib, scipy, scikit-image tnia.plotting — xy/zy/xz slices and projections. Also what tnia.deconvolution and tnia.segmentation draw with
io tifffile, scikit-image tnia.io — tiff and raw readers
simulation raster-geometry, scikit-image tnia.simulation — phantoms and test images
deeplearning albumentations, raster-geometry, matplotlib, scikit-image tnia.deeplearning — patch extraction, augmentation, SAM and stardist helpers
machinelearning scikit-image tnia.machinelearning — random forest feature extraction
wavelets PyWavelets tnia.wavelets

Combine them with commas, or take everything at once:

pip install "tnia-python[plotting,io]"
pip install "tnia-python[all]"

[all] is the right choice if you are following along with the notebooks and would rather not work out which example needs what.

If you are upgrading from 0.1.x, [all] is the one you want. Before 0.2.0 every install behaved like [all], so upgrading in place can leave imports failing until you add the extras you need.

Some heavier optional pieces are still installed by hand, because they are platform specific and not on every user's path — clij2-fft and psfmodels for deconvolution and PSF generation, stardist and cellpose for segmentation.

Full instructions, including editable installs and installing from git, are in docs/install.md.

Download files

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

Source Distribution

tnia_python-0.2.2.tar.gz (87.6 kB view details)

Uploaded Source

Built Distribution

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

tnia_python-0.2.2-py3-none-any.whl (112.8 kB view details)

Uploaded Python 3

File details

Details for the file tnia_python-0.2.2.tar.gz.

File metadata

  • Download URL: tnia_python-0.2.2.tar.gz
  • Upload date:
  • Size: 87.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for tnia_python-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7cf547510199f98e4ff133699676ace495df2dd0745e824f117cdc0acf0f57a6
MD5 a4e90c21ff82daab4b6fe999a896d5db
BLAKE2b-256 16173b5abd0bc6b1ab80e2023a87d8bea53854423be66330e9eb4e5632ad5d0c

See more details on using hashes here.

File details

Details for the file tnia_python-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: tnia_python-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 112.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for tnia_python-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4d485de2fa555fd8d2f4b0605e1b7fd75c03a48d97fcdad23546f80f75a1043e
MD5 78522469e6409761e1f19088bdbec911
BLAKE2b-256 d716f301e0c39f423afcbc604bd1db2373ea349458ebb23cec315fdfa95e5b38

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

1 file

Supported by

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