{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Segmentation \n", "\n", "in this tutorial:\n", "\n", "- [x] automatic segmentation methods \n", "- [x] manual segmentation from mask\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Segmentation allow us to subset or partition an image to multiples segments or regions that we can isolate in our analysis pipeline for further processing. In the next example we will see how to perform segmentation of the four heart views from our panoramic image in an automatic and manual fashion." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Automatic segmentation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We will see how to perform automatic segmentation via two methods: threshold triangle and the GHT (Generalized Histogram Threshold) algorithm. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![plot viewer](/_static/auto_segmentation_two_methods.gif)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note from the previous example that the first method does not manage to properly detect the silhouette of the different heart views, while the last method almost perfectly capture the four heart shapes. The operation return a label layer called by default `Heart_labels_NullBckgrnd` which is the mask used for segmentation, and the segmented image. Note that you can return only the mask or return an inverted mask if you wish by selecting the alternative options displayed in the panel. The `region_base` method is currently not in maintenance so is not encouraged to be used." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Manual segmentation" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The manual segmentation relies in the previous existence of a mask. You can create a mask yourself or edit an existing one for later use it with the manual segmentation method as shown bellow. \n", "\n", "In the following demonstration we will use the mask we just created at the [automatic segmentation tutorial](segmentation.ipynb#automatic-segmentation), edit it and use it for segmenting the last resulting filtered image from the previous [filter tutorial](filter.ipynb#temporal-filters)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "![plot viewer](/_static/manual_segmentation.gif)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "roi_plugin_test", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11.11" } }, "nbformat": 4, "nbformat_minor": 2 }