{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Napari Manual Segmentation Tutorial" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This notebook demonstrates how to use Napari to manually edit a segmentation. To learn about generating an automatic segmentation and uploading segmentations to the cloud, refer to the segmentation pipeline demo. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ensure Napari is in 2D-slice viewing" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 1. Ensure Napari is in 2D-slice viewing, not 3D view (The second button from the bottom left).\n", "![2D view](assets/2d_view.png \"2D View\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2. Click the image layer and adjust the opacity, contrast limits, and gamma as desired.\n", "![Before adjustment](assets/contrast_1.png \"Before adjustment\")\n", "![After adjustment](assets/contrast_2.png \"After adjustment\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. Click on the layer for your existing automatic segmentation mask.\n", "![Segmentation Layer](assets/labels_1.png \"Segmentation Layer\")\n", "\n", "Alternatively, create a new layer for the segmentation mask.\n", "\n", "![New Labels Layer](assets/new_labels.png \"New Labels Layer\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. Click the paintbrush tool and adjust the brush size. Ensure that \"label\" is set to 1 to paint and 0 to erase.\n", "![Paintbrush Tool](assets/paintbrush.png \"Paintbrush Tool\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. Click and drag on the image to adjust labels. Changes are saved automatically, and CMD-Z to undo is supported.\n", "![Painted Labels](assets/painting.png \"Painted Labels\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }