Skip to content

Commit

Permalink
Merge 4cfba36 into 562536a
Browse files Browse the repository at this point in the history
  • Loading branch information
tddough98 committed Dec 17, 2020
2 parents 562536a + 4cfba36 commit 9865d4d
Show file tree
Hide file tree
Showing 46 changed files with 2,509 additions and 1,575 deletions.
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ Before sending your pull requests, make sure you have followed this list.

### Contributing code

If you have improvements to Caliban, please send us your pull requests! If you are new to the process, Github has a
If you have improvements to DeepCell Label, please send us your pull requests! If you are new to the process, Github has a
[how-to](https://help.github.com/articles/using-pull-requests/).

If you want to contribute, start working through the codebase. Navigate to the
[Github "issues" tab](https://github.com/vanvalenlab/caliban/issues) and start
[Github "issues" tab](https://github.com/vanvalenlab/deepcell-label/issues) and start
looking through interesting issues. If you are not sure of where to start, look for one of the smaller/easier issues here i.e.
[issues with the "good first issue" label](https://github.com/vanvalenlab/caliban/labels/good%20first%20issue)
[issues with the "good first issue" label](https://github.com/vanvalenlab/deepcell-label/labels/good%20first%20issue)
and then take a look at the
[issues with the "contributions welcome" label](https://github.com/vanvalenlab/caliban/labels/stat%3Acontributions%20welcome).
[issues with the "contributions welcome" label](https://github.com/vanvalenlab/deepcell-label/labels/stat%3Acontributions%20welcome).
These are issues that we believe are well suited for outside contributions. If you decide to start on an issue, leave a comment so that other people know that you're working on it. If you want to help out, but not alone, use the issue comment thread to coordinate.

### Contribution guidelines and standards

Before sending your pull request for
[review](https://github.com/vanvalenlab/caliban/pulls),
[review](https://github.com/vanvalenlab/deepcell-label/pulls),
make sure your changes are consistent with the guidelines and follow the
DeepCell coding style.

Expand All @@ -40,8 +40,8 @@ DeepCell coding style.
changes to lower the maintenance cost.
* Bug fixes also generally require unit tests, because the presence of bugs
usually indicates insufficient test coverage.
* When you contribute a new feature to Caliban, the maintenance burden is
(by default) transferred to the Caliban team. This means that the benefit
* When you contribute a new feature to DeepCell Label, the maintenance burden is
(by default) transferred to the DeepCell Label team. This means that the benefit
of the contribution must be compared against the cost of maintaining the
feature.
* As every PR requires CI/CD testing, we discourage
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ Annotation mode focuses on using an adjustable brush to modify annotations on a

*n* - change brush label to an unusued label, so that a new label can be created with a unique id. Can be used with conversion brush to overwrite existing label with unused label (follow conversion brush prompt).

*p* - color picker (click on a label to change the brush value to it)
*p* - color picker (click on a label to change the brush label to it)

*r* - turn on "conversion brush" setting, which changes brush behavior so that one label value is overwritten with another label value. No other labels are affected, and conversion brush will not draw on background. After turning on conversion brush, click on cell labels as prompted to set brush values.
*r* - turn on "conversion brush" setting, which changes brush behavior so that one label value is overwritten with another label value. No other labels are affected, and conversion brush will not draw on background. After turning on conversion brush, click on cell labels as prompted to set brush labels.

*t* - threshold to predict annotations based on brightness. After turning this on, click and drag to draw a bounding box around the cell you wish to threshold. Make sure to include some background in the bounding box for accurate threshold predictions. Whatever was thresholded as foreground within the bounding box will be added to the annotation as a new cell with unique label.

Expand All @@ -88,7 +88,7 @@ Annotation mode focuses on using an adjustable brush to modify annotations on a

**To pan in image:** Hold down the spacebar while clicking and dragging image to pan. Alternatively, the keys *home, page up, page down, and end* can be used to jump across the screen. Holding the shift key while using these pan buttons will result in a smaller jump; holding the control key will snap to the edge of the image.

*h* - switch between highlighted mode and non-highlighted mode (highlight exists in label- and pixel-editing modes but is displayed differently; label-editing highlighting recolors solid label with red, pixel-editing highlighting adds white or red outline around label in image). Once highlight mode is on, use *[ (left bracket) / ] (right bracket)* to decrement/increment selected cell label number.
*h* - switch between highlighted mode and non-highlighted mode (highlight exists in whole-label mode and paint mode but is displayed differently; label-editing highlighting recolors solid label with red, paint mode highlighting adds white or red outline around label in image). Once highlight mode is on, use *[ (left bracket) / ] (right bracket)* to decrement/increment selected cell label number.

*shift+h* - switch between showing and hiding annotation masks in the pixel editor

Expand All @@ -106,7 +106,7 @@ Annotation mode focuses on using an adjustable brush to modify annotations on a

*shift + ↓ / ↑* - cycle between colormaps for viewing raw images (does not apply to pixel editor)

*e* - toggle annotation mode between pixel-editing and whole-label-editing (when nothing else selected)
*e* - toggle annotation mode between paint mode and whole-label mode (when nothing else selected)

*scroll wheel* - change image or annotation maximum brightness

Expand All @@ -132,9 +132,9 @@ To install one, you can go to http://realvnc.com to download a free VNC viewer.
### Build a Docker Container

```bash
git clone https://github.com/vanvalenlab/caliban.git
cd caliban
docker build -t caliban .
git clone https://github.com/vanvalenlab/deepcell-label.git
cd deepcell-label
docker build -t deepcell-label .
```
### Run the New Docker Image

Expand All @@ -143,7 +143,7 @@ docker run \
-p 5900:5900 \
-v $PWD/desktop:/usr/src/app/desktop \
--privileged \
caliban:latest
deepcell-label:latest
```
This will launch a new Docker container and run Xvfb, Fluxbox, and a VNC server. To access the container’s display, point a VNC client to 127.0.0.1.

Expand Down
4 changes: 2 additions & 2 deletions browser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ Annotation mode focuses on using an adjustable brush to modify annotations on a

*n* - change brush label to an unusued label, so that a new cell can be created with a unique id

*p* - color picker (click on a label to change the brush value to it)
*p* - color picker (click on a label to change the brush label to it)

*r* - turn on "conversion brush" setting, which changes brush behavior so that one label value is overwritten with another label value. No other labels are affected, and conversion brush will not draw on background. After turning on conversion brush, click on cell labels as prompted to set brush values. (Eraser mode is automatically turned off when the conversion brush is set.)
*r* - turn on "conversion brush" setting, which changes brush behavior so that one label value is overwritten with another label value. No other labels are affected, and conversion brush will not draw on background. After turning on conversion brush, click on cell labels as prompted to set brush labels. (Eraser mode is automatically turned off when the conversion brush is set.)

*t* - threshold to predict annotations based on brightness. After turning this on, click and drag to draw a bounding box around the cell you wish to threshold. Make sure to include some background in the bounding box for accurate threshold predictions. Whatever was thresholded as foreground within the bounding box will be added to the annotation as a new cell with unique label.

Expand Down
5 changes: 4 additions & 1 deletion browser/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
from flask_cors import CORS
import flask_monitoringdashboard as dashboard
from flask_compress import Compress
from flask_dropzone import Dropzone

import config
from blueprints import bp
from models import db


compress = Compress() # pylint: disable=C0103
dropzone = Dropzone() # pylint: disable=C0103


class ReverseProxied(object):
Expand Down Expand Up @@ -79,6 +81,7 @@ def create_app(**config_overrides):
app.register_blueprint(bp)

compress.init_app(app)
dropzone.init_app(app)

# For flask monitoring dashboard
if config.DASHBOARD_CONFIG:
Expand All @@ -87,7 +90,7 @@ def create_app(**config_overrides):
def group_action():
"""Apply custom grouping for action endpoint"""
from flask import request
if request.endpoint == 'caliban.action':
if request.endpoint == 'label.action':
return request.view_args['action_type']

dashboard.config.group_by = group_action
Expand Down
Loading

0 comments on commit 9865d4d

Please sign in to comment.