Skip to content

Commit

Permalink
add manual geometry examples
Browse files Browse the repository at this point in the history
  • Loading branch information
StojiljkovicVetAna committed Sep 15, 2023
1 parent b106fe8 commit 0863966
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
Binary file removed docs/images/manual_polygon.png
Binary file not shown.
Binary file added docs/images/manual_rectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/manual_rectangle_cut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 46 additions & 5 deletions docs/instructions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"source": [
"from IPython.display import Image\n",
" from IPython.display import Image\n",
"import napari\n",
"from napari.utils.notebook_display import nbscreenshot\n",
"import warnings\n",
Expand Down Expand Up @@ -143,7 +143,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### radial sector\n",
"### Radial sector\n",
"Parameters:\n",
"- *sector width* is the radius of each sector\n",
"- *number of sectors* defines how many sectors will compose this geometry\n",
Expand Down Expand Up @@ -177,7 +177,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### angular sector\n",
"### Angular sector\n",
"Parameters:\n",
"- *angle width* is represented in degrees, and its range is 1-360°\n",
"- *sector radius* is the radius of the circle that will be generated\n",
Expand Down Expand Up @@ -230,7 +230,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### annular sector\n",
"### Annular sector\n",
"This geometry is very similar to the angular sector but it is annular, so that you will need to setup the thickness of the generated ring. \n",
"\n",
"Parameters:\n",
Expand All @@ -239,6 +239,47 @@
"- *ring width* determines the thickness of the ring"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Manual sector\n",
"This option allows you to slightly customize the mask that you want to apply to measure intensities. If none of the three geometries fits your data you can try to adjust this by manually adding a shape.\n",
"\n",
"First add a napari shape layer by pressing \"Add manual shape\". This will create a \"shapes\" layer. You can now select the tool that you would like to use, from the shape layer toolbox. For example you could create a rectangle.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{image} images/manual_rectangle.png \n",
":alt: manual rectangle on top of a radial mask\n",
":class: bg-primary\n",
":width: 300px\n",
":align: center\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Then select the mask that you would like to cut with the given shape. In the example it was a radial mask with 5 sectors. By pressing the \"Generate manual sector!\" button, the new mask should be added as a napari label layer."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{image} images/manual_rectangle_cut.png \n",
":alt: manual geometry\n",
":class: bg-primary\n",
":width: 300px\n",
":align: center\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -252,7 +293,7 @@
"metadata": {},
"source": [
"## 5. Select the sector mask to apply:\n",
"In step 5, you might have generated different sectors, therefore here you need to select which mask will be used to calculate the intensities. \n",
"In step 3, you might have generated different sectors, therefore here you need to select which mask will be used to calculate the intensities. \n",
"\n",
"```{warning}\n",
"Here is where the 'mask' filtering is applied, your mask will be displayed in this drop-down menu, only if it contains the word 'mask'. Please, even if you decide to rename this layer, keep the word \"mask\" in the new name.\n",
Expand Down

0 comments on commit 0863966

Please sign in to comment.