GithubHelp home page GithubHelp logo

jni / i2k-skimage-napari Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 6.0 66.89 MB

Repository for the scikit-image, napari, & friends tutorial at I2K 2020

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

Makefile 0.18% Jupyter Notebook 99.82%

i2k-skimage-napari's Introduction

i2k-skimage-napari

Repository for the scikit-image, napari, & friends tutorial at I2K 2020

Installation

with conda

Use:

conda env create -f environment.yml

then

conda activate i2k

with pip

In an environment including pip, use:

pip install -U -r requirements.txt

We recommend that you use Python 3.8 for this tutorial. Both 3.7 and 3.9 should also work but have not been tested.

Datasets

For the dask tutorial, we are going to be using some 3D + t datasets from the Cell Tracking Challenge, specifically:

i2k-skimage-napari's People

Contributors

jni avatar sofroniewn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

i2k-skimage-napari's Issues

lesson 3 - datasize

we might want to downsample the embryo by default by a factor of 4 to avoid

viewer = napari.view_image(embryo[:, :, ::2, ::2])

as i was running into this issue napari/napari#1507 otherwise!!

lesson 2 denoised call

denoised call should probably live under thresholding section not above as it is first used there

image

filters are "acausal"

filters are looking into the future to define value at the present, see
image

I know there's all sorts of ways of dealing with this stuff, but it just feels a bit odd to teach this way

Use np.convolve whole time

Can we just use np.convolve the whole time, I don't think the added explanation of correlate adds much and will only serve to confuse (i didn't appreciate this before looking at example). We can add a - sign to the kernel if we want

image

lesson 4 - dask impossible image

i'd make the impossible image longer timeseries and smaller in x and y to make scrolling through it a better experience

instead of
image

impossible_image = da.random.random(
    (80_000, 2048, 2048),
    chunks=(1, 1024, 1024),
)

filters is not defined

in around the 9th code cell of 2_segmentation..., filters is not defined yet at edges = filters.scharr(nuclei)

lesson 2 adding points with scale

maxima = morphology.local_maxima(transformed)
viewer.add_points(
    np.transpose(np.nonzero(maxima)),
    scale=spacing, # don't forget scale
    name='bad points',
    size=4,
    n_dimensional=True,
)

the above works nicely, not the use of scale, n_dimensional=True all to make 2D rendering look nice too, and the slightly larger size

consider using viewer.window.activate()

in, for instance, the magicgui example, the window is shown behind the browser window. Some users might not realize it has done anything at all ... consider using viewer.window.activate() to bring the window to the front:

for example, in filter_interactive_demo:

    ...
    viewer.window.add_dock_widget(widget)
    viewer.window.activate()
    return viewer, widget

convolution commutative

Actually, it turns out that we can do it in any order (convolution is `associative`), so we can create a filter that combines both the difference and the mean.

I think you want commutative above instead of associative, both are true, but commutativity is the relevant one here

io is not defined

in around the 4th code cell of 2_segmentation_and_regionprops, at nuclei = io.imread('../images/cells.tif') ... io is not defined

lesson 2 ndisplay

viewer.ndisplay doesn't do anything, not needed, isn't part of napari API

image

ndi not defined

in 1_image_filters ndi is used before it's defined ... around cell ~20

noisy_change = ndi.correlate(noisy_signal, np.array([-1, 0, 1]))
fig, ax = plt.subplots()
ax.plot(noisy_signal, label='signal')
ax.plot(noisy_change, linestyle='dashed', label='change')
ax.legend(loc='upper left')
ax.margins(0.1)

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-20-0ea399531763> in <module>
----> 1 noisy_change = ndi.correlate(noisy_signal, np.array([-1, 0, 1]))
      2 fig, ax = plt.subplots()
      3 ax.plot(noisy_signal, label='signal')
      4 ax.plot(noisy_change, linestyle='dashed', label='change')
      5 ax.legend(loc='upper left')

NameError: name 'ndi' is not defined

(note, it is later imported import scipy.ndimage as ndi ... but you must also have it in your auto-imports)

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.