Giter Site home page Giter Site logo

hanjinliu / impy Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 1.0 32.62 MB

Speed up coding/extending image analysis in Python.

License: BSD 3-Clause "New" or "Revised" License

Python 99.76% Makefile 0.13% Batchfile 0.11%
image-analysis image-processing napari python

impy's Introduction

Hi there ๐Ÿ‘‹

I'm especially interested in image analysis and GUI development.

hanjinliu's GitHub stats Top Langs

impy's People

Contributors

hanjinliu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

impy's Issues

Flexible associable slicing of `ImgArray`

Currently, ImgArray has an attribute labels which is "associable". An associable attribute means that when the ImgArray is sliced the associable attribute will also get sliced at the correct position.

In terms of extensibility, other object should also be compatible with this strategy, such as ROI. All the associable objects should be managed by a list and sliced in _view_labels.

Examples

Following code does not work but clearly implies what should be supported.

img = ip.zeros((100, 100, 100), axes="zyx")  # create an array
img.points = [[10, 20, 30], [60, 50, 40]]
img.points  # Out: Points([[10, 20, 30], [60, 50, 40]])
img[5:].points  # Out: Points([[5, 20, 30], [5, 50, 40]])

`Axes` should support "undef" axis.

In some cases we have to deal with undefined axis.
Axes should support this kind of problem like img.axes = "##yx" suppose the undefined axis is represented by "#".

Examples

  1. Slicing using a list.
img = ip.zeros((10, 10, 100, 100), axes="tzyx")

# This is OK. Result has "tzyx" axes.
img[[3, 6, 9]]

# This is not supported well. Returns an array without axes.
# Ideally, axes should be "#yx"
img[[3, 6, 9], [2, 5, 8]]
  1. Slicing using a binary array
img = ip.zeros((10, 10, 100, 100), axes="tzyx")

# This is OK. Result has "tzyx" axes.
sl = np.random.random((10,)) > 0.5
img[sl]

# This is not supported well. Returns an array without axes.
# Ideally, axes should be "#yx"
sl = np.random.random((10, 10)) > 0.5
img[sl]
  1. New axis
img = ip.zeros((10, 10, 100, 100), axes="tzyx")
img[np.newaxis]  # should be "#tzyx"

Refactor arrays

There are many inefficient things in current version.

  • Split image source file path into img.dirpath and img.name is very confusing. Should be img.source or something.
  • img.history should be completely removed. It usually becomes useless after binary operation, stacking or other functions that need more than one image. Stop recording history will also simplify the code a lot.
  • Clearly split metadata related to axes (such as scale and channel names) and image itself (such as source file).
  • Most of the custom napari widgets should be removed because it seems that napari plugin development is so active that people should install what they want. Only those axes and scale related things should be retained on impy side.

Maybe I should create a new repo like Julia's AxesArray to keep things extensible enough, and use impy as an practical extension.

MSVS 16 error impy is not subscriptable

Hi, I have just started out trying to import impy as ip in MSVS 16 2019 with the following statement

import impy as ip

I also tried

from impy import ALL as ip

Both statement fail with VS error that impy is not subscriptable.

Could you please address this issue.

impy-error

My python 3.8 virtual environment is installed under the project repo folders via command line terminal
I have used the command pip install impy-array to install impy in the project's virtual environment.

Thanks for you help

Unnecessary configuration

The folder impy/.vscode/ seems to be unnecessary and includes your personal settings.

I suggest removing this folder from this repository.

Tiled deconvolution

Use map_overlaps to implement tiled Wiener/Lucy deconvolution.

  • PSF should be properly cropped.
  • Parallelize 4D image stack processing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.