diff --git a/doc/MorphoLibJ-manual/MorphoLibJ-manual.lyx b/doc/MorphoLibJ-manual/MorphoLibJ-manual.lyx index 02144cd4..303676b5 100644 --- a/doc/MorphoLibJ-manual/MorphoLibJ-manual.lyx +++ b/doc/MorphoLibJ-manual/MorphoLibJ-manual.lyx @@ -1,5 +1,5 @@ -#LyX 2.3 created this file. For more info see http://www.lyx.org/ -\lyxformat 544 +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 620 \begin_document \begin_header \save_transient_properties true @@ -89,11 +89,11 @@ \usepackage[nohints]{minitoc} \end_preamble \use_default_options true -\maintain_unincluded_children false +\maintain_unincluded_children no \language english \language_package default -\inputencoding auto -\fontencoding global +\inputencoding auto-legacy +\fontencoding auto \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "beramono" "default" @@ -101,7 +101,9 @@ \font_default_family default \use_non_tex_fonts false \font_sc false -\font_osf false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false @@ -127,7 +129,7 @@ \pdf_colorlinks false \pdf_backref false \pdf_pdfusetitle true -\papersize a4paper +\papersize a4 \use_geometry false \use_package amsmath 1 \use_package amssymb 1 @@ -148,7 +150,9 @@ \suppress_date false \justification true \use_refstyle 1 +\use_formatted_ref 0 \use_minted 0 +\use_lineno 0 \index Index \shortcut idx \color #008000 @@ -164,12 +168,17 @@ \papercolumns 1 \papersides 1 \paperpagestyle plain +\tablestyle default \bullet 2 0 10 -1 \tracking_changes false \output_changes false +\change_bars false +\postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false +\docbook_table_output 0 +\docbook_mathml_prefix 1 \end_header \begin_body @@ -182,26 +191,35 @@ status open \backslash -lstset{numbers=left, tabsize=2, frame=single, breaklines=true, basicstyle= +lstset{numbers=left, + tabsize=2, + frame=single, + breaklines=true, + basicstyle= \backslash scriptsize \backslash -ttfamily, aboveskip=5pt} +ttfamily, + aboveskip=5pt} \end_layout \begin_layout Plain Layout \backslash -lstset{language=java, keywordstyle= +lstset{language=java, + keywordstyle= \backslash -bfseries, commentstyle= +bfseries, + commentstyle= \backslash color{OliveGreen} \backslash -itshape, stringstyle= +itshape, + stringstyle= \backslash -color{BrickRed}, showspaces=false} +color{BrickRed}, + showspaces=false} \end_layout \end_inset @@ -214,7 +232,8 @@ MorphoLibJ user manual \end_layout \begin_layout Author -David Legland, Ignacio Arganda-Carreras +David Legland, + Ignacio Arganda-Carreras \end_layout \begin_layout Standard @@ -251,10 +270,9 @@ MorphoLibJ \begin_inset Quotes crd \end_inset - library for ImageJ/Fiji contains a variety of plugins for processing and - analyzing 2D or 3D images. - It was originally designed for the study of plant cell images, but the - algorithms are generic and can be applied to any type of image. + library for ImageJ/Fiji contains a variety of plugins for processing and analyzing 2D or 3D images. + It was originally designed for the study of plant cell images, + but the algorithms are generic and can be applied to any type of image. \end_layout \begin_layout Standard @@ -291,8 +309,7 @@ Overview \end_layout \begin_layout Standard -The library implements several functionalities that were missing in the - ImageJ software ( +The library implements several functionalities that were missing in the ImageJ software ( \begin_inset CommandInset citation LatexCommand citet key "Schneider_2012_nmeth,Schindelin_2012_nmeth" @@ -300,7 +317,8 @@ literal "true" \end_inset -), and that were not or only partially covered by other plugins. +), + and that were not or only partially covered by other plugins. \end_layout @@ -309,8 +327,11 @@ literal "true" \series bold morphological filtering \series default - for 2D/3D and binary or grayscale images: erosion & dilation, closing & - opening, morphological gradient & Laplacian, top-hat... + for 2D/3D and binary or grayscale images: + erosion & dilation, + closing & opening, + morphological gradient & Laplacian, + top-hat... \end_layout \begin_layout Itemize @@ -318,8 +339,11 @@ morphological filtering \series bold morphological reconstruction \series default -, for 2D/3D and binary or grayscale images, allowing fast detection of regional - or extended extrema, removing of borders, or hole filling +, + for 2D/3D and binary or grayscale images, + allowing fast detection of regional or extended extrema, + removing of borders, + or hole filling \end_layout \begin_layout Itemize @@ -327,7 +351,8 @@ morphological reconstruction \series bold watershed segmentation \series default - + GUI, making it possible to segment 2D/3D images of cell tissues + + GUI, + making it possible to segment 2D/3D images of cell tissues \end_layout \begin_layout Itemize @@ -335,7 +360,11 @@ watershed segmentation \series bold 2D/3D measurements \series default -: volume, surface area, bounding boxes, equivalent ellipse/ellipsoid... +: + volume, + surface area, + bounding boxes, + equivalent ellipse/ellipsoid... \end_layout \begin_layout Itemize @@ -355,7 +384,9 @@ literal "false" \end_inset -, and the source code can be found on GitHub: +, + and the source code can be found on GitHub: + \begin_inset CommandInset href LatexCommand href target "http://github.com/ijpb/MorphoLibJ" @@ -364,8 +395,8 @@ literal "false" \end_inset . - The exhaustive code documentation includes many use-case examples, and - can be found online + The exhaustive code documentation includes many use-case examples, + and can be found online \begin_inset Foot status open @@ -410,9 +441,8 @@ Installation in ImageJ \end_layout \begin_layout Standard -To install the MorphoLibJ toolkit in ImageJ, you only need to download the - latest release (in the form of a JAR file) into ImageJ's plugins folder - and restart ImageJ. +To install the MorphoLibJ toolkit in ImageJ, + you only need to download the latest release (in the form of a JAR file) into ImageJ's plugins folder and restart ImageJ. \end_layout @@ -445,8 +475,8 @@ literal "true" \end_inset -), the MorphoLibJ toolkit can be easily installed by adding its update site - to Fiji's list of update sites: +), + the MorphoLibJ toolkit can be easily installed by adding its update site to Fiji's list of update sites: \end_layout \begin_layout Enumerate @@ -478,7 +508,8 @@ Help > Update... \end_layout \begin_layout Enumerate -When the updater is open, click on +When the updater is open, + click on \emph on Manage update sites \emph default @@ -536,7 +567,8 @@ Activate the MorphoLibJ update site and close the dialog. \end_layout \begin_layout Enumerate -Finally, click on +Finally, + click on \emph on Apply changes \emph default @@ -549,9 +581,9 @@ Definitions and data types \end_layout \begin_layout Standard -This chapter recalls some principles from the ImageJ software, summarizes - the vocabulary and definitions used within the library, and presents some - generic concepts about image processing and associated data structures. +This chapter recalls some principles from the ImageJ software, + summarizes the vocabulary and definitions used within the library, + and presents some generic concepts about image processing and associated data structures. \end_layout \begin_layout Standard @@ -587,7 +619,9 @@ Digital images may be defined by a mapping from a pair \end_inset of integer coordinates to a value. - The value may be an integer, a floating point number, a color... + The value may be an integer, + a floating point number, + a color... Image elements are usually refered to as \begin_inset Quotes eld \end_inset @@ -600,7 +634,8 @@ pixels \begin_inset Quotes erd \end_inset -, for +, + for \begin_inset Quotes eld \end_inset @@ -617,8 +652,9 @@ Data types \begin_layout Standard Images are usually represented as 2D arrays of elementary data types. - Within ImageJ, the pixels may be of different types, according to the bit - depth: + Within ImageJ, + the pixels may be of different types, + according to the bit depth: \end_layout \begin_layout Itemize @@ -651,17 +687,21 @@ Images are usually represented as 2D arrays of elementary data types. color images \series default . - Pixels are represented as triplet of red, green and blue components, each - of them ranging between 0 and 255. + Pixels are represented as triplet of red, + green and blue components, + each of them ranging between 0 and 255. \end_layout \begin_layout Itemize -32-bits images contains pixels with floating-points values, possibly negative. +32-bits images contains pixels with floating-points values, + possibly negative. \end_layout \begin_layout Standard -Note that other software may use additionnal data type for representation - of images, such as 32-bits integers, complex values, booleans... +Note that other software may use additionnal data type for representation of images, + such as 32-bits integers, + complex values, + booleans... \end_layout \begin_layout Subsection @@ -669,8 +709,8 @@ Image types \end_layout \begin_layout Standard -Apart from the data type / bit depth, image data may be interpreted in different - ways. +Apart from the data type / bit depth, + image data may be interpreted in different ways. The MorphoLibJ library focusses on the following image types: \end_layout @@ -689,8 +729,10 @@ binary \end_inset images are expected to contain only two possible values. - Within ImageJ, they are represented as 8-bits images containing only two - values: 0 for the background, and 255 for the foreground (See chapter + Within ImageJ, + they are represented as 8-bits images containing only two values: + 0 for the background, + and 255 for the foreground (See chapter \begin_inset space ~ \end_inset @@ -701,6 +743,7 @@ reference "chap:Binary-Images" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -713,9 +756,10 @@ intensity \begin_inset space ~ \end_inset -images may correspond to any types that can be interpreted as a single scalar - value. - They can be represented with 8-bits, 16-bits, or 32-bits images. +images may correspond to any types that can be interpreted as a single scalar value. + They can be represented with 8-bits, + 16-bits, + or 32-bits images. \end_layout @@ -728,8 +772,7 @@ images (also called \series bold label maps \series default -) contains values that can be interpreted as the label or index of a region - (See chapter +) contains values that can be interpreted as the label or index of a region (See chapter \begin_inset space ~ \end_inset @@ -740,14 +783,17 @@ reference "chap:label-images" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ). - The label 0 usually refer to the background (i.e., no region). - Label images can be represented using 8-bits, 16-bits, or 32-bits images. - Binary images can be seen as a special case of label images that contain - only one label. + The label 0 usually refer to the background (i.e., + no region). + Label images can be represented using 8-bits, + 16-bits, + or 32-bits images. + Binary images can be seen as a special case of label images that contain only one label. \end_layout \begin_layout Subsection @@ -755,10 +801,10 @@ noprefix "false" \end_layout \begin_layout Standard -Most algorithms from mathematical morphology (and more generally, many image - processing algorithms) extends naturally from two dimensions to three dimension -s. - Within ImageJ, 3D images are represented as +Most algorithms from mathematical morphology (and more generally, + many image processing algorithms) extends naturally from two dimensions to three dimensions. + Within ImageJ, + 3D images are represented as \begin_inset Quotes eld \end_inset @@ -770,7 +816,8 @@ image stacks \begin_inset Quotes erd \end_inset -, seen as stacks of 2D arrays. +, + seen as stacks of 2D arrays. Elements of a 3D image are usually refered to as \begin_inset Quotes eld \end_inset @@ -783,7 +830,8 @@ voxels \begin_inset Quotes erd \end_inset -, for volumetric picture element. +, + for volumetric picture element. \end_layout @@ -798,8 +846,8 @@ Images usually refer to data obtained on some physical sample. \end_inset coordinates of a pixel to its physical location. - Image pixel values may be seen as sampled on a discrete grid, defined by - an origin (the coordinates of the + Image pixel values may be seen as sampled on a discrete grid, + defined by an origin (the coordinates of the \begin_inset Formula $(0,0)$ \end_inset @@ -811,11 +859,13 @@ Images usually refer to data obtained on some physical sample. Several software consider the pixel centers to be located on the grid vertices, i.e. pixels have integer coordinates. - Within ImageJ, the origin pixel is located at the point + Within ImageJ, + the origin pixel is located at the point \begin_inset Formula $(0.5,0.5)$ \end_inset -, i.e. +, + i.e. it occupies the space of the square with corners \begin_inset Formula $(0,0)$ \end_inset @@ -829,8 +879,7 @@ Several software consider the pixel centers to be located on the grid vertices, \end_layout \begin_layout Standard -This notion of coordinate system is necessary to interpret the results obtained - with region analysis algorithms (see section +This notion of coordinate system is necessary to interpret the results obtained with region analysis algorithms (see section \begin_inset space ~ \end_inset @@ -841,6 +890,7 @@ reference "sec:Region-Analysis" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -862,16 +912,18 @@ name "sec:Digital-Connectivity" \end_layout \begin_layout Standard -When reconstructing structures or regions from digital images, it is often - necessary to define an +When reconstructing structures or regions from digital images, + it is often necessary to define an \series bold adjacency relationship \series default -, or +, + or \series bold connectivity \series default -, between pixels of voxels +, + between pixels of voxels \begin_inset CommandInset citation LatexCommand citep key "Rosenfeld_1970_ACM,Serra_1982,Kong_1989_CVGIP,Soille_2003" @@ -880,8 +932,7 @@ literal "false" \end_inset . - The notion of connectivity determines the result of many algorithms such - as connected component labeling (see Section + The notion of connectivity determines the result of many algorithms such as connected component labeling (see Section \begin_inset space ~ \end_inset @@ -892,10 +943,12 @@ reference "sec:Connected-Components-Labeling" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -), or the result of image quantification based on Euler number (see Section +), + or the result of image quantification based on Euler number (see Section \begin_inset space ~ \end_inset @@ -906,6 +959,7 @@ reference "subsec:Digital-Euler-Number" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -917,9 +971,9 @@ noprefix "false" \end_layout \begin_layout Standard -For planar images, typical choices are the 4- and the 8-connectivities. - The 4-connectivity considers only the orthogonal neighbors of a given pixel - (Figure +For planar images, + typical choices are the 4- and the 8-connectivities. + The 4-connectivity considers only the orthogonal neighbors of a given pixel (Figure \begin_inset space ~ \end_inset @@ -930,6 +984,7 @@ reference "fig:Digital-connectivities-2D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -945,6 +1000,7 @@ reference "fig:Digital-connectivities-2D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -954,6 +1010,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -961,6 +1019,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -992,6 +1052,8 @@ status open \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1048,11 +1110,10 @@ Digital connectivities for 2D images \end_layout \begin_layout Standard -The discrete nature of images results in potential problems when considering - geometric properties on reconstructed structures. - A typical example is the Jordan curve theorem, which states than any curve - of the plane that do not self-intersects divides the plane into exactly - two regions: one interior and one exterior (Figure +The discrete nature of images results in potential problems when considering geometric properties on reconstructed structures. + A typical example is the Jordan curve theorem, + which states than any curve of the plane that do not self-intersects divides the plane into exactly two regions: + one interior and one exterior (Figure \begin_inset space ~ \end_inset @@ -1063,6 +1124,7 @@ reference "fig:Jordan-Curve-Theorem" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -1072,6 +1134,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1079,6 +1143,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1110,6 +1176,8 @@ Continuous curve \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1153,8 +1221,7 @@ name "fig:Jordan-Curve-Theorem" \end_inset Jordan curve theorem in continuous plane and in digital plane. - The digitization of a 4-connected curve results in the creation of two - inner regions that are not 4-connected. + The digitization of a 4-connected curve results in the creation of two inner regions that are not 4-connected. \end_layout \end_inset @@ -1169,8 +1236,8 @@ Jordan curve theorem in continuous plane and in digital plane. \begin_layout Standard When choosing a digital connectivity and considering reconstructed curves, - the theorem is not always true, as a 4-connected curve may create several - disconnected interior regions (Figure + the theorem is not always true, + as a 4-connected curve may create several disconnected interior regions (Figure \begin_inset space ~ \end_inset @@ -1181,14 +1248,16 @@ reference "fig:Jordan-Curve-Theorem" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). - The common solution is to consider pairs of adjacencies, one for the foreground - (here the curve), and one for the background. - One can check that the two interior regions are 8-connected, making the - Jordan curve theorem valid for the (4,8)-adjacency pair. + The common solution is to consider pairs of adjacencies, + one for the foreground (here the curve), + and one for the background. + One can check that the two interior regions are 8-connected, + making the Jordan curve theorem valid for the (4,8)-adjacency pair. \end_layout \begin_layout Subsection @@ -1196,9 +1265,9 @@ noprefix "false" \end_layout \begin_layout Standard -In 3D, two connectivities are commonly used. - The 6-connectivity considers only orthogonal neighbors of the center voxel - along the three principal directions (Figure +In 3D, + two connectivities are commonly used. + The 6-connectivity considers only orthogonal neighbors of the center voxel along the three principal directions (Figure \begin_inset space ~ \end_inset @@ -1209,6 +1278,7 @@ reference "fig:Digital-connectivities-3D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -1228,12 +1298,13 @@ reference "fig:Digital-connectivities-3D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). - As for the 2D case, one often considers pairs of complementary adjacencies - for the foreground and for the background + As for the 2D case, + one often considers pairs of complementary adjacencies for the foreground and for the background \begin_inset CommandInset citation LatexCommand citep key "Kong_1989_CVGIP,Ohser2009" @@ -1246,6 +1317,8 @@ literal "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1306,10 +1379,9 @@ name "chap:Morphological-Filtering" \end_layout \begin_layout Standard -Morphological filters are very common filters that can be combined together - to provide large variety of solutions. - They are local filters, in the sense they consider the neighborhood of - each pixel/voxel. +Morphological filters are very common filters that can be combined together to provide large variety of solutions. + They are local filters, + in the sense they consider the neighborhood of each pixel/voxel. \end_layout @@ -1341,8 +1413,7 @@ Principles \end_layout \begin_layout Standard -The original idea was to define a methodology to describe shapes by using - another shape as test probe +The original idea was to define a methodology to describe shapes by using another shape as test probe \begin_inset CommandInset citation LatexCommand citep key "Serra_1982,Serra_1992_cssp" @@ -1356,9 +1427,9 @@ literal "true" structuring element \series default . - Common structuring element include squares, discrete disks and octagons. - Linear structuring element of various orientations may also be used to - assess local orientation of the structures. + Common structuring element include squares, + discrete disks and octagons. + Linear structuring element of various orientations may also be used to assess local orientation of the structures. \end_layout @@ -1372,8 +1443,8 @@ morphological dilation morphological erosion \series default . - The principle of morphological dilation is to test for each point of the - plane, if the structuring element centred on this point + The principle of morphological dilation is to test for each point of the plane, + if the structuring element centred on this point \series bold intersects \series default @@ -1385,6 +1456,7 @@ intersects \begin_inset CommandInset ref LatexCommand ref reference "fig:Principle-Dilation-Erosion" +nolink "false" \end_inset @@ -1394,8 +1466,7 @@ reference "fig:Principle-Dilation-Erosion" \end_layout \begin_layout Standard -The principle of morphological erosion is to test for each point of the - plane if the structuring element centred on this point +The principle of morphological erosion is to test for each point of the plane if the structuring element centred on this point \series bold is contained \series default @@ -1405,6 +1476,8 @@ is contained \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1412,6 +1485,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1447,6 +1522,8 @@ Binary set X and structuring element B \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1478,6 +1555,8 @@ Dilation of X by B \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1520,8 +1599,8 @@ name "fig:Principle-Dilation-Erosion" \end_inset -Principle of morphological dilation and erosion on a binary set, using a - disk-shaped structuring element. +Principle of morphological dilation and erosion on a binary set, + using a disk-shaped structuring element. \end_layout \end_inset @@ -1536,10 +1615,12 @@ Principle of morphological dilation and erosion on a binary set, using a \begin_layout Standard Morphological dilation and erosion change the size and the resulting set. - It may also change its topology: after a dilation, components may merge - and holes be filled. - After an erosion, components may disappear, or components be separated - into several parts. + It may also change its topology: + after a dilation, + components may merge and holes be filled. + After an erosion, + components may disappear, + or components be separated into several parts. \end_layout \begin_layout Section @@ -1547,8 +1628,8 @@ Grayscale morphological filters \end_layout \begin_layout Standard -While originally defined for binary sets, morphological operators are of - great interest when applied to grayscale images. +While originally defined for binary sets, + morphological operators are of great interest when applied to grayscale images. They can be easily be applied for noise reduction (section \begin_inset space ~ \end_inset @@ -1557,10 +1638,12 @@ While originally defined for binary sets, morphological operators are of \begin_inset CommandInset ref LatexCommand ref reference "subsec:Opening-Closing" +nolink "false" \end_inset -), detection of boundary structures (section +), + detection of boundary structures (section \begin_inset space ~ \end_inset @@ -1568,10 +1651,12 @@ reference "subsec:Opening-Closing" \begin_inset CommandInset ref LatexCommand ref reference "subsec:Morphological-Gradient" +nolink "false" \end_inset -), or background removal (section +), + or background removal (section \begin_inset space ~ \end_inset @@ -1579,6 +1664,7 @@ reference "subsec:Morphological-Gradient" \begin_inset CommandInset ref LatexCommand ref reference "subsec:Top-hats" +nolink "false" \end_inset @@ -1601,10 +1687,9 @@ name "subsec:Erosion-Dilation" \begin_layout Standard Morphological erosion and dilation may also be applied on grayscale images. - In that case, the morphological dilation computes for each pixel the maximum - within its neighborhood (defined by the structuring element), whereas the - morphological erosion considers the minimum value within the neighborhood - (Fig + In that case, + the morphological dilation computes for each pixel the maximum within its neighborhood (defined by the structuring element), + whereas the morphological erosion considers the minimum value within the neighborhood (Fig \begin_inset space ~ \end_inset @@ -1612,6 +1697,7 @@ Morphological erosion and dilation may also be applied on grayscale images. \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Dilation-Erosion" +nolink "false" \end_inset @@ -1620,6 +1706,8 @@ reference "fig:Morpho-Dilation-Erosion" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1627,6 +1715,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1658,6 +1748,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1689,6 +1781,8 @@ Morphological dilation \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1732,8 +1826,9 @@ name "fig:Morpho-Dilation-Erosion" \end_inset Some examples of morphological filters on a grayscale image. - Original image, result of dilation with a square structuring element, and - result of erosion with the same structuring element. + Original image, + result of dilation with a square structuring element, + and result of erosion with the same structuring element. \end_layout \end_inset @@ -1747,10 +1842,12 @@ Some examples of morphological filters on a grayscale image. \end_layout \begin_layout Standard -Applying a dilation or an erosion changes the size of the structures in - the image: the grains in the result of the dilated image are larger. - As for binary sets, these operations may also merge, separate, or make - disappear some components of the image. +Applying a dilation or an erosion changes the size of the structures in the image: + the grains in the result of the dilated image are larger. + As for binary sets, + these operations may also merge, + separate, + or make disappear some components of the image. \end_layout \begin_layout Subsection @@ -1773,12 +1870,13 @@ Morphological dilation and erosion are often used in combination for removing noise within images \series default . - For example, the result of a dilation followed by an erosion is called - a + For example, + the result of a dilation followed by an erosion is called a \series bold morphological closing \series default -, and removes dark structures smaller than the structuring element (Figure +, + and removes dark structures smaller than the structuring element (Figure \begin_inset space ~ \end_inset @@ -1786,16 +1884,18 @@ morphological closing \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Opening-Closing" +nolink "false" \end_inset -b). - It can also connect bright structures that were separated by a thin dark - space. + It can also connect bright structures that were separated by a thin dark space. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1803,6 +1903,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1834,6 +1936,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1865,6 +1969,8 @@ Morphological closing \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -1924,8 +2030,8 @@ Grayscale morphological closing and opening. \end_layout \begin_layout Standard -In a symmetric way, the result of an erosion followed by a dilation is called - a +In a symmetric way, + the result of an erosion followed by a dilation is called a \series bold morphological \series default @@ -1933,7 +2039,8 @@ morphological \series bold opening \series default -, and removes bright structures smaller than the structuring element (Figure +, + and removes bright structures smaller than the structuring element (Figure \begin_inset space ~ \end_inset @@ -1941,6 +2048,7 @@ opening \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Opening-Closing" +nolink "false" \end_inset @@ -1949,9 +2057,10 @@ reference "fig:Morpho-Opening-Closing" \end_layout \begin_layout Standard -Note that even if opening and closing preserve the size of the structures - in the original image, their shape is slightly altered. - For example, the morphological closing on Figure +Note that even if opening and closing preserve the size of the structures in the original image, + their shape is slightly altered. + For example, + the morphological closing on Figure \begin_inset space ~ \end_inset @@ -1959,11 +2068,12 @@ Note that even if opening and closing preserve the size of the structures \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Opening-Closing" +nolink "false" \end_inset --b creates artificial connections between grains, whereas the morphological - opening (Figure +-b creates artificial connections between grains, + whereas the morphological opening (Figure \begin_inset space ~ \end_inset @@ -1971,13 +2081,14 @@ reference "fig:Morpho-Opening-Closing" \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Opening-Closing" +nolink "false" \end_inset -c) tends to remove sharp corners of the grains. - Choosing the best size for the structuring element is often a compromise - between noise removal and preservation of shape structure. - In some cases, attribute filtering operators (section + Choosing the best size for the structuring element is often a compromise between noise removal and preservation of shape structure. + In some cases, + attribute filtering operators (section \begin_inset space ~ \end_inset @@ -1985,6 +2096,7 @@ reference "fig:Morpho-Opening-Closing" \begin_inset CommandInset ref LatexCommand ref reference "sec:Attribute-Filtering" +nolink "false" \end_inset @@ -2004,12 +2116,12 @@ Morphological opening and closing are also often used as \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Post-Processing" +nolink "false" \end_inset ). - Segmentation operators such as thresholding often results in many small - components not corresponding to the structures of interest (Figure + Segmentation operators such as thresholding often results in many small components not corresponding to the structures of interest (Figure \begin_inset space ~ \end_inset @@ -2017,6 +2129,7 @@ reference "fig:Morphological-Post-Processing" \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Post-Processing" +nolink "false" \end_inset @@ -2027,6 +2140,8 @@ reference "fig:Morphological-Post-Processing" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2034,6 +2149,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2066,6 +2183,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2098,6 +2217,8 @@ Raw segmentation \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2130,6 +2251,8 @@ Morphological closing \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2176,10 +2299,8 @@ name "fig:Morphological-Post-Processing" Enhancing segmentation with morphological filters. (a) Original image representing a section of maize tissue. (b) Binarisation by thresholding (inverted LUT). - (c) Morphological closing removes most holes within the bundles (inverted - LUT). - (d) Morphological opening removes small dirts outside of vascular bundles - (inverted LUT). + (c) Morphological closing removes most holes within the bundles (inverted LUT). + (d) Morphological opening removes small dirts outside of vascular bundles (inverted LUT). \end_layout @@ -2194,9 +2315,7 @@ Enhancing segmentation with morphological filters. \end_layout \begin_layout Standard -The application of a morphological closing on the binary images allows to - consolidate the structures of interest by removing small holes within them - (Figure +The application of a morphological closing on the binary images allows to consolidate the structures of interest by removing small holes within them (Figure \begin_inset space ~ \end_inset @@ -2204,12 +2323,13 @@ The application of a morphological closing on the binary images allows to \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Post-Processing" +nolink "false" \end_inset -c). - Then, a morphological opening removes the small particles that do not correspon -d to the vascular bundles (Figure + Then, + a morphological opening removes the small particles that do not correspond to the vascular bundles (Figure \begin_inset space ~ \end_inset @@ -2217,6 +2337,7 @@ d to the vascular bundles (Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Post-Processing" +nolink "false" \end_inset @@ -2248,9 +2369,8 @@ morphological gradient \series bold Beucher gradient \series default -) is obtained as the difference of the result of a morphological dilation - with the result of a morphological erosion, both computed with the same - structuring element. +) is obtained as the difference of the result of a morphological dilation with the result of a morphological erosion, + both computed with the same structuring element. It reveals the \series bold boundaries @@ -2263,13 +2383,13 @@ boundaries \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Gradient" +nolink "false" \end_inset -a). - When applied to a binary image, the morphological gradient is a convenient - way to obtain the boundaries of the structures of interest within the image - (Figure + When applied to a binary image, + the morphological gradient is a convenient way to obtain the boundaries of the structures of interest within the image (Figure \begin_inset space ~ \end_inset @@ -2277,6 +2397,7 @@ reference "fig:Morpho-Gradient" \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Gradient" +nolink "false" \end_inset @@ -2285,6 +2406,8 @@ reference "fig:Morpho-Gradient" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2292,6 +2415,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2323,6 +2448,8 @@ Morphological gradient \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2358,6 +2485,8 @@ binary image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2400,8 +2529,7 @@ name "fig:Morpho-Gradient" \end_inset -Some examples of morphological filters resulting from the combination of - elementary morphological filters. +Some examples of morphological filters resulting from the combination of elementary morphological filters. (a) Morphological gradient on a grayscale image. (b) Morphological gradient on the binary image represented in Figure \begin_inset space ~ @@ -2411,6 +2539,7 @@ Some examples of morphological filters resulting from the combination of \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Post-Processing" +nolink "false" \end_inset @@ -2434,8 +2563,8 @@ The \series bold morphological Laplacian \series default - is defined as half the sum of a morphological dilation and a morphological - erosion with the same structuring element, minus the original image. + is defined as half the sum of a morphological dilation and a morphological erosion with the same structuring element, + minus the original image. It results in enhancing the edges of the image (Figure \begin_inset space ~ \end_inset @@ -2444,6 +2573,7 @@ morphological Laplacian \begin_inset CommandInset ref LatexCommand ref reference "fig:Morpho-Gradient" +nolink "false" \end_inset @@ -2470,11 +2600,11 @@ The \series bold white top-hat \series default -operator first computes a morphological opening (resulting in removing bright - structures smaller than structuring elements), and removes the result from - the original image. - When applied with a large structuring element, the result is an homogenization - of the background, making bright structures easier to segment (Figure +operator first computes a morphological opening (resulting in removing bright structures smaller than structuring elements), + and removes the result from the original image. + When applied with a large structuring element, + the result is an homogenization of the background, + making bright structures easier to segment (Figure \begin_inset space ~ \end_inset @@ -2482,6 +2612,7 @@ operator first computes a morphological opening (resulting in removing bright \begin_inset CommandInset ref LatexCommand ref reference "fig:White-TopHat-Grains" +nolink "false" \end_inset @@ -2491,6 +2622,8 @@ reference "fig:White-TopHat-Grains" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2498,6 +2631,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2529,6 +2664,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2560,6 +2697,8 @@ White Top-Hat \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2607,9 +2746,9 @@ name "fig:White-TopHat-Grains" \end_inset Top-hat filtering. - (a) Original grayscale image, showing inhomogeneous background. - (b) Result of the White Top-Hat operator using square with radius 20 as - structuring element. + (a) Original grayscale image, + showing inhomogeneous background. + (b) Result of the White Top-Hat operator using square with radius 20 as structuring element. (c) Profile plots along line region of interest for each image. \end_layout @@ -2624,12 +2763,12 @@ Top-hat filtering. \end_layout \begin_layout Standard -Similarly, the +Similarly, + the \series bold dark top-hat \series default - can be used to enhance dark structures observed on an non-homogeneous backgroun -d. + can be used to enhance dark structures observed on an non-homogeneous background. \end_layout \begin_layout Section @@ -2647,11 +2786,11 @@ name "sec:Directional-Filters" \end_layout \begin_layout Standard -For images containing very thin curvilinear structures (for example blood - vessels, cell wall sections...), the application of common filters may be - difficult due to the small size of the structures. - Even for small structuring elements, the application of a morphological - opening or closing let the structure disappear (Fig. +For images containing very thin curvilinear structures (for example blood vessels, + cell wall sections...), + the application of common filters may be difficult due to the small size of the structures. + Even for small structuring elements, + the application of a morphological opening or closing let the structure disappear (Fig. \begin_inset space ~ \end_inset @@ -2659,22 +2798,28 @@ For images containing very thin curvilinear structures (for example blood \begin_inset CommandInset ref LatexCommand ref reference "fig:Thin-Structure-Filtering" +nolink "false" \end_inset --b, +-b, + \begin_inset CommandInset ref LatexCommand ref reference "fig:Thin-Structure-Filtering" +nolink "false" \end_inset -c). - Moreover, it may be difficult to preserve the whole thickness of the structure. + Moreover, + it may be difficult to preserve the whole thickness of the structure. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2682,6 +2827,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -2713,6 +2860,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2744,6 +2893,8 @@ Gaussian filtering \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2775,6 +2926,8 @@ Median filtering \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2818,8 +2971,7 @@ name "fig:Thin-Structure-Filtering" \end_inset Filtering of a thin structure. - (a) Original image representing apple cells observed with confocal microscopy - + (a) Original image representing apple cells observed with confocal microscopy \begin_inset CommandInset citation LatexCommand citep key "Legland2009" @@ -2828,8 +2980,8 @@ literal "true" \end_inset . - The application of a Gaussian filter (b) or median filter (c) results in - noise reduction, but also in a loss of the signal along the cell walls. + The application of a Gaussian filter (b) or median filter (c) results in noise reduction, + but also in a loss of the signal along the cell walls. The directional filtering (d) better preserves the thickness of the structure. \end_layout @@ -2846,9 +2998,8 @@ literal "true" \begin_layout Standard An alternative is to apply directional filtering. - The principle is to consider an oriented structuring element such as a - line segment of a given length, and to perform morphological operations - for various orientations of the structuring element + The principle is to consider an oriented structuring element such as a line segment of a given length, + and to perform morphological operations for various orientations of the structuring element \begin_inset CommandInset citation LatexCommand citep key "Soille2001,Heneghan_2002_mia,LuengoHendriks2003" @@ -2857,9 +3008,8 @@ literal "true" \end_inset . - For example, applying a median filter or a morphological opening with horizonta -l direction results in the enhancement of horizontal parts of bright structures - (Fig. + For example, + applying a median filter or a morphological opening with horizontal direction results in the enhancement of horizontal parts of bright structures (Fig. \begin_inset space ~ \end_inset @@ -2867,12 +3017,13 @@ l direction results in the enhancement of horizontal parts of bright structures \begin_inset CommandInset ref LatexCommand ref reference "fig:Directional-Filtering" +nolink "false" \end_inset -a). - Similarly, using a vertical structuring element results in the enhancement - of the vertical portions of the structures (Fig. + Similarly, + using a vertical structuring element results in the enhancement of the vertical portions of the structures (Fig. \begin_inset space ~ \end_inset @@ -2880,6 +3031,7 @@ reference "fig:Directional-Filtering" \begin_inset CommandInset ref LatexCommand ref reference "fig:Directional-Filtering" +nolink "false" \end_inset @@ -2888,6 +3040,8 @@ reference "fig:Directional-Filtering" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2895,6 +3049,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2930,6 +3086,8 @@ Horizontal direction \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2961,6 +3119,8 @@ Vertical direction \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -2992,6 +3152,8 @@ Two directions \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -3032,10 +3194,10 @@ name "fig:Directional-Filtering" \end_inset Principle of directional filtering of a thin structure. - (a) and (b): result of median filter using an horizontal and a vertical - linear structuring element. - (c) and (d): combination of the results obtained from two directions (horizonta -l and vertical) and four directions (by adding diagonal directions). + (a) and (b): + result of median filter using an horizontal and a vertical linear structuring element. + (c) and (d): + combination of the results obtained from two directions (horizontal and vertical) and four directions (by adding diagonal directions). \end_layout @@ -3050,8 +3212,7 @@ l and vertical) and four directions (by adding diagonal directions). \end_layout \begin_layout Standard -The results of oriented filters for each direction can be combined by computing - the maximum value over all orientations (Fig. +The results of oriented filters for each direction can be combined by computing the maximum value over all orientations (Fig. \begin_inset space ~ \end_inset @@ -3059,6 +3220,7 @@ The results of oriented filters for each direction can be combined by computing \begin_inset CommandInset ref LatexCommand ref reference "fig:Thin-Structure-Filtering" +nolink "false" \end_inset @@ -3071,6 +3233,7 @@ reference "fig:Thin-Structure-Filtering" \begin_inset CommandInset ref LatexCommand ref reference "fig:Directional-Filtering" +nolink "false" \end_inset @@ -3078,19 +3241,20 @@ reference "fig:Directional-Filtering" \begin_inset CommandInset ref LatexCommand ref reference "fig:Directional-Filtering" +nolink "false" \end_inset -d show the results obtained when combining two or four directions. - Here, 32 orientations of line with length 25 were used. - This results in the enhancement of the image while preserving the thickness - of the bright structures. + Here, + 32 orientations of line with length 25 were used. + This results in the enhancement of the image while preserving the thickness of the bright structures. \end_layout \begin_layout Standard Similar results may be obtained for enhancing dark curvilinear structures, - by using morphological closing or median filters, and combining the results - by computing the minimum over all directions. + by using morphological closing or median filters, + and combining the results by computing the minimum over all directions. \end_layout @@ -3109,7 +3273,8 @@ MorphoLibJ \end_inset menu. - Filters are implemented for both 2D and 3D images, and work for binary, + Filters are implemented for both 2D and 3D images, + and work for binary, grayscale or color (RGB) images. \end_layout @@ -3139,31 +3304,28 @@ Morphological filters \end_inset . - The dialog let the user choose the structuring element shape, radius, and - eventually preview the result. + The dialog let the user choose the structuring element shape, + radius, + and eventually preview the result. The following operations can be chosen: \end_layout \begin_layout Description -erosion keeps the minimum value within the neighborhood defined by the structuri -ng element. +erosion keeps the minimum value within the neighborhood defined by the structuring element. \end_layout \begin_layout Description -dilation keeps the maximum value within the neighborhood defined by the - structuring element. +dilation keeps the maximum value within the neighborhood defined by the structuring element. \end_layout \begin_layout Description closing consists in the succession of a dilation with an erosion. - Morphological closing makes dark structures smaller than the structuring - element disappear. + Morphological closing makes dark structures smaller than the structuring element disappear. \end_layout \begin_layout Description opening consists in the succession of an erosion with a dilation. - Morphological opening makes bright structures smaller than the structuring - element disappear. + Morphological opening makes bright structures smaller than the structuring element disappear. \end_layout \begin_layout Description @@ -3171,9 +3333,8 @@ morphological \begin_inset space ~ \end_inset -gradient is defined as the difference of a morphological dilation and a - morphological erosion with the same structuring element, and enhances edges - of the original images. +gradient is defined as the difference of a morphological dilation and a morphological erosion with the same structuring element, + and enhances edges of the original images. \end_layout \begin_layout Description @@ -3181,8 +3342,8 @@ morphological \begin_inset space ~ \end_inset -Laplacian is defined as half the sum of a morphological dilation and a morpholog -ical erosion with the same structuring element, minus the original image, +Laplacian is defined as half the sum of a morphological dilation and a morphological erosion with the same structuring element, + minus the original image, and enhances edges of the image. \end_layout @@ -3191,9 +3352,8 @@ black \begin_inset space ~ \end_inset -top-hat consists in subtracting the original image from the result of a - morphological closing, and results in the enhancement of dark structures - smaller than structuring element. +top-hat consists in subtracting the original image from the result of a morphological closing, + and results in the enhancement of dark structures smaller than structuring element. \end_layout \begin_layout Description @@ -3201,9 +3361,8 @@ white \begin_inset space ~ \end_inset -top-hat consists in subtracting the result of a morphological opening from - the original image, and results in the enhancement of bright structures - smaller than structuring element. +top-hat consists in subtracting the result of a morphological opening from the original image, + and results in the enhancement of bright structures smaller than structuring element. \end_layout \begin_layout Standard @@ -3227,7 +3386,9 @@ diamond \end_layout \begin_layout Itemize -line with angle of 0, 90, 45 or 135 degrees +line with angle of 0, + 90, + 45 or 135 degrees \end_layout \begin_layout Subsection @@ -3258,9 +3419,10 @@ Morphological filters (3D) . The dialog let the user choose the structuring element shape and radius. The same list of operations as for planar images is provided. - Planar structuring elements can be used (the operation is simply repeated - on each slice), as well as a cubic or spherical structuring element. - For most structuring elements, the size can be chosen for each direction. + Planar structuring elements can be used (the operation is simply repeated on each slice), + as well as a cubic or spherical structuring element. + For most structuring elements, + the size can be chosen for each direction. \end_layout \begin_layout Subsection @@ -3350,11 +3512,12 @@ classical \begin_inset CommandInset ref LatexCommand ref reference "chap:Morphological-Filtering" +nolink "false" \end_inset - transform an input image by using the values of pixels or voxels located - in a close neighborhood, defined by the structuring element. + transform an input image by using the values of pixels or voxels located in a close neighborhood, + defined by the structuring element. Such filters can be seen as \begin_inset Quotes eld \end_inset @@ -3363,14 +3526,13 @@ local \begin_inset Quotes erd \end_inset -, as the result in a given position does not depend on image values located - at a sufficient distance. +, + as the result in a given position does not depend on image values located at a sufficient distance. \end_layout \begin_layout Standard -Connected components operators are more general as they propagate information - within the image based on connectivity between pixels or voxels. +Connected components operators are more general as they propagate information within the image based on connectivity between pixels or voxels. More details can be found in the review of \begin_inset CommandInset citation LatexCommand citet @@ -3380,12 +3542,12 @@ literal "true" \end_inset . - Connected components operators encompass powerful operators, such as + Connected components operators encompass powerful operators, + such as \series bold morphological reconstruction \series default - that allows to reconstruct a marker image by constraining it to a mask - (section + that allows to reconstruct a marker image by constraining it to a mask (section \begin_inset space ~ \end_inset @@ -3393,6 +3555,7 @@ morphological reconstruction \begin_inset CommandInset ref LatexCommand ref reference "sec:Morphological-Reconstruction" +nolink "false" \end_inset @@ -3401,7 +3564,8 @@ reference "sec:Morphological-Reconstruction" \series bold extended minima and maxima \series default -, that can be useful as marker detection for segmentation (section +, + that can be useful as marker detection for segmentation (section \begin_inset space ~ \end_inset @@ -3409,16 +3573,18 @@ extended minima and maxima \begin_inset CommandInset ref LatexCommand ref reference "sec:Minima-Maxima" +nolink "false" \end_inset ). - Finally, + Finally, + \series bold attribute opening and filtering \series default - algorithms can filter images based on size or range properties, with better - preservation of edges than classical filtering (section + algorithms can filter images based on size or range properties, + with better preservation of edges than classical filtering (section \begin_inset space ~ \end_inset @@ -3426,6 +3592,7 @@ attribute opening and filtering \begin_inset CommandInset ref LatexCommand ref reference "sec:Attribute-Filtering" +nolink "false" \end_inset @@ -3472,8 +3639,9 @@ name "sec:Morphological-Reconstruction" \begin_layout Standard The morphological reconstruction is at the basis of many useful algorithms, - such as border removing, hole filling, or detection of regional minima - or maxima in grayscale images. + such as border removing, + hole filling, + or detection of regional minima or maxima in grayscale images. It may be defined for binary as well as for grayscale images. \end_layout @@ -3482,21 +3650,21 @@ Principle \end_layout \begin_layout Standard -The principle of morphological reconstruction canbe illustrated by applying - +The principle of morphological reconstruction canbe illustrated by applying \series bold conditional dilations or erosions \series default until idempotence. - Conditional dilation is the result of a dilation, combined with a mask - image using a logical operation. - Conditional dilations are repeated until no more modification occur (idempotenc -e condition). + Conditional dilation is the result of a dilation, + combined with a mask image using a logical operation. + Conditional dilations are repeated until no more modification occur (idempotence condition). \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -3551,8 +3719,8 @@ name "fig:Morphological-Reconstruction-Principle" \end_inset Principle of the morphological reconstruction algorithm. - Original image is represented in gray, with marker and result of conditional - dilations with increasing sizes superimposed in black. + Original image is represented in gray, + with marker and result of conditional dilations with increasing sizes superimposed in black. \end_layout \end_inset @@ -3570,24 +3738,23 @@ The figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Principle" +nolink "false" \end_inset - shows several steps of a morphological reconstruction by dilation on a - pair of binary images. - The mask image is shown in gray, and the marker image is shown in black - on the first image. + shows several steps of a morphological reconstruction by dilation on a pair of binary images. + The mask image is shown in gray, + and the marker image is shown in black on the first image. The reconstructed images at each step are shown in black. - The markers propagates within the mask until an additional conditional - dilation will not modify the image any more. - The result is the set of regions that contains the markers, with the same - shape as in the original image. + The markers propagates within the mask until an additional conditional dilation will not modify the image any more. + The result is the set of regions that contains the markers, + with the same shape as in the original image. \end_layout \begin_layout Standard -In practice, morphological reconstruction is often implemented using more - efficient algorithms based on queues, by a adding pixels or voxels to the - queue based on the connectivity with processed elements (see Section +In practice, + morphological reconstruction is often implemented using more efficient algorithms based on queues, + by a adding pixels or voxels to the queue based on the connectivity with processed elements (see Section \begin_inset space ~ \end_inset @@ -3598,6 +3765,7 @@ reference "sec:Digital-Connectivity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -3609,8 +3777,10 @@ Applications to binary images \end_layout \begin_layout Standard -By choosing the marker image, several operations may be automatized. - For example, computing morphological reconstruction with image of borders, +By choosing the marker image, + several operations may be automatized. + For example, + computing morphological reconstruction with image of borders, and combining with original image will \series bold remove particles or regions touching the borders @@ -3623,6 +3793,7 @@ remove particles or regions touching the borders \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Binary" +nolink "false" \end_inset @@ -3631,6 +3802,8 @@ reference "fig:Morphological-Reconstruction-Binary" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -3671,8 +3844,10 @@ name "fig:Morphological-Reconstruction-Binary" \end_inset Some applications of morphological reconstruction. - From left to right: original image, result of kill borders, result of fill - holes. + From left to right: + original image, + result of kill borders, + result of fill holes. \end_layout \end_inset @@ -3686,8 +3861,8 @@ Some applications of morphological reconstruction. \end_layout \begin_layout Standard -In a similar way, computing morphological reconstruction by using the border - of the complement of the image makes it possible to +In a similar way, + computing morphological reconstruction by using the border of the complement of the image makes it possible to \series bold fill holes \series default @@ -3711,8 +3886,8 @@ name "subsec:Morphological-Reconstruction-Grayscale" \begin_layout Standard Morphological reconstructions can be applied to grayscale images. By manually choosing binary markers such that they overlay specific structures, - and after applying a Morphological reconstruction by dilation, it is possible - to obtain a grayscale image containing only the chosen structures (Figure + and after applying a Morphological reconstruction by dilation, + it is possible to obtain a grayscale image containing only the chosen structures (Figure \begin_inset space ~ \end_inset @@ -3720,12 +3895,12 @@ Morphological reconstructions can be applied to grayscale images. \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale" +nolink "false" \end_inset ). - The algorithms for morphological reconstruction on grayscale images are - discussed in + The algorithms for morphological reconstruction on grayscale images are discussed in \begin_inset CommandInset citation LatexCommand citet key "Vincent_1993_tip,Robinson_2004_prl" @@ -3738,6 +3913,8 @@ literal "true" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -3778,8 +3955,10 @@ name "fig:Morphological-Reconstruction-Grayscale" \end_inset Some applications of morphological reconstruction on grayscale images. - From left to right: original image with markers superimposed in red, result - of morphological reconstruction by dilation, result of border kill operation. + From left to right: + original image with markers superimposed in red, + result of morphological reconstruction by dilation, + result of border kill operation. \end_layout \end_inset @@ -3797,9 +3976,9 @@ The \series bold border kill \series default -operation can also be applied on grayscale images, making possible to rapidly - remove structures touching the image borders, while keeping the intensity - information within the structures. +operation can also be applied on grayscale images, + making possible to rapidly remove structures touching the image borders, + while keeping the intensity information within the structures. \end_layout \begin_layout Subsection @@ -3815,12 +3994,13 @@ An example of application is presented in figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale-3d" +nolink "false" \end_inset . - The original 3D image represents the nucleus of a plant cell, with chromocenter -s appearing as bright structures (Fig. + The original 3D image represents the nucleus of a plant cell, + with chromocenters appearing as bright structures (Fig. \begin_inset space ~ \end_inset @@ -3828,12 +4008,13 @@ s appearing as bright structures (Fig. \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale-3d" +nolink "false" \end_inset -a). - In order to discriminate the chromocenters, the nucleus is first identified - by manually selecting a region of interest (Fig. + In order to discriminate the chromocenters, + the nucleus is first identified by manually selecting a region of interest (Fig. \begin_inset space ~ \end_inset @@ -3841,13 +4022,13 @@ reference "fig:Morphological-Reconstruction-Grayscale-3d" \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale-3d" +nolink "false" \end_inset --b) used as a marker for a morphological reconstruction with the original - image used as mask. - The result of the morphological reconstruction retains the shape of the - nucleus, while +-b) used as a marker for a morphological reconstruction with the original image used as mask. + The result of the morphological reconstruction retains the shape of the nucleus, + while \begin_inset Quotes eld \end_inset @@ -3863,6 +4044,7 @@ clearing \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale-3d" +nolink "false" \end_inset @@ -3871,6 +4053,8 @@ reference "fig:Morphological-Reconstruction-Grayscale-3d" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -3878,6 +4062,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -3886,7 +4072,7 @@ status collapsed \align center \begin_inset Graphics filename images/nucleus/nucleus-gray8-z14.png - height 3.5cm + special height=3.5cm \end_inset @@ -3906,6 +4092,8 @@ status collapsed \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -3914,7 +4102,7 @@ status collapsed \align center \begin_inset Graphics filename images/nucleus/nucleus-gray8-z14-ovr.png - height 3.5cm + special height=3.5cm \end_inset @@ -3937,6 +4125,8 @@ status collapsed \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -3945,7 +4135,7 @@ status collapsed \align center \begin_inset Graphics filename images/nucleus/nucleus-geodRec-BG-z14.png - height 3.5cm + special height=3.5cm \end_inset @@ -3968,6 +4158,8 @@ status collapsed \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -3976,7 +4168,7 @@ status collapsed \align center \begin_inset Graphics filename images/nucleus/nucleus-subtract-geoRec-BG-z14-adjHist.png - height 3.5cm + special height=3.5cm \end_inset @@ -3999,6 +4191,8 @@ status collapsed \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -4008,7 +4202,7 @@ status collapsed \begin_inset Graphics filename images/nucleus/nucleus-geodRecBG-3d3.png lyxscale 50 - height 3.5cm + special height=3.5cm \end_inset @@ -4039,16 +4233,14 @@ name "fig:Morphological-Reconstruction-Grayscale-3d" \end_inset -Application of 3D morphological reconstruction for isolating chromocenters - within a nucleus. - (a) Sample slice of a 3 image of nucleus with chromocenters represented - as bright blobs. +Application of 3D morphological reconstruction for isolating chromocenters within a nucleus. + (a) Sample slice of a 3 image of nucleus with chromocenters represented as bright blobs. (b) Manual selection of a marker region within the nucleus. - (c) Morphological reconstruction of 3D marker image using original 3D image - as mask. + (c) Morphological reconstruction of 3D marker image using original 3D image as mask. (d) Difference of original image with the reconstruction. (e) 3D representation of the chromocenters within the nucleus. - Image by courtesy of Kaori Sakai and Javier Arpon, INRA-Versailles. + Image by courtesy of Kaori Sakai and Javier Arpon, + INRA-Versailles. \end_layout \end_inset @@ -4062,9 +4254,8 @@ Application of 3D morphological reconstruction for isolating chromocenters \end_layout \begin_layout Standard -By computing the difference of the original image with the result of the - morphological reconstruction, the chromocenters can be easily isolated - and segmented (Fig. +By computing the difference of the original image with the result of the morphological reconstruction, + the chromocenters can be easily isolated and segmented (Fig. \begin_inset space ~ \end_inset @@ -4072,6 +4263,7 @@ By computing the difference of the original image with the result of the \begin_inset CommandInset ref LatexCommand ref reference "fig:Morphological-Reconstruction-Grayscale-3d" +nolink "false" \end_inset @@ -4085,8 +4277,7 @@ Usage \begin_layout Standard The reconstruction algorithm is often used within other operators. - It is however provided as a plugin to allow its inclusion in user-designed - macros or plugins: + It is however provided as a plugin to allow its inclusion in user-designed macros or plugins: \end_layout \begin_layout Minisec @@ -4098,8 +4289,8 @@ Reconstruction \end_layout \begin_layout Standard -Computes the reconstruction by erosion or dilation using a marker image - and a mask image, and a specified connectivity. +Computes the reconstruction by erosion or dilation using a marker image and a mask image, + and a specified connectivity. \end_layout @@ -4122,9 +4313,8 @@ name "op:Interactive-Morphological-Reconstruction" \end_inset -Computes the reconstruction by erosion or dilation taking the current 2D - image as mask image, creating the marker image out of user-defined ROIs - (for example with the point selection tool) and using a specified connectivity. +Computes the reconstruction by erosion or dilation taking the current 2D image as mask image, + creating the marker image out of user-defined ROIs (for example with the point selection tool) and using a specified connectivity. The plugin allows previewing the result. \end_layout @@ -4141,8 +4331,7 @@ Reconstruction \end_layout \begin_layout Standard -Computes the reconstruction by erosion or dilation on a 3D image (marker - and mask images are defined by the user among the open ones). +Computes the reconstruction by erosion or dilation on a 3D image (marker and mask images are defined by the user among the open ones). \end_layout \begin_layout Minisec @@ -4168,9 +4357,7 @@ name "op:Interactive-Morphological-Reconstruction-3d" \end_inset -Computes the reconstruction by erosion or dilation on using the current - 3D image as mask and creating the marker image from the user-defined point - selections. +Computes the reconstruction by erosion or dilation on using the current 3D image as mask and creating the marker image from the user-defined point selections. \end_layout \begin_layout Standard @@ -4182,7 +4369,8 @@ Computes the reconstruction by erosion or dilation on using the current \begin_layout Standard The kill borders and fill holes operations are also provided as plugins. - Both work for 2D and 3D images of 8, 16 or 32 bit-depth images. + Both work for 2D and 3D images of 8, + 16 or 32 bit-depth images. \end_layout \begin_layout Minisec @@ -4215,11 +4403,12 @@ reference "op:Remove-Border-Labels" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -), that performs the same operation on label maps but without requiring - reconstruction. +), + that performs the same operation on label maps but without requiring reconstruction. \end_layout \begin_layout Minisec @@ -4227,8 +4416,8 @@ Fill Holes \end_layout \begin_layout Standard -Removes holes inside particles in binary images, or remove dark regions - surrounded by bright crests in grayscale images. +Removes holes inside particles in binary images, + or remove dark regions surrounded by bright crests in grayscale images. \end_layout \begin_layout Section @@ -4246,9 +4435,9 @@ name "sec:Minima-Maxima" \end_layout \begin_layout Standard -Minima and maxima within images are important features because they often - correspond to relevant structures within the image. - In mathematical morphology, the terms minima and maxima correspond to regions, +Minima and maxima within images are important features because they often correspond to relevant structures within the image. + In mathematical morphology, + the terms minima and maxima correspond to regions, i.e. they are not restricted to single pixels or voxels. \end_layout @@ -4272,15 +4461,15 @@ name "subsec:Regional-Extrema" \series bold Regional minima \series default -are defined as connected regions of elements (pixels or voxels) with the - same value, and whose neighboring elements all have values greater than - that of the region. - Similarly, +are defined as connected regions of elements (pixels or voxels) with the same value, + and whose neighboring elements all have values greater than that of the region. + Similarly, + \series bold regional maxima \series default -are regions of connected pixels or voxels with the same value, and whose - neighbors all have smaller value (Figure +are regions of connected pixels or voxels with the same value, + and whose neighbors all have smaller value (Figure \begin_inset space ~ \end_inset @@ -4288,12 +4477,13 @@ are regions of connected pixels or voxels with the same value, and whose \begin_inset CommandInset ref LatexCommand ref reference "fig:Regional-Maxima" +nolink "false" \end_inset ). - In both cases, the result depends on the choice of the connectivity of - the regions (see section + In both cases, + the result depends on the choice of the connectivity of the regions (see section \begin_inset space ~ \end_inset @@ -4304,6 +4494,7 @@ reference "sec:Digital-Connectivity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -4312,6 +4503,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4319,6 +4512,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4327,7 +4522,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-filtered-roiVLine.png - height 4cm + special height=4cm \end_inset @@ -4350,6 +4545,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4358,7 +4555,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-rmax-ovr.png - height 4cm + special height=4cm \end_inset @@ -4381,6 +4578,8 @@ Regional maxima \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4389,7 +4588,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-filtered-rmax-profile.png - height 4cm + special height=4cm \end_inset @@ -4425,7 +4624,8 @@ name "fig:Regional-Maxima" Regional maxima on a grayscale image. (a) Original image with a line ROI superimposed. - (b) Result of regional maxima, showing many spurious maxima. + (b) Result of regional maxima, + showing many spurious maxima. (c) Gray-level profile along the line ROI shown in (a). \end_layout @@ -4466,13 +4666,13 @@ name "subsec:Extended-Extrema" \end_layout \begin_layout Standard -One problem arising with regional minima or maxima is that they are very - sensitive to noise. +One problem arising with regional minima or maxima is that they are very sensitive to noise. It is often more convenient to use so-called \series bold extended extrema \series default -, that allows filtering spurious extrema. +, + that allows filtering spurious extrema. \end_layout @@ -4481,17 +4681,18 @@ Extended minima and maxima are based on the \series bold H-extrema transformations \series default -, that remove extrema based on a contrast criterium denoted by +, + that remove extrema based on a contrast criterium denoted by \begin_inset Formula $h$ \end_inset . - For example, the H-maxima transformation of a function + For example, + the H-maxima transformation of a function \begin_inset Formula $f$ \end_inset - is obtained by performing a morphological reconstruction by dilation of - the function + is obtained by performing a morphological reconstruction by dilation of the function \begin_inset Formula $f-h$ \end_inset @@ -4500,8 +4701,7 @@ H-extrema transformations \end_inset (the mask). - Extended maxima are obtained by computing the regional maxima of the reconstruc -tion result. + Extended maxima are obtained by computing the regional maxima of the reconstruction result. An illustration on a 1D signal is provided on Figure \begin_inset space ~ \end_inset @@ -4513,6 +4713,7 @@ reference "fig:Extended-Maxima-1D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -4521,6 +4722,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4560,17 +4763,15 @@ Computation of extended maxima on a 1D function. \end_layout \begin_layout Standard -For images, +For images, + \series bold extended maxima \series default - are defined as a connected region containing elements such that the difference - of the value of each element within the region with the maximal value within - the region is lower than the tolerance, and such that the neighbors of - the regions all have values smaller than the maximum within the region - minus the tolerance. - This definition allows the identification of larger extrema, that better - takes into account the noise within the image (Fig. + are defined as a connected region containing elements such that the difference of the value of each element within the region with the maximal value within the region is lower than the tolerance, + and such that the neighbors of the regions all have values smaller than the maximum within the region minus the tolerance. + This definition allows the identification of larger extrema, + that better takes into account the noise within the image (Fig. \begin_inset space ~ \end_inset @@ -4578,6 +4779,7 @@ extended maxima \begin_inset CommandInset ref LatexCommand ref reference "fig:Extended-Maxima" +nolink "false" \end_inset @@ -4586,12 +4788,14 @@ reference "fig:Extended-Maxima" \series bold extended minima \series default -are defined in a similar way, and are efficiently used as pre-processing - step for watershed segmentation. +are defined in a similar way, + and are efficiently used as pre-processing step for watershed segmentation. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4599,6 +4803,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4607,7 +4813,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-filtered-roiVLine.png - height 4cm + special height=4cm \end_inset @@ -4630,6 +4836,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4638,7 +4846,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-emax10-ovr.png - height 4cm + special height=4cm \end_inset @@ -4661,6 +4869,8 @@ Extended maxima \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4669,7 +4879,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-filtered-emax10-profile.png - height 4cm + special height=4cm \end_inset @@ -4720,8 +4930,7 @@ Extended maxima on a grayscale image. \end_layout \begin_layout Standard -Both extended maxima and minima are computed using the morphological reconstruct -ion algorithm. +Both extended maxima and minima are computed using the morphological reconstruction algorithm. More details can be found in the book of \begin_inset CommandInset citation LatexCommand citet @@ -4753,8 +4962,7 @@ It is sometimes useful to transform an input grayscale image by imposing minima or maxima \series default specified by a binary image. - Such process is at the basis of watershed-based morphological segmentation - (Section + Such process is at the basis of watershed-based morphological segmentation (Section \begin_inset space ~ \end_inset @@ -4762,6 +4970,7 @@ specified by a binary image. \begin_inset CommandInset ref LatexCommand ref reference "sec:Morphological-Segmentation-Plugin" +nolink "false" \end_inset @@ -4770,11 +4979,9 @@ reference "sec:Morphological-Segmentation-Plugin" \end_layout \begin_layout Standard -The principle is to perform a morphological reconstruction using as a marker - image a combination of the input image and the minima or maxima, and as - mask image the original input image. - The result is a grayscale image whose regional minima or maxima are the - same as the specified ones. +The principle is to perform a morphological reconstruction using as a marker image a combination of the input image and the minima or maxima, + and as mask image the original input image. + The result is a grayscale image whose regional minima or maxima are the same as the specified ones. \end_layout \begin_layout Subsection @@ -4812,8 +5019,8 @@ Max \end_layout \begin_layout Standard -Computes regional minima or extrema in grayscale or binary image, with specified - connectivity +Computes regional minima or extrema in grayscale or binary image, + with specified connectivity \end_layout \begin_layout Minisec @@ -4837,8 +5044,8 @@ Max \end_layout \begin_layout Standard -Computes regional minima or extrema in 3D grayscale or binary image, with - specified connectivity +Computes regional minima or extrema in 3D grayscale or binary image, + with specified connectivity \end_layout \begin_layout Minisec @@ -4858,8 +5065,8 @@ Max \end_layout \begin_layout Standard -Computes extended minima or extrema in grayscale or binary image, with specified - connectivity +Computes extended minima or extrema in grayscale or binary image, + with specified connectivity \end_layout \begin_layout Minisec @@ -4883,8 +5090,8 @@ Max \end_layout \begin_layout Standard -Computes extended minima or extrema in 3D grayscale or binary image, with - specified connectivity +Computes extended minima or extrema in 3D grayscale or binary image, + with specified connectivity \end_layout \begin_layout Minisec @@ -4953,14 +5160,13 @@ name "sec:Attribute-Filtering" \end_layout \begin_layout Standard -Attribute filters aim at removing components of an image based on a certain - size criterion, rather than on intensity. +Attribute filters aim at removing components of an image based on a certain size criterion, + rather than on intensity. The most common and useful criterion is the number of pixels/voxels (i.e., the area or volume). - For example, a size opening operation with a threshold value equal to 20 - will remove all blobs containing fewer than 20 voxels. - The length of the diagonal of the bounding box can also be of interest - to discriminate elongated versus round component shapes. + For example, + a size opening operation with a threshold value equal to 20 will remove all blobs containing fewer than 20 voxels. + The length of the diagonal of the bounding box can also be of interest to discriminate elongated versus round component shapes. \end_layout @@ -4969,10 +5175,10 @@ Application to binary images \end_layout \begin_layout Standard -When applied to a binary image, attribute opening consists in identifying - each connected component, computing the attribute measurement of each component -, and retain only the connected components whose measurement is above a - specified value (Figure +When applied to a binary image, + attribute opening consists in identifying each connected component, + computing the attribute measurement of each component, + and retain only the connected components whose measurement is above a specified value (Figure \begin_inset space ~ \end_inset @@ -4980,6 +5186,7 @@ When applied to a binary image, attribute opening consists in identifying \begin_inset CommandInset ref LatexCommand ref reference "fig:Area-Opening-Binary" +nolink "false" \end_inset @@ -4989,6 +5196,8 @@ reference "fig:Area-Opening-Binary" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -4996,6 +5205,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5027,6 +5238,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5058,6 +5271,8 @@ Connected components \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5103,8 +5318,8 @@ name "fig:Area-Opening-Binary" Example of area opening on a binary image. (a) Original binary image. (b) Identification of connected components. - (c) Only the connected components with a sufficient size (defined by the - area), have been retained. + (c) Only the connected components with a sufficient size (defined by the area), + have been retained. \end_layout \end_inset @@ -5122,16 +5337,11 @@ Application to grayscale images \end_layout \begin_layout Standard -When applied to a grayscale image, attribute opening consists in generating - a series of binary images by thresholding at each distinct gray level in - the image. - The binary attribute opening described above is then applied independently - to each binary image and the grayscale output is computed as the union - of the binary results. - The final output is a grayscale image whose bright structures with the - attribute below a given value have disappeared. - A great advantage of this filter is that the contours of the structures - area better preserved than opening with a structuring element (Figure +When applied to a grayscale image, + attribute opening consists in generating a series of binary images by thresholding at each distinct gray level in the image. + The binary attribute opening described above is then applied independently to each binary image and the grayscale output is computed as the union of the binary results. + The final output is a grayscale image whose bright structures with the attribute below a given value have disappeared. + A great advantage of this filter is that the contours of the structures area better preserved than opening with a structuring element (Figure \begin_inset space ~ \end_inset @@ -5139,6 +5349,7 @@ When applied to a grayscale image, attribute opening consists in generating \begin_inset CommandInset ref LatexCommand ref reference "fig:Area-Opening-Gray" +nolink "false" \end_inset @@ -5147,6 +5358,8 @@ reference "fig:Area-Opening-Gray" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5154,6 +5367,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5185,6 +5400,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5216,6 +5433,8 @@ Area opening \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -5259,11 +5478,12 @@ name "fig:Area-Opening-Gray" \end_inset Example of area opening on a grayscale image. - (a) Original grayscale image of a leaf (image courtesy of Eric Biot, INRA - Versailles). + (a) Original grayscale image of a leaf (image courtesy of Eric Biot, + INRA Versailles). (b) Grayscale size opening making bright spots disappear. - (c) Comparison with morphological closing using a square structuring element - of radius 1: bright spots are removed, but some veins also disappear. + (c) Comparison with morphological closing using a square structuring element of radius 1: + bright spots are removed, + but some veins also disappear. \end_layout \end_inset @@ -5277,14 +5497,13 @@ Example of area opening on a grayscale image. \end_layout \begin_layout Standard -As for classical morphological filters, grayscale attribute closing or tophat - can be defined. - Grayscale attribute closing consists in removing dark connected components - whose size is smaller than a specified value. +As for classical morphological filters, + grayscale attribute closing or tophat can be defined. + Grayscale attribute closing consists in removing dark connected components whose size is smaller than a specified value. White [resp. - Black] Attribute Top-Hat considers the difference of the attribute opening - [resp. - closing] with the original image, and can help identifying bright [resp. + Black] Attribute Top-Hat considers the difference of the attribute opening [resp. + closing] with the original image, + and can help identifying bright [resp. dark] structures with small size. \end_layout @@ -5293,8 +5512,8 @@ Usage \end_layout \begin_layout Standard -So far, the following attribute filtering plugins are available within MorphoLib -J (under +So far, + the following attribute filtering plugins are available within MorphoLibJ (under \begin_inset Quotes eld \end_inset @@ -5319,10 +5538,12 @@ Attribute \begin_inset space ~ \end_inset -Filtering opens a dialog to perform between attribute opening, closing, +Filtering opens a dialog to perform between attribute opening, + closing, and black or white top-hat on a planar (2D) grayscale image. - Two size criteria can be used: the area (number of pixels), or the diameter - (length of the diagonal of the bounding box). + Two size criteria can be used: + the area (number of pixels), + or the diameter (length of the diagonal of the bounding box). \end_layout \begin_layout Description @@ -5342,8 +5563,9 @@ Filtering \begin_inset space ~ \end_inset -3D opens a dialog to perform between attribute opening, closing, and black - or white top-hat on a 3D grayscale image. +3D opens a dialog to perform between attribute opening, + closing, + and black or white top-hat on a 3D grayscale image. The size criterion is the number of voxels. \end_layout @@ -5366,10 +5588,10 @@ The \series bold watershed algorithm \series default - assimilates the grayscale image to a digital elevation model, and aims - at detecting the different catchment basins. - In the grayscale image, the catchment basins correspond to dark regions - surrounded by bright structures (the + assimilates the grayscale image to a digital elevation model, + and aims at detecting the different catchment basins. + In the grayscale image, + the catchment basins correspond to dark regions surrounded by bright structures (the \begin_inset Quotes eld \end_inset @@ -5379,8 +5601,8 @@ crests ). It is a very popular technique specially used to segment touching objects. - The MorphoLibJ suite contains several implementations and applications - of the algorithm, described in the following sections. + The MorphoLibJ suite contains several implementations and applications of the algorithm, + described in the following sections. \end_layout \begin_layout Standard @@ -5425,8 +5647,7 @@ Introduction \end_layout \begin_layout Standard -Classic Watershed is an ImageJ/Fiji plugin to perform watershed segmentation - of grayscale 2D/3D images using flooding simulations as described by +Classic Watershed is an ImageJ/Fiji plugin to perform watershed segmentation of grayscale 2D/3D images using flooding simulations as described by \begin_inset CommandInset citation LatexCommand citet key "Soille_1990,Vincent_1991_pami" @@ -5438,10 +5659,8 @@ literal "true" \end_layout \begin_layout Standard -The basic idea consists of considering the input image as topographic surface - and placing a water source in each regional minimum of its relief. - Next the entire relief is flooded from the sources and dams are placed - where the different water sources meet. +The basic idea consists of considering the input image as topographic surface and placing a water source in each regional minimum of its relief. + Next the entire relief is flooded from the sources and dams are placed where the different water sources meet. \end_layout \begin_layout Standard @@ -5458,13 +5677,12 @@ watersheds \end_layout \begin_layout Standard -The first image points that are reached by water are the points at the lowest - grayscale value +The first image points that are reached by water are the points at the lowest grayscale value \begin_inset Formula $h_{{min}}$ \end_inset -, then all image pixels are progressively reached up to the highest level - +, + then all image pixels are progressively reached up to the highest level \begin_inset Formula $h_{{max}}$ \end_inset @@ -5473,6 +5691,7 @@ The first image points that are reached by water are the points at the lowest \begin_inset CommandInset ref LatexCommand ref reference "fig:Schematic-overview-of-flooding" +nolink "false" \end_inset @@ -5482,6 +5701,7 @@ reference "fig:Schematic-overview-of-flooding" \begin_layout Standard \begin_inset Float figure placement H +alignment document wide false sideways false status open @@ -5526,10 +5746,12 @@ Usage \end_layout \begin_layout Standard -The Classic Watershed plugin runs on any grayscale image (8, 16 and 32-bit) - in 2D and 3D. +The Classic Watershed plugin runs on any grayscale image (8, + 16 and 32-bit) in 2D and 3D. At least one image needs to be open in order for the plugin to run. - If that's the case, a dialog like the following will pop up: + If that's the case, + a dialog like the following will pop up: + \begin_inset Separator latexpar \end_inset @@ -5552,7 +5774,8 @@ Let's have a look at the different parameters: \end_layout \begin_layout Itemize -Image parameters: +Image parameters: + \end_layout \begin_deeper @@ -5561,7 +5784,9 @@ Image parameters: \series bold Input image \series default -: grayscale image to flood, usually the gradient of an image. +: + grayscale image to flood, + usually the gradient of an image. \end_layout @@ -5570,14 +5795,15 @@ Input image \series bold Mask image \series default - (optional): binary image of the same dimensions as the input image which - can be used to restrict the areas of application of the algorithm. + (optional): + binary image of the same dimensions as the input image which can be used to restrict the areas of application of the algorithm. Set to "None" to run the method on the whole input image. \end_layout \end_deeper \begin_layout Itemize -Morphological parameters: +Morphological parameters: + \end_layout \begin_deeper @@ -5586,8 +5812,9 @@ Morphological parameters: \series bold Use diagonal connectivity \series default -: select to allow the flooding in diagonal directions (8-connectivity in - 2D and 26-connectivity in 3D, see Section +: + select to allow the flooding in diagonal directions (8-connectivity in 2D and 26-connectivity in 3D, + see Section \begin_inset space ~ \end_inset @@ -5598,6 +5825,7 @@ reference "sec:Digital-Connectivity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -5610,8 +5838,9 @@ noprefix "false" \series bold Min h \series default -: minimum grayscale value to start flooding from (by default, set to the - minimum value of the image type). +: + minimum grayscale value to start flooding from (by default, + set to the minimum value of the image type). \end_layout @@ -5620,13 +5849,15 @@ Min h \series bold Max h \series default -: maximum grayscale value to reach with flooding (by default, set to the - maximum value of the image type). +: + maximum grayscale value to reach with flooding (by default, + set to the maximum value of the image type). \end_layout \end_deeper \begin_layout Standard -Output: +Output: + \end_layout \begin_layout Itemize @@ -5634,8 +5865,9 @@ Output: \series bold Labeled image \series default - containing the resulting catchment basins (with integer values 1, 2, 3...) - and watershed lines (with 0 value). + containing the resulting catchment basins (with integer values 1, + 2, + 3...) and watershed lines (with 0 value). \end_layout \begin_layout Subsection @@ -5643,19 +5875,26 @@ Over-segmentation \end_layout \begin_layout Standard -Normally, Classic Watershed will lead to an over-segmentation of the input - image, especially for noisy images with many regional minima. - In that case, it is recommended to either +Normally, + Classic Watershed will lead to an over-segmentation of the input image, + especially for noisy images with many regional minima. + In that case, + it is recommended to either \series bold pre-process the image before \series default - running the plugin, + running the plugin, + \series bold or merge regions based on a similarity criterion afterwards \series default . - Several de-noising methods are available in Fiji/ImageJ, namely: median - filtering, Gaussian blur, bilateral filtering, etc. + Several de-noising methods are available in Fiji/ImageJ, + namely: + median filtering, + Gaussian blur, + bilateral filtering, + etc. \end_layout \begin_layout Paragraph @@ -5665,8 +5904,8 @@ Example: \end_layout \begin_layout Standard -This short macro runs the plugin twice in the blobs sample, first without - pre-processing and then after applying a Gaussian blur of radius 3: +This short macro runs the plugin twice in the blobs sample, + first without pre-processing and then after applying a Gaussian blur of radius 3: \end_layout \begin_layout Standard @@ -5682,7 +5921,8 @@ status open \begin_layout Plain Layout -run("Blobs (25K)"); +run("Blobs (25K)"); + \end_layout \begin_layout Plain Layout @@ -5692,12 +5932,14 @@ run("Blobs (25K)"); \begin_layout Plain Layout -run("Invert LUT"); +run("Invert LUT"); + \end_layout \begin_layout Plain Layout -run("Invert"); +run("Invert"); + \end_layout \begin_layout Plain Layout @@ -5707,7 +5949,9 @@ run("Invert"); \begin_layout Plain Layout -run("Classic Watershed", "input=blobs mask=None use min=0 max=150"); +run("Classic Watershed", + "input=blobs mask=None use min=0 max=150"); + \end_layout \begin_layout Plain Layout @@ -5717,22 +5961,27 @@ run("Classic Watershed", "input=blobs mask=None use min=0 max=150"); \begin_layout Plain Layout -run("3-3-2 RGB"); +run("3-3-2 RGB"); + \end_layout \begin_layout Plain Layout -// pre-process image with Gaussian blur selectWindow("blobs.gif"); +// pre-process image with Gaussian blur selectWindow("blobs.gif"); + \end_layout \begin_layout Plain Layout -run("Gaussian Blur...", "sigma=3"); +run("Gaussian Blur...", + "sigma=3"); + \end_layout \begin_layout Plain Layout -rename("blobs-blur.gif"); +rename("blobs-blur.gif"); + \end_layout \begin_layout Plain Layout @@ -5764,6 +6013,7 @@ run("3-3-2 RGB"); \begin_layout Standard \begin_inset Float figure placement H +alignment document wide false sideways false status open @@ -5780,33 +6030,6 @@ status open \begin_inset Text \begin_layout Plain Layout -\begin_inset Float figure -wide false -sideways false -status collapsed - -\begin_layout Plain Layout -\align center -\begin_inset Graphics - filename images/blobs-blur.png - width 32text% - -\end_inset - - -\begin_inset Caption Standard - -\begin_layout Plain Layout -Gaussian-blurred blobs image used as input (radius = 3). -\end_layout - -\end_inset - - -\end_layout - -\end_inset - \end_layout @@ -5816,41 +6039,6 @@ Gaussian-blurred blobs image used as input (radius = 3). \begin_inset Text \begin_layout Plain Layout -\begin_inset Float figure -wide false -sideways false -status collapsed - -\begin_layout Plain Layout -\align center -\begin_inset Graphics - filename images/blobs-watershed-no-preprocessing.png - width 32text% - -\end_inset - - -\begin_inset Caption Standard - -\begin_layout Plain Layout -Watershed segmentation on original image ( -\begin_inset Formula $h_{{min}}=0$ -\end_inset - -, -\begin_inset Formula $h_{{max}}=150$ -\end_inset - -). -\end_layout - -\end_inset - - -\end_layout - -\end_inset - \end_layout @@ -5860,41 +6048,6 @@ Watershed segmentation on original image ( \begin_inset Text \begin_layout Plain Layout -\begin_inset Float figure -wide false -sideways false -status collapsed - -\begin_layout Plain Layout -\align center -\begin_inset Graphics - filename images/blobs-blur-watershed.png - width 32text% - -\end_inset - - -\begin_inset Caption Standard - -\begin_layout Plain Layout -Watershed segmentation on Gaussian-blurred original image (radius = 3, -\begin_inset Formula $h_{{min}}=0$ -\end_inset - -, -\begin_inset Formula $h_{{max}}=150$ -\end_inset - -). -\end_layout - -\end_inset - - -\end_layout - -\end_inset - \end_layout @@ -5948,9 +6101,8 @@ Introduction \end_layout \begin_layout Standard -Marker-controlled Watershed is an ImageJ/Fiji plugin to segment grayscale - images of any type (8, 16 and 32-bit) in 2D and 3D based on the marker-controll -ed watershed algorithm by +Marker-controlled Watershed is an ImageJ/Fiji plugin to segment grayscale images of any type (8, + 16 and 32-bit) in 2D and 3D based on the marker-controlled watershed algorithm by \begin_inset CommandInset citation LatexCommand citet key "Meyer_1990_jvcir" @@ -5959,21 +6111,20 @@ literal "true" \end_inset . - As the previous method, this algorithm considers the input image as a topograph -ic surface (where higher pixel values mean higher altitude) but it simulates - its flooding from + As the previous method, + this algorithm considers the input image as a topographic surface (where higher pixel values mean higher altitude) but it simulates its flooding from \series bold specific seed points or markers \series default . - A common choice for the markers are the local minima of the gradient of - the image, but the method works on any specific marker, either selected - manually by the user or determined automatically by another algorithm (see - Fig. + A common choice for the markers are the local minima of the gradient of the image, + but the method works on any specific marker, + either selected manually by the user or determined automatically by another algorithm (see Fig. \begin_inset CommandInset ref LatexCommand ref reference "fig:Example-of-marker-controlled-watershed" +nolink "false" \end_inset @@ -5982,6 +6133,8 @@ reference "fig:Example-of-marker-controlled-watershed" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -6008,7 +6161,8 @@ Example of marker-controlled watershed segmentation on nucleus of \emph on Arabidopsis thaliana \emph default - (image by courtesy of Kaori Sakai and Javier Arpon, INRA-Versailles). + (image by courtesy of Kaori Sakai and Javier Arpon, + INRA-Versailles). \end_layout \end_inset @@ -6027,7 +6181,8 @@ Usage \begin_layout Standard Marker-controlled Watershed needs at least two images to run. - If that's the case, a dialog like the following will pop up: + If that's the case, + a dialog like the following will pop up: \end_layout \begin_layout Standard @@ -6055,7 +6210,9 @@ The \series bold Input image \series default -: a 2D or 3D grayscale image to flood, usually the gradient of an image. +: + a 2D or 3D grayscale image to flood, + usually the gradient of an image. \end_layout @@ -6064,11 +6221,11 @@ The \series bold Marker image \series default -: an image of the same dimensions as the input containing the seed points - or markers as connected regions of voxels, each of them with a different - label. - They correspond usually to the local minima of the input image, but they - can be set arbitrarily. +: + an image of the same dimensions as the input containing the seed points or markers as connected regions of voxels, + each of them with a different label. + They correspond usually to the local minima of the input image, + but they can be set arbitrarily. \end_layout @@ -6083,8 +6240,8 @@ The \series bold Mask image \series default -: a binary image of the same dimensions as input and marker which can be - used to restrict the areas of application of the algorithm. +: + a binary image of the same dimensions as input and marker which can be used to restrict the areas of application of the algorithm. Set to "None" to run the method on the whole input image. \end_layout @@ -6100,7 +6257,8 @@ Rest of parameters: \series bold Calculate dams \series default -: select to enable the calculation of watershed lines. +: + select to enable the calculation of watershed lines. \end_layout @@ -6109,8 +6267,8 @@ Calculate dams \series bold Use diagonal connectivity \series default -: select to allow the flooding in diagonal directions (more rounded objects - are usually obtain by unchecking this option). +: + select to allow the flooding in diagonal directions (more rounded objects are usually obtain by unchecking this option). \end_layout @@ -6143,9 +6301,9 @@ Introduction \end_layout \begin_layout Standard -Similar to the Marker-controlled Watershed plugin, this ImageJ/Fiji plugin - segments grayscale images of any type (8, 16 and 32-bit) in 2D and 3D using - the marker-controlled watershed algorithm by +Similar to the Marker-controlled Watershed plugin, + this ImageJ/Fiji plugin segments grayscale images of any type (8, + 16 and 32-bit) in 2D and 3D using the marker-controlled watershed algorithm by \begin_inset CommandInset citation LatexCommand citet key "Meyer_1990_jvcir" @@ -6153,7 +6311,8 @@ literal "true" \end_inset -.and it floods the image from specific seed points, but this time +.and it floods the image from specific seed points, + but this time \series bold the points are introduced interactively by the user \series default @@ -6162,6 +6321,8 @@ the points are introduced interactively by the user \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -6205,17 +6366,19 @@ Usage \begin_layout Standard Interactive Marker-controlled Watershed runs on any open grayscale image, single 2D image or (3D) stack. - If no image is open when calling the plugin, an Open dialog will pop up. + If no image is open when calling the plugin, + an Open dialog will pop up. \end_layout \begin_layout Standard -The user can pan, zoom in and out, or scroll between slices (if the input - image is a stack) in the main canvas as if it were any other ImageJ window. - On the left side of the canvas there are three panels of parameters, one - with the watershed parameters, one for the output (result) options and - one for post-processing the result. - All buttons, checkboxes and panels contain a short explanation of their - functionality that is displayed when the cursor lingers over them. +The user can pan, + zoom in and out, + or scroll between slices (if the input image is a stack) in the main canvas as if it were any other ImageJ window. + On the left side of the canvas there are three panels of parameters, + one with the watershed parameters, + one for the output (result) options and one for post-processing the result. + All buttons, + checkboxes and panels contain a short explanation of their functionality that is displayed when the cursor lingers over them. \end_layout \begin_layout Subsubsection @@ -6223,19 +6386,19 @@ Interactive markers \end_layout \begin_layout Standard -In this plugin the markers are introduced interactively by the user using - any of the selection tools. - By default, the point selection tool will be enabled in the main ImageJ - toolbar. - To select markers on different slices, one option is to use the point selection - tool and keep the SHIFT key pressed each time you click to set a new marker. +In this plugin the markers are introduced interactively by the user using any of the selection tools. + By default, + the point selection tool will be enabled in the main ImageJ toolbar. + To select markers on different slices, + one option is to use the point selection tool and keep the SHIFT key pressed each time you click to set a new marker. Another possibility is to use the ROI Manager. - In that case, all selected ROIs in the manager will be used as markers - (see Fig. + In that case, + all selected ROIs in the manager will be used as markers (see Fig. \begin_inset CommandInset ref LatexCommand ref reference "sec:Interactive-Marker-controlled-WS" +nolink "false" \end_inset @@ -6244,6 +6407,8 @@ for examples of selections used as markers). \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -6270,8 +6435,9 @@ name "fig:Example-of-interactive-markers" \end_inset Example of interactive markers introduced by the user. - From left to right: point selections, rectangular selections and free-hand - selections (stored in the ROI Manager). + From left to right: + point selections, + rectangular selections and free-hand selections (stored in the ROI Manager). \end_layout \end_inset @@ -6312,7 +6478,8 @@ This panel is reserved to the parameters involved in the segmentation pipeline: \series bold Calculate dams \series default -: un-check this option to produce segmentations without watershed lines. +: + un-check this option to produce segmentations without watershed lines. \end_layout @@ -6321,14 +6488,16 @@ Calculate dams \series bold Connectivity \series default -: voxel connectivity (4-8 in 2D, and 6-26 in 3D). - Selecting non-diagonal connectivity (4 or 6) usually provides more rounded - objects. +: + voxel connectivity (4-8 in 2D, + and 6-26 in 3D). + Selecting non-diagonal connectivity (4 or 6) usually provides more rounded objects. \end_layout \begin_layout Standard -Finally, +Finally, + \series bold click on “Run” to launch the segmentation \series default @@ -6337,8 +6506,8 @@ click on “Run” to launch the segmentation \series bold to stop it \series default - for any reason, you can do so by clicking on the same button (which should - read “STOP” during that process). + for any reason, + you can do so by clicking on the same button (which should read “STOP” during that process). \end_layout \begin_layout Subsubsection @@ -6366,11 +6535,13 @@ Only enabled after running the segmentation. \series bold Display \series default -: list of options to display the segmentation results (see Fig. +: + list of options to display the segmentation results (see Fig. \begin_inset CommandInset ref LatexCommand ref reference "fig:MS-display-options" +nolink "false" \end_inset @@ -6383,8 +6554,8 @@ reference "fig:MS-display-options" \series bold Overlaid basins \series default -: colored objects overlaying the input image (with or without dams depending - on the selected option in the Watershed Segmentation panel). +: + colored objects overlaying the input image (with or without dams depending on the selected option in the Watershed Segmentation panel). \end_layout @@ -6393,8 +6564,8 @@ Overlaid basins \series bold Overlaid dams \series default -: overlay the watershed dams in red on top of the input image (only works - if “Calculate dams” is checked). +: + overlay the watershed dams in red on top of the input image (only works if “Calculate dams” is checked). \end_layout @@ -6403,7 +6574,8 @@ Overlaid dams \series bold Catchment basins \series default -: colored objects. +: + colored objects. \end_layout @@ -6412,8 +6584,8 @@ Catchment basins \series bold Watershed lines \series default -: binary image showing the watershed lines in black and the objects in white - (only works if “Calculate dams” is checked). +: + binary image showing the watershed lines in black and the objects in white (only works if “Calculate dams” is checked). \end_layout @@ -6423,7 +6595,8 @@ Watershed lines \series bold Show result overlay \series default -: toggle result overlay. +: + toggle result overlay. \end_layout @@ -6432,7 +6605,8 @@ Show result overlay \series bold Create image button \series default -: create a new image with the results displayed in the canvas. +: + create a new image with the results displayed in the canvas. \end_layout \begin_layout Subsubsection @@ -6451,8 +6625,8 @@ Post-processing panel \end_layout \begin_layout Standard -Similarly to the Results panel, this panel only gets enabled after running - the segmentation pipeline. +Similarly to the Results panel, + this panel only gets enabled after running the segmentation pipeline. \end_layout \begin_layout Itemize @@ -6460,7 +6634,8 @@ Similarly to the Results panel, this panel only gets enabled after running \series bold Merge labels \series default -: merge together labels selected by either the +: + merge together labels selected by either the \series bold \begin_inset Quotes eld @@ -6477,10 +6652,10 @@ freehand or the point tool \series default (on single or multiple slices). - The zero-value label belongs to the watershed dams, therefore it will ignored - in case of being selected. - The first selected label value will be assigned to the rest of selected - labels, which will share its color. + The zero-value label belongs to the watershed dams, + therefore it will ignored in case of being selected. + The first selected label value will be assigned to the rest of selected labels, + which will share its color. \begin_inset Newline newline \end_inset @@ -6491,8 +6666,9 @@ or the point tool Note \series default \color inherit -: to select labels on different slices, use the point selection tool and - keep the SHIFT key pressed each time you click on a new label. +: + to select labels on different slices, + use the point selection tool and keep the SHIFT key pressed each time you click on a new label. \end_layout \begin_layout Itemize @@ -6500,9 +6676,9 @@ Note \series bold Shuffle colors \series default -: randomly re-assign colors to the labels. - This is a very handy option whenever two adjacent labels present a similar - color. +: + randomly re-assign colors to the labels. + This is a very handy option whenever two adjacent labels present a similar color. \end_layout \begin_layout Section @@ -6524,14 +6700,16 @@ Introduction \end_layout \begin_layout Standard -Morphological Segmentation is an ImageJ/Fiji plugin that combines morphological - operations, such as extended minima and morphological gradient, with watershed - flooding algorithms to segment grayscale images of any type (8, 16 and - 32-bit) in 2D and 3D. +Morphological Segmentation is an ImageJ/Fiji plugin that combines morphological operations, + such as extended minima and morphological gradient, + with watershed flooding algorithms to segment grayscale images of any type (8, + 16 and 32-bit) in 2D and 3D. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -6571,19 +6749,22 @@ Usage \end_layout \begin_layout Standard -Morphological Segmentation runs on any open grayscale image, single 2D image - or (3D) stack. - If no image is open when calling the plugin, an Open dialog will pop up. +Morphological Segmentation runs on any open grayscale image, + single 2D image or (3D) stack. + If no image is open when calling the plugin, + an Open dialog will pop up. \end_layout \begin_layout Standard -The user can pan, zoom in and out, or scroll between slices (if the input - image is a stack) in the main canvas as if it were any other ImageJ window. - On the left side of the canvas there are four panels of parameters, one - for the input image, one with the watershed parameters, one for the output - options and one for post-processing the resulting labels. - All buttons, checkboxes and panels contain a short explanation of their - functionality that is displayed when the cursor lingers over them. +The user can pan, + zoom in and out, + or scroll between slices (if the input image is a stack) in the main canvas as if it were any other ImageJ window. + On the left side of the canvas there are four panels of parameters, + one for the input image, + one with the watershed parameters, + one for the output options and one for post-processing the resulting labels. + All buttons, + checkboxes and panels contain a short explanation of their functionality that is displayed when the cursor lingers over them. \end_layout \begin_layout Standard @@ -6591,9 +6772,10 @@ The user can pan, zoom in and out, or scroll between slices (if the input \series bold Image pre-processing \series default -: some pre-processing is included in the plugin to facilitate the segmentation - task. - However, other pre-processing may be required depending on the input image. +: + some pre-processing is included in the plugin to facilitate the segmentation task. + However, + other pre-processing may be required depending on the input image. It is up to the user to decide what filtering may be most appropriate upstream. \end_layout @@ -6613,14 +6795,13 @@ Input Image panel \end_layout \begin_layout Standard -First, you need to indicate the nature of the input image to process. +First, + you need to indicate the nature of the input image to process. This is a \series bold key parameter \series default - since the watershed algorithm is expecting an image where the boundaries - of objects present high intensity values (usually as a result of a gradient - or edge detection filtering). + since the watershed algorithm is expecting an image where the boundaries of objects present high intensity values (usually as a result of a gradient or edge detection filtering). \end_layout @@ -6633,7 +6814,8 @@ You should select: \series bold Border Image \series default -: if your input image has highlighted object boundaries. +: + if your input image has highlighted object boundaries. \end_layout @@ -6642,18 +6824,16 @@ Border Image \series bold Object Image \series default -: if the borders of the objects do not have higher intensity values than - the rest of voxels in the image. +: + if the borders of the objects do not have higher intensity values than the rest of voxels in the image. \end_layout \begin_layout Standard -When selecting “Object Image”, an additional set of options is enabled to - choose the type of gradient and radius (in pixels) to apply to the input - image before starting the morphological operations. - Finally, a checkbox allows displaying the gradient image instead of the - input image in the main canvas of the plugin (only after running the watershed - segmentation). +When selecting “Object Image”, + an additional set of options is enabled to choose the type of gradient and radius (in pixels) to apply to the input image before starting the morphological operations. + Finally, + a checkbox allows displaying the gradient image instead of the input image in the main canvas of the plugin (only after running the watershed segmentation). \end_layout \begin_layout Subsubsection @@ -6673,7 +6853,8 @@ Watershed Segmentation panel \begin_layout Standard This panel is reserved to the parameters involved in the segmentation pipeline. - By default, only the tolerance can be changed. + By default, + only the tolerance can be changed. Clicking on “Advanced options” enables the rest of options. \end_layout @@ -6682,11 +6863,12 @@ This panel is reserved to the parameters involved in the segmentation pipeline. \series bold Tolerance \series default -: dynamic of intensity for the search of regional minima (in the extended-minima - transform, which is the regional minima of the H-minima transform, value - of h). - Increasing the tolerance value reduces the number of segments in the final - result, while decreasing its value produces more object splits. +: + dynamic of intensity for the search of regional minima (in the extended-minima transform, + which is the regional minima of the H-minima transform, + value of h). + Increasing the tolerance value reduces the number of segments in the final result, + while decreasing its value produces more object splits. \series bold \color red @@ -6697,13 +6879,11 @@ Tolerance Note \series default \color inherit -: since the tolerance is an intensity parameter, it is sensitive to the - input image type. - A tolerance value of 10 is a good starting point for 8-bit images (with - 0-255 intensity range) but it should be drastically increased when using - image types with larger intensity ranges. - For example to ~2000 when working on a 16-bit image (intensity values between - 0 and 65535). +: + since the tolerance is an intensity parameter, + it is sensitive to the input image type. + A tolerance value of 10 is a good starting point for 8-bit images (with 0-255 intensity range) but it should be drastically increased when using image types with larger intensity ranges. + For example to ~2000 when working on a 16-bit image (intensity values between 0 and 65535). \end_layout \begin_layout Itemize @@ -6711,7 +6891,8 @@ Note \series bold Calculate dams \series default -: un-check this option to produce segmentations without watershed lines. +: + un-check this option to produce segmentations without watershed lines. \end_layout @@ -6720,14 +6901,16 @@ Calculate dams \series bold Connectivity \series default -: voxel connectivity (4-8 in 2D, and 6-26 in 3D). - Selecting non-diagonal connectivity (4 or 6) usually provides more rounded - objects. +: + voxel connectivity (4-8 in 2D, + and 6-26 in 3D). + Selecting non-diagonal connectivity (4 or 6) usually provides more rounded objects. \end_layout \begin_layout Standard -Finally, +Finally, + \series bold click on “Run” to launch the segmentation \series default @@ -6739,8 +6922,8 @@ If your segmentation is taking too long or you want \series bold to stop it \series default - for any reason, you can do so by clicking on the same button (which should - read “STOP” during that process). + for any reason, + you can do so by clicking on the same button (which should read “STOP” during that process). \end_layout \begin_layout Subsubsection @@ -6768,7 +6951,8 @@ Only enabled after running the segmentation. \series bold Display \series default -: list of options to display the segmentation results. +: + list of options to display the segmentation results. \end_layout \begin_deeper @@ -6777,8 +6961,8 @@ Display \series bold Overlaid basins \series default -: colored objects overlaying the input image (with or without dams depending - on the selected option in the Watershed Segmentation panel). +: + colored objects overlaying the input image (with or without dams depending on the selected option in the Watershed Segmentation panel). \end_layout @@ -6787,8 +6971,8 @@ Overlaid basins \series bold Overlaid dams \series default -: overlay the watershed dams in red on top of the input image (only works - if “Calculate dams” is checked). +: + overlay the watershed dams in red on top of the input image (only works if “Calculate dams” is checked). \end_layout @@ -6797,7 +6981,8 @@ Overlaid dams \series bold Catchment basins \series default -: colored objects. +: + colored objects. \end_layout @@ -6806,8 +6991,8 @@ Catchment basins \series bold Watershed lines \series default -: binary image showing the watershed lines in black and the objects in white - (only works if “Calculate dams” is checked). +: + binary image showing the watershed lines in black and the objects in white (only works if “Calculate dams” is checked). \end_layout @@ -6817,7 +7002,8 @@ Watershed lines \series bold Show result overlay \series default -: toggle result overlay. +: + toggle result overlay. \end_layout @@ -6826,11 +7012,14 @@ Show result overlay \series bold Create image button \series default -: create a new image with the results displayed in the canvas. +: + create a new image with the results displayed in the canvas. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -6887,8 +7076,8 @@ Post-processing panel \end_layout \begin_layout Standard -Similarly to the Results panel, this panel only gets enabled after running - the segmentation pipeline. +Similarly to the Results panel, + this panel only gets enabled after running the segmentation pipeline. \end_layout \begin_layout Itemize @@ -6896,7 +7085,8 @@ Similarly to the Results panel, this panel only gets enabled after running \series bold Merge labels \series default -: merge together labels selected by either the +: + merge together labels selected by either the \series bold \begin_inset Quotes eld @@ -6913,10 +7103,10 @@ freehand or the point tool \series default (on single or multiple slices). - The zero-value label belongs to the watershed dams, therefore it will ignored - in case of being selected. - The first selected label value will be assigned to the rest of selected - labels, which will share its color. + The zero-value label belongs to the watershed dams, + therefore it will ignored in case of being selected. + The first selected label value will be assigned to the rest of selected labels, + which will share its color. \begin_inset Newline newline \end_inset @@ -6927,8 +7117,9 @@ or the point tool Note \series default \color inherit -: to select labels on different slices, use the point selection tool and - keep the SHIFT key pressed each time you click on a new label. +: + to select labels on different slices, + use the point selection tool and keep the SHIFT key pressed each time you click on a new label. \end_layout \begin_layout Itemize @@ -6936,9 +7127,9 @@ Note \series bold Shuffle colors \series default -: randomly re-assign colors to the labels. - This is a very handy option whenever two adjacent labels present a similar - color. +: + randomly re-assign colors to the labels. + This is a very handy option whenever two adjacent labels present a similar color. \end_layout \begin_layout Subsection @@ -6946,8 +7137,7 @@ Macro language compatibility \end_layout \begin_layout Standard -Morphological Segmentation is completely compatible with the popular ImageJ - macro language +Morphological Segmentation is completely compatible with the popular ImageJ macro language \begin_inset Foot status open @@ -6968,8 +7158,7 @@ http://imagej.net/developer/macro/macros.html \end_inset . - Each of the buttons in the GUI are macro-recordable and their commands - can be reproduced later from a simple macro file. + Each of the buttons in the GUI are macro-recordable and their commands can be reproduced later from a simple macro file. \end_layout \begin_layout Standard @@ -7015,7 +7204,8 @@ status open \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", "object"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", + "object"); \end_layout \begin_layout Plain Layout @@ -7025,7 +7215,8 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", "object"); \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", "border"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", + "border"); \end_layout \end_inset @@ -7046,8 +7237,8 @@ status open \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.segment","tolerance=10", "calculat -eDams=true","connectivity=6"); +call("inra.ijpb.plugins.MorphologicalSegmentation.segment","tolerance=10", + "calculateDams=true","connectivity=6"); \end_layout \end_inset @@ -7085,7 +7276,8 @@ status open \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setShowGradient", "true"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setShowGradient", + "true"); \end_layout \end_inset @@ -7111,8 +7303,9 @@ status open \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Overlaid - basins"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", + "Overlaid basins"); + \end_layout \begin_layout Plain Layout @@ -7122,8 +7315,8 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Overlaid \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Overlaid - dams"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", + "Overlaid dams"); \end_layout \begin_layout Plain Layout @@ -7133,8 +7326,8 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Overlaid \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Catchment - basins"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", + "Catchment basins"); \end_layout \begin_layout Plain Layout @@ -7144,8 +7337,8 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Catchment \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Watershed - lines"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", + "Watershed lines"); \end_layout \end_inset @@ -7179,8 +7372,8 @@ Complete macro example \end_layout \begin_layout Standard -The following macro opens the Blobs sample image, applies the plugin with - a tolerance value of 32 and displays the result as overlaid dams. +The following macro opens the Blobs sample image, + applies the plugin with a tolerance value of 32 and displays the result as overlaid dams. \end_layout \begin_layout Standard @@ -7196,7 +7389,8 @@ status open \begin_layout Plain Layout -run("Blobs (25K)"); +run("Blobs (25K)"); + \end_layout \begin_layout Plain Layout @@ -7206,7 +7400,8 @@ run("Blobs (25K)"); \begin_layout Plain Layout -run("Morphological Segmentation"); +run("Morphological Segmentation"); + \end_layout \begin_layout Plain Layout @@ -7216,7 +7411,8 @@ run("Morphological Segmentation"); \begin_layout Plain Layout -wait(1000); +wait(1000); + \end_layout \begin_layout Plain Layout @@ -7226,7 +7422,8 @@ wait(1000); \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", "object"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", + "object"); \end_layout @@ -7237,14 +7434,16 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setInputImageType", "object"); \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setGradientRadius", "1"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setGradientRadius", + "1"); \end_layout \begin_layout Plain Layout -// run segmentation with tolerance 32, calculating the watershed dams, - +// run segmentation with tolerance 32, + calculating the watershed dams, + \end_layout \begin_layout Plain Layout @@ -7254,8 +7453,11 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.setGradientRadius", "1"); \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.segment", "tolerance=32", - "calculateDams=true", "connectivity=4"); +call("inra.ijpb.plugins.MorphologicalSegmentation.segment", + "tolerance=32", + "calculateDams=true", + "connectivity=4"); + \end_layout \begin_layout Plain Layout @@ -7265,8 +7467,8 @@ call("inra.ijpb.plugins.MorphologicalSegmentation.segment", "tolerance=32", \begin_layout Plain Layout -call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", "Overlaid - dams"); +call("inra.ijpb.plugins.MorphologicalSegmentation.setDisplayFormat", + "Overlaid dams"); \end_layout \end_inset @@ -7290,29 +7492,27 @@ Introduction \end_layout \begin_layout Standard -A classic way of separating touching objects in binary images makes use - of the distance transform and the watershed method. - The idea is to create a border as far as possible from the center of the - overlapping objects. - This strategy works very well on rounded objects and it is called Distance - Transform Watershed. +A classic way of separating touching objects in binary images makes use of the distance transform and the watershed method. + The idea is to create a border as far as possible from the center of the overlapping objects. + This strategy works very well on rounded objects and it is called Distance Transform Watershed. It consists on calculating the distance transform of the binary image, - inverting it (so the darkest parts of the image are the centers of the - objects) and then applying watershed on it using the original image as - mask (see Figure + inverting it (so the darkest parts of the image are the centers of the objects) and then applying watershed on it using the original image as mask (see Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:distance-transform-watershed" +nolink "false" \end_inset ). - In our implementation, we include an option to use watershed with extended - minima so the user can control the number of object splits and merges. + In our implementation, + we include an option to use watershed with extended minima so the user can control the number of object splits and merges. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -7368,13 +7568,10 @@ name "fig:distance-transform-watershed" Basics of the Distance Transform Watershed algorithm \series default . - From left to right: sample image of touching DAPI stained cell nuclei from - a confocal laser scanning microscope, binary mask calculated after filtering - and thresholding input image, inverse of the distance transform applied - to the binary mask (Chamfer distance map using normalized Chessknight weights - and 32-bit output) and resulting labeled image after applying watershed - to the inverse distance image using the binary mask (dynamic of 1 and 4-connect -ivity). + From left to right: + sample image of touching DAPI stained cell nuclei from a confocal laser scanning microscope, + binary mask calculated after filtering and thresholding input image, + inverse of the distance transform applied to the binary mask (Chamfer distance map using normalized Chessknight weights and 32-bit output) and resulting labeled image after applying watershed to the inverse distance image using the binary mask (dynamic of 1 and 4-connectivity). \end_layout \end_inset @@ -7418,7 +7615,8 @@ name "subsec:Distance-Transform-Watershed" \begin_layout Standard Distance Transform Watershed needs one 2D 8-bit binary image to run. - If that's the case, a dialog like the following will pop up: + If that's the case, + a dialog like the following will pop up: \end_layout \begin_layout Standard @@ -7433,8 +7631,7 @@ Distance Transform Watershed needs one 2D 8-bit binary image to run. \end_layout \begin_layout Standard -The plugin parameters are divided between the distance transform and the - watershed options: +The plugin parameters are divided between the distance transform and the watershed options: \end_layout \begin_layout Itemize @@ -7451,9 +7648,8 @@ Distance map options \series bold Distances \series default -: allows selecting among a pre-defined set of weights that can be used to - compute the distance transform using Chamfer approximations of the Euclidean - metric (see section +: + allows selecting among a pre-defined set of weights that can be used to compute the distance transform using Chamfer approximations of the Euclidean metric (see section \begin_inset space ~ \end_inset @@ -7461,12 +7657,12 @@ Distances \begin_inset CommandInset ref LatexCommand ref reference "subsec:Distance-Transform" +nolink "false" \end_inset ). - They affect the location but specially the shape of the border in the final - result. + They affect the location but specially the shape of the border in the final result. The options are: \end_layout @@ -7476,7 +7672,8 @@ reference "subsec:Distance-Transform" \series bold Chessboard (1,1) \series default -: weight equal to 1 for all neighbors. +: + weight equal to 1 for all neighbors. \end_layout \begin_layout Itemize @@ -7484,7 +7681,8 @@ Chessboard (1,1) \series bold City-Block (1,2) \series default -: weights 1 for orthogonal neighbors and 2 for diagonal neighbors. +: + weights 1 for orthogonal neighbors and 2 for diagonal neighbors. \end_layout \begin_layout Itemize @@ -7492,7 +7690,8 @@ City-Block (1,2) \series bold Quasi-Euclidean (1,1.41) \series default -: weights 1 for orthogonal neighbors and +: + weights 1 for orthogonal neighbors and \begin_inset Formula $\sqrt{2}$ \end_inset @@ -7504,8 +7703,8 @@ Quasi-Euclidean (1,1.41) \series bold Borgefors (3,4) \series default -: weights 3 for orthogonal neighbors and 4 for diagonal neighbors (best - approximation of Euclidean distance for 3-by-3 masks). +: + weights 3 for orthogonal neighbors and 4 for diagonal neighbors (best approximation of Euclidean distance for 3-by-3 masks). \end_layout \begin_layout Itemize @@ -7513,7 +7712,8 @@ Borgefors (3,4) \series bold Weights (2,3) \series default -: weights 2 for orthogonal neighbors and 3 for diagonal neighbors. +: + weights 2 for orthogonal neighbors and 3 for diagonal neighbors. \end_layout \begin_layout Itemize @@ -7521,7 +7721,8 @@ Weights (2,3) \series bold Weights (5,7) \series default -: weights 5 for orthogonal neighbors and 7 for diagonal neighbors. +: + weights 5 for orthogonal neighbors and 7 for diagonal neighbors. \end_layout \begin_layout Itemize @@ -7529,8 +7730,9 @@ Weights (5,7) \series bold Chessknight (5,7,11) \series default -: weights 5 for orthogonal neighbors and 7 for diagonal neighbors, and 11 - for chess-knight moves (best approximation for 5-by-5 masks). +: + weights 5 for orthogonal neighbors and 7 for diagonal neighbors, + and 11 for chess-knight moves (best approximation for 5-by-5 masks). \end_layout \end_deeper @@ -7539,7 +7741,9 @@ Chessknight (5,7,11) \series bold Output type \series default -: 16 or 32-bit, to calculate distance with short or float precision. +: + 16 or 32-bit, + to calculate distance with short or float precision. \end_layout \begin_layout Itemize @@ -7547,8 +7751,8 @@ Output type \series bold Normalize weights \series default -: indicates whether the resulting distance map should be normalized (divide - distances by the first Chamfer weight). +: + indicates whether the resulting distance map should be normalized (divide distances by the first Chamfer weight). \end_layout \end_deeper @@ -7566,11 +7770,11 @@ Watershed options \series bold Dynamic \series default -: same as in the Morphological Segmentation plugin, this is the dynamic - of intensity for the search of regional minima in the inverse of the distance - transform image. - Basically, by increasing its value there will be more object merges and - by decreasing it there will be more object splits. +: + same as in the Morphological Segmentation plugin, + this is the dynamic of intensity for the search of regional minima in the inverse of the distance transform image. + Basically, + by increasing its value there will be more object merges and by decreasing it there will be more object splits. \end_layout \begin_layout Itemize @@ -7578,15 +7782,16 @@ Dynamic \series bold Connectivity \series default -: pixel connectivity (4 or 8). +: + pixel connectivity (4 or 8). Selecting non-diagonal connectivity (4) usually provides more rounded objects. \end_layout \end_deeper \begin_layout Standard -Finally, the result with the current plugin configuration can be visualized - by clicking on the +Finally, + the result with the current plugin configuration can be visualized by clicking on the \series bold Preview \series default @@ -7602,7 +7807,8 @@ Preview \series bold Result \series default -: 2D 32-bit label image (one index value per object). +: + 2D 32-bit label image (one index value per object). \end_layout \begin_layout Subsection @@ -7618,7 +7824,8 @@ name "subsec:Distance-Transform-Watershed-3d" \begin_layout Standard Distance Transform Watershed 3D needs one 3D 8-bit binary image to run. - If that's the case, a dialog like the following will pop up: + If that's the case, + a dialog like the following will pop up: \end_layout \begin_layout Standard @@ -7634,8 +7841,7 @@ Distance Transform Watershed 3D needs one 3D 8-bit binary image to run. \end_layout \begin_layout Standard -The parameters are the same as in the 2D version but some of them are adapted - for 3D images: +The parameters are the same as in the 2D version but some of them are adapted for 3D images: \end_layout \begin_layout Itemize @@ -7652,7 +7858,8 @@ Distance map options \series bold Distances \series default -: Now the available options are: +: + Now the available options are: \end_layout \begin_deeper @@ -7661,7 +7868,8 @@ Distances \series bold Chessboard (1,1,1) \series default -: weight equal to 1 for all neighbors. +: + weight equal to 1 for all neighbors. \end_layout \begin_layout Itemize @@ -7669,8 +7877,9 @@ Chessboard (1,1,1) \series bold City-Block (1,2,3) \series default -: weights 1 for orthogonal neighbors, 2 for diagonal neighbors and 3 for - cube-diagonals. +: + weights 1 for orthogonal neighbors, + 2 for diagonal neighbors and 3 for cube-diagonals. \end_layout \begin_layout Itemize @@ -7678,7 +7887,9 @@ City-Block (1,2,3) \series bold Quasi-Euclidean (1,1.41,1.73) \series default -: weights 1 for orthogonal neighbors, +: + weights 1 for orthogonal neighbors, + \begin_inset Formula $\sqrt{2}$ \end_inset @@ -7694,9 +7905,9 @@ Quasi-Euclidean (1,1.41,1.73) \series bold Borgefors (3,4,5) \series default -: weights 3 for orthogonal neighbors, 4 for diagonal neighbors and 5 for - cube-diagonals (best approximation of Euclidean distance for 3-by-3-by-3 - masks). +: + weights 3 for orthogonal neighbors, + 4 for diagonal neighbors and 5 for cube-diagonals (best approximation of Euclidean distance for 3-by-3-by-3 masks). \end_layout \end_deeper @@ -7705,7 +7916,9 @@ Borgefors (3,4,5) \series bold Output type \series default -: 16 or 32-bit, to calculate distance with short or float precision. +: + 16 or 32-bit, + to calculate distance with short or float precision. \end_layout \begin_layout Itemize @@ -7713,8 +7926,8 @@ Output type \series bold Normalize weights \series default -: indicates whether the resulting distance map should be normalized (divide - distances by the first Chamfer weight). +: + indicates whether the resulting distance map should be normalized (divide distances by the first Chamfer weight). \end_layout \end_deeper @@ -7732,10 +7945,11 @@ Watershed options \series bold Dynamic \series default -: same as in the 2D version, this is the dynamic of intensity for the search - of regional minima in the inverse of the distance transform image. - Basically, by increasing its value there will be more object merges and - by decreasing it there will be more object splits. +: + same as in the 2D version, + this is the dynamic of intensity for the search of regional minima in the inverse of the distance transform image. + Basically, + by increasing its value there will be more object merges and by decreasing it there will be more object splits. \end_layout \begin_layout Itemize @@ -7743,14 +7957,15 @@ Dynamic \series bold Connectivity \series default -: voxel connectivity (6 or 26). +: + voxel connectivity (6 or 26). Selecting non-diagonal connectivity (6) usually provides more rounded objects. \end_layout \end_deeper \begin_layout Standard -As it is usual in ImageJ, no preview is provided here since we are dealing - with 3D images. +As it is usual in ImageJ, + no preview is provided here since we are dealing with 3D images. \begin_inset Newline newline \end_inset @@ -7762,7 +7977,8 @@ As it is usual in ImageJ, no preview is provided here since we are dealing \series bold Result \series default -: 3D 32-bit label image (one index value per object). +: + 3D 32-bit label image (one index value per object). \end_layout \begin_layout Chapter @@ -7774,15 +7990,18 @@ MorphoLibJ contains several tools for quantifying the \series bold size \series default -, the +, + the \series bold shape \series default -, the +, + the \series bold intensities \series default -, or the +, + or the \series bold spatial organization \series default @@ -7795,6 +8014,7 @@ Sections \begin_inset CommandInset ref LatexCommand ref reference "sec:Region-Analysis" +nolink "false" \end_inset @@ -7802,13 +8022,14 @@ reference "sec:Region-Analysis" \begin_inset CommandInset ref LatexCommand ref reference "sec:Region-Analysis-3D" +nolink "false" \end_inset - to the analysis of 2D and 3D regions, respectively. - Most region analysis operators of the MorphoLibJ library assume the input - image to be either a binary image representing a single region, or a label - image representing a collection of disjoint regions (see section + to the analysis of 2D and 3D regions, + respectively. + Most region analysis operators of the MorphoLibJ library assume the input image to be either a binary image representing a single region, + or a label image representing a collection of disjoint regions (see section \begin_inset space ~ \end_inset @@ -7816,12 +8037,13 @@ reference "sec:Region-Analysis-3D" \begin_inset CommandInset ref LatexCommand ref reference "chap:label-images" +nolink "false" \end_inset ). - The aim is to facilitate the management of label images, contrary to the - built-in + The aim is to facilitate the management of label images, + contrary to the built-in \begin_inset Quotes eld \end_inset @@ -7838,20 +8060,25 @@ The library also provides plugins for intensity measurements (section \begin_inset CommandInset ref LatexCommand ref reference "sec:Intensity-Measurements" +nolink "false" \end_inset -), the comparison of label images (section +), + the comparison of label images (section \begin_inset CommandInset ref LatexCommand ref reference "sec:Label-Overlap-measures" +nolink "false" \end_inset -), and the quantification of spatial organization (section +), + and the quantification of spatial organization (section \begin_inset CommandInset ref LatexCommand ref reference "sec:Region-Adjacency-Graph" +nolink "false" \end_inset @@ -7896,8 +8123,7 @@ name "sec:Region-Analysis" \end_layout \begin_layout Standard -Region analysis usually refers to the quantification of features related - to the +Region analysis usually refers to the quantification of features related to the \series bold size \series default @@ -7918,8 +8144,7 @@ literal "false" \begin_layout Standard Many region features have been proposed to describe morphology of regions. - The MorphoLibJ library proposes plugins to quantify some of the most common - ones: + The MorphoLibJ library proposes plugins to quantify some of the most common ones: \end_layout \begin_layout Itemize @@ -7938,11 +8163,14 @@ reference "subsec:Intrinsic-Volumes-2D" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -) encompass the area, the perimeter, and the Euler number, that quantifies - the topology of the region +) encompass the area, + the perimeter, + and the Euler number, + that quantifies the topology of the region \end_layout \begin_layout Itemize @@ -7961,6 +8189,7 @@ reference "subsec:Geometric-Moment-And-Equivalent-Ellipse" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -7983,6 +8212,7 @@ reference "subsec:Feret-Diameter-And-Oriented-Box" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -7994,8 +8224,8 @@ noprefix "false" \series bold geodesic features \series default - allow to investigate the complexity of the region, in particular the tortuosity - (section + allow to investigate the complexity of the region, + in particular the tortuosity (section \begin_inset space ~ \end_inset @@ -8006,6 +8236,7 @@ reference "subsec:Geodesic-Measurements" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -8028,6 +8259,7 @@ reference "subsec:Average-Thickness" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -8039,8 +8271,7 @@ features describing the size may be combined to obtain \series bold shape indices \series default - that describe the morphology of the regions independently of their size - and location (section + that describe the morphology of the regions independently of their size and location (section \begin_inset space ~ \end_inset @@ -8051,6 +8282,7 @@ reference "subsec:Shape-Indices" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -8059,9 +8291,9 @@ noprefix "false" \begin_layout Standard The following sections will present these features. - For each family of features, we first provide mathematical definitions - of the implemented features, eventually completed by the methods used to - measure them from discrete images. + For each family of features, + we first provide mathematical definitions of the implemented features, + eventually completed by the methods used to measure them from discrete images. A final section (section \begin_inset space ~ \end_inset @@ -8073,6 +8305,7 @@ reference "subsec:Analyze-Regions-Plugins" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -8098,14 +8331,14 @@ The \series bold intrinsic volumes \series default -are a set of features with interesting mathematical properties that are - commonly used for describing individual particles as well as binary microstruct -ures. - In 2D, they correspond to the +are a set of features with interesting mathematical properties that are commonly used for describing individual particles as well as binary microstructures. + In 2D, + they correspond to the \series bold area \series default -, the +, + the \series bold perimeter \series default @@ -8151,12 +8384,13 @@ A(X) & =\int_{X}dx \end_layout \begin_layout Standard -In image analysis, the +In image analysis, + the \series bold measurement of area \series default -of a region simply consists in counting the number of pixels that constitute - it, and to multiply by the area of a single pixel. +of a region simply consists in counting the number of pixels that constitute it, + and to multiply by the area of a single pixel. \end_layout \begin_layout Subsubsection @@ -8179,8 +8413,7 @@ The perimeter \series default of a region corresponds to the length of its boundary. - Its formal definition involves computing an integral over its boundary - + Its formal definition involves computing an integral over its boundary \begin_inset Formula $\partial X$ \end_inset @@ -8208,13 +8441,16 @@ measuring the perimeter \begin_inset CommandInset ref LatexCommand ref reference "fig:Perimeter-Estimation" +nolink "false" \end_inset ). - However, this approach is rather inaccurate. - For example, when counting the boundary pixels of a discretized disk, one - obtain the same perimeter value as the length of the bounding rectangle, + However, + this approach is rather inaccurate. + For example, + when counting the boundary pixels of a discretized disk, + one obtain the same perimeter value as the length of the bounding rectangle, leading to a relative error of more than 25% \begin_inset Foot status open @@ -8224,7 +8460,8 @@ If \begin_inset Formula $d$ \end_inset - is the diameter of the circle, the expected perimeter is + is the diameter of the circle, + the expected perimeter is \begin_inset Formula $\pi d$ \end_inset @@ -8249,6 +8486,8 @@ If \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8256,6 +8495,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8265,7 +8506,7 @@ status open \begin_inset Graphics filename images/analysis/perimeter-measure-boundaryCount.png lyxscale 50 - height 6cm + special height=6cm \end_inset @@ -8288,6 +8529,8 @@ Boundary pixels count \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8297,7 +8540,7 @@ status open \begin_inset Graphics filename images/analysis/perimeter-measure-Crofton.png lyxscale 50 - height 6cm + special height=6cm \end_inset @@ -8347,8 +8590,7 @@ Measurement of perimeter within a discrete image of a disk. \end_layout \begin_layout Standard -The discrete version of Crofton formula can provide a better estimate of - the perimeter than traditional boundary pixel count. +The discrete version of Crofton formula can provide a better estimate of the perimeter than traditional boundary pixel count. The principle is to consider a set of parallel lines with a random orientation, and to count the number of intersections with the region of interest (Figure \begin_inset space ~ @@ -8358,12 +8600,12 @@ The discrete version of Crofton formula can provide a better estimate of \begin_inset CommandInset ref LatexCommand ref reference "fig:Perimeter-Estimation" +nolink "false" \end_inset ). - The number of intersections is proportional to the line density and to - the perimeter + The number of intersections is proportional to the line density and to the perimeter \begin_inset CommandInset citation LatexCommand citep key "Serra_1982,Legland2007,Ohser2009" @@ -8372,15 +8614,15 @@ literal "true" \end_inset . - By averaging over all possible directions, an unbiased estimate can be - obtained. + By averaging over all possible directions, + an unbiased estimate can be obtained. \end_layout \begin_layout Standard Perimeter can be measured using either two directions (horizontal and vertical), or four directions (by adding the diagonals). - Restricting the number of directions introduces an estimation bias, with - known theoretical bounds + Restricting the number of directions introduces an estimation bias, + with known theoretical bounds \begin_inset CommandInset citation LatexCommand citep key "Moran1966,Legland2007" @@ -8389,8 +8631,7 @@ literal "true" \end_inset . - The error made by counting intersections is usually better than boundary - pixel count + The error made by counting intersections is usually better than boundary pixel count \begin_inset CommandInset citation LatexCommand citep key "Lehmann_2012_ij" @@ -8415,8 +8656,8 @@ Euler number topology \series default of a region. - It corresponds to the number of connected components, minus the number - of holes (Fig. + It corresponds to the number of connected components, + minus the number of holes (Fig. \begin_inset space ~ \end_inset @@ -8424,6 +8665,7 @@ of a region. \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number" +nolink "false" \end_inset @@ -8433,6 +8675,8 @@ reference "fig:Euler-Number" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8441,7 +8685,7 @@ status open \align center \begin_inset Graphics filename images/analysis/euler-number-2d-horiz.png - height 3.5cm + special height=3.5cm \end_inset @@ -8459,7 +8703,8 @@ name "fig:Euler-Number" \end_inset Euler Number for 2D regions. - Particle A is composed of a single component, its Euler number is 1. + Particle A is composed of a single component, + its Euler number is 1. Particles B and C present one and two holes respectively. Their corresponding Euler numbers are equal to \begin_inset Formula $0=1-1$ @@ -8483,8 +8728,8 @@ Euler Number for 2D regions. \end_layout \begin_layout Standard -In 2D, the Euler number of a region with smooth boundary also equals the - +In 2D, + the Euler number of a region with smooth boundary also equals the \series bold integral of the curvature \series default @@ -8510,8 +8755,7 @@ name "subsec:Digital-Euler-Number" \end_layout \begin_layout Standard -The measurement of Euler number from binary images is usually performed - by considering a reconstruction of the +The measurement of Euler number from binary images is usually performed by considering a reconstruction of the \series bold connected components \series default @@ -8523,12 +8767,12 @@ connected components \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-Computation-2D" +nolink "false" \end_inset ). - The resulting reconstruction depends on the choice of the connectivity - (see Section + The resulting reconstruction depends on the choice of the connectivity (see Section \begin_inset space ~ \end_inset @@ -8539,12 +8783,14 @@ reference "sec:Digital-Connectivity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ). - For planar images, typical choices are the 4-connectivity, corresponding - to the orthogonal neighbors (Fig. + For planar images, + typical choices are the 4-connectivity, + corresponding to the orthogonal neighbors (Fig. \begin_inset space ~ \end_inset @@ -8552,10 +8798,13 @@ noprefix "false" \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-Computation-2D" +nolink "false" \end_inset --b), and the 8-connectivity, that also consider the diagonal neighbors (Fig. +-b), + and the 8-connectivity, + that also consider the diagonal neighbors (Fig. \begin_inset space ~ \end_inset @@ -8563,12 +8812,12 @@ reference "fig:Euler-Number-Computation-2D" \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-Computation-2D" +nolink "false" \end_inset -b). - The connectivity is also considered for computing morphological reconstructions - (section + The connectivity is also considered for computing morphological reconstructions (section \begin_inset space ~ \end_inset @@ -8576,10 +8825,12 @@ reference "fig:Euler-Number-Computation-2D" \begin_inset CommandInset ref LatexCommand ref reference "sec:Morphological-Reconstruction" +nolink "false" \end_inset -), or for computing the connected component labeling of a binary image (section +), + or for computing the connected component labeling of a binary image (section \begin_inset space ~ \end_inset @@ -8587,6 +8838,7 @@ reference "sec:Morphological-Reconstruction" \begin_inset CommandInset ref LatexCommand ref reference "sec:Connected-Components-Labeling" +nolink "false" \end_inset @@ -8595,6 +8847,8 @@ reference "sec:Connected-Components-Labeling" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8602,6 +8856,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8633,6 +8889,8 @@ Binary image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8664,6 +8922,8 @@ status open \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8708,9 +8968,11 @@ name "fig:Euler-Number-Computation-2D" Determination of the Euler number from binary images. (a) Original binary images. - (b) Euler number computed with 4-connectivity: five components are detected. - (c) Euler number computed using the 8-connectivity: three components are - detected, two of them having holes. + (b) Euler number computed with 4-connectivity: + five components are detected. + (c) Euler number computed using the 8-connectivity: + three components are detected, + two of them having holes. \end_layout \end_inset @@ -8724,8 +8986,10 @@ Determination of the Euler number from binary images. \end_layout \begin_layout Standard -Depening on the chosen connectivity, the resulting Euler number may differ. - For example, the reconstruction presented in Figure +Depening on the chosen connectivity, + the resulting Euler number may differ. + For example, + the reconstruction presented in Figure \begin_inset space ~ \end_inset @@ -8733,13 +8997,14 @@ Depening on the chosen connectivity, the resulting Euler number may differ. \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-Computation-2D" +nolink "false" \end_inset - has Euler number equal to five (the number of connected components), whereas - the Euler number of the reconstruction using the 8-connectivity is equal - to 1: three connected components are obtained, minus two holes within them - (Fig. + has Euler number equal to five (the number of connected components), + whereas the Euler number of the reconstruction using the 8-connectivity is equal to 1: + three connected components are obtained, + minus two holes within them (Fig. \begin_inset space ~ \end_inset @@ -8747,6 +9012,7 @@ reference "fig:Euler-Number-Computation-2D" \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-Computation-2D" +nolink "false" \end_inset @@ -8784,11 +9050,13 @@ A binary region \begin_inset Formula $(p,q)$ \end_inset -, which correspond to an integral of its indicator function +, + which correspond to an integral of its indicator function \begin_inset Formula $I_{X}$ \end_inset -, with various degrees along the directions: +, + with various degrees along the directions: \end_layout \begin_layout Standard @@ -8811,7 +9079,8 @@ The moment of order \begin_inset Formula $X$ \end_inset -: +: + \end_layout \begin_layout Standard @@ -8848,7 +9117,8 @@ It is often more convenient to work with \series bold centered moments \series default -, given by: +, + given by: \end_layout \begin_layout Standard @@ -8864,6 +9134,8 @@ centered moments \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -8872,7 +9144,7 @@ status open \align center \begin_inset Graphics filename images/analysis/demoShape-ellipse.png - height 4.5cm + special height=4.5cm \end_inset @@ -8918,8 +9190,8 @@ The second order centered moments can be arranged into a matrix: \end_layout \begin_layout Standard -By computing the parameters of the ellipse that produces the same moments - up to the second order, one obtains the +By computing the parameters of the ellipse that produces the same moments up to the second order, + one obtains the \series bold equivalent ellipse \series default @@ -8932,7 +9204,8 @@ literal "true" \end_inset . - In particular, the orientation + In particular, + the orientation \begin_inset Formula $\theta$ \end_inset @@ -8970,8 +9243,7 @@ A popular way to assess the size of a region is to measure its largest Feret diameter \series default . - The maximum Feret diameter of a region is simply the maximum distance computed - over all the pairs of points belonging to the region: + The maximum Feret diameter of a region is simply the maximum distance computed over all the pairs of points belonging to the region: \begin_inset Formula \begin{align} F_{\text{max}} & =\max_{\boldsymbol{x},\boldsymbol{y}\in X}d(\boldsymbol{x},\boldsymbol{y}) @@ -8983,8 +9255,7 @@ F_{\text{max}} & =\max_{\boldsymbol{x},\boldsymbol{y}\in X}d(\boldsymbol{x},\bol \end_layout \begin_layout Standard -It is easy to realize that the search can be performed on the set of boundary - points (Fig. +It is easy to realize that the search can be performed on the set of boundary points (Fig. \begin_inset space ~ \end_inset @@ -8992,18 +9263,21 @@ It is easy to realize that the search can be performed on the set of boundary \begin_inset CommandInset ref LatexCommand ref reference "fig:Feret-Diameter-And-Oriented-Box" +nolink "false" \end_inset ). - In practice, the computation of Maximum Feret diameter can be accelerated - by first computing the convex hull of the region. - In MorphoLibJ, the maximal Feret diameter is computed over the corners - of the regions. + In practice, + the computation of Maximum Feret diameter can be accelerated by first computing the convex hull of the region. + In MorphoLibJ, + the maximal Feret diameter is computed over the corners of the regions. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -9012,14 +9286,14 @@ status open \align center \begin_inset Graphics filename images/analysis/demoShape-maxFeret.png - height 4.5cm + special height=4.5cm \end_inset \begin_inset Graphics filename images/analysis/demoShape-orientedBox.png - height 4.5cm + special height=4.5cm \end_inset @@ -9051,11 +9325,8 @@ Feret diameter and oriented box \begin_layout Standard The Feret diameter can be performed on any direction. - Typical choice is to measure the Feret diameter in the direction perpendicular - to the direction of the maximum Feret diameter. - The ratio of the largest Feret diameter and of the Feret diameter measured - in the perpendicular direction gives an indication on the elongation of - the region. + Typical choice is to measure the Feret diameter in the direction perpendicular to the direction of the maximum Feret diameter. + The ratio of the largest Feret diameter and of the Feret diameter measured in the perpendicular direction gives an indication on the elongation of the region. \end_layout @@ -9073,8 +9344,7 @@ OOBB \end_inset ) is closely related to that of Feret diameter. - One possible definition of oriented bounding box is the rectangle with - smallest width that totally encloses the region. + One possible definition of oriented bounding box is the rectangle with smallest width that totally encloses the region. An example is illustrated on Figure \begin_inset space ~ \end_inset @@ -9083,15 +9353,17 @@ OOBB \begin_inset CommandInset ref LatexCommand ref reference "fig:Feret-Diameter-And-Oriented-Box" +nolink "false" \end_inset . - Another definition is the rectangle with smallest area: the two resulting - rectangles are often similar, but may differ in some cases. - Note that in general, the orientation of the largest axis of the oriented - box differs from both the direction of the largest Feret diameter, and - the direction of the equivalent ellipse. + Another definition is the rectangle with smallest area: + the two resulting rectangles are often similar, + but may differ in some cases. + Note that in general, + the orientation of the largest axis of the oriented box differs from both the direction of the largest Feret diameter, + and the direction of the equivalent ellipse. \end_layout \begin_layout Subsection @@ -9109,14 +9381,14 @@ name "subsec:Geodesic-Measurements" \end_layout \begin_layout Standard -For particles with complex shapes, the +For particles with complex shapes, + the \series bold geodesic diameter \series default may be of interest. - It corresponds of the largest geodesic distance between two points within - a region, the geodesic distance being the length of the shortest path joining - the two points while staying inside the region + It corresponds of the largest geodesic distance between two points within a region, + the geodesic distance being the length of the shortest path joining the two points while staying inside the region \begin_inset CommandInset citation LatexCommand citep key "Lantuejoul1981" @@ -9133,6 +9405,7 @@ literal "true" \begin_inset CommandInset ref LatexCommand ref reference "fig:Geodesic-Diameter" +nolink "false" \end_inset @@ -9141,6 +9414,8 @@ reference "fig:Geodesic-Diameter" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -9149,7 +9424,7 @@ status open \align center \begin_inset Graphics filename images/analysis/demoShape-geodDiam.png - height 4.5cm + special height=4.5cm \end_inset @@ -9175,9 +9450,10 @@ name "fig:Geodesic-Diameter" \end_inset Geodesic diameter. - Left: illustration of the geodesic diameter on a simple particle. - Right: computation of the geodesic diameter on a segmented image from the - DRIVE database + Left: + illustration of the geodesic diameter on a simple particle. + Right: + computation of the geodesic diameter on a segmented image from the DRIVE database \begin_inset CommandInset citation LatexCommand citep key "Staal_2004_tmi" @@ -9186,9 +9462,8 @@ literal "true" \end_inset . - Each connected component was associated to a label, then the longest geodesic - path within each connected component was computed and displayed as red - overlay. + Each connected component was associated to a label, + then the longest geodesic path within each connected component was computed and displayed as red overlay. \end_layout \end_inset @@ -9202,8 +9477,7 @@ literal "true" \end_layout \begin_layout Standard -The implementation of geodesic diameter within MorphoLibJ relies on Chamfer - distances propagation (see section +The implementation of geodesic diameter within MorphoLibJ relies on Chamfer distances propagation (see section \begin_inset space ~ \end_inset @@ -9211,12 +9485,13 @@ The implementation of geodesic diameter within MorphoLibJ relies on Chamfer \begin_inset CommandInset ref LatexCommand ref reference "subsec:Geodesic-Distance-Transform" +nolink "false" \end_inset ). - Hence, the actual value may be somewhat over-estimated due to the approximation - in the measurements. + Hence, + the actual value may be somewhat over-estimated due to the approximation in the measurements. \end_layout \begin_layout Subsection @@ -9259,10 +9534,12 @@ reference "subsec:Largest-inscribed-circle-plugin" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -, Fig. +, + Fig. \begin_inset space ~ \end_inset @@ -9273,16 +9550,19 @@ reference "fig:Thickness" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ). - This method however often over-estimates the thickness, as it measures - thickness at the largest point within the region. + This method however often over-estimates the thickness, + as it measures thickness at the largest point within the region. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -9291,14 +9571,14 @@ status open \align center \begin_inset Graphics filename images/analysis/demoShape-inscrDisk.png - height 4.5cm + special height=4.5cm \end_inset \begin_inset Graphics filename images/analysis/sample_particle-distMap_skelOVR.tif - height 4.5cm + special height=4.5cm \end_inset @@ -9316,8 +9596,10 @@ name "fig:Thickness" \end_inset Evaluation of the thickness using two methods. - On the left, computation of the largest inscribed circle. - On the right, computation of the average thickness over the skeleton. + On the left, + computation of the largest inscribed circle. + On the right, + computation of the average thickness over the skeleton. \end_layout \end_inset @@ -9335,9 +9617,8 @@ The MorphoLibJ library also proposes to measure \series bold average thickness \series default - by first computing the skeleton of the region, and then to measure for - each pixel of the skeleton the distance to the closest background point - in the original image (Fig. + by first computing the skeleton of the region, + and then to measure for each pixel of the skeleton the distance to the closest background point in the original image (Fig. \begin_inset space ~ \end_inset @@ -9348,12 +9629,13 @@ reference "fig:Thickness" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ). - This way, the thickness measure is integrated over the whole region skeleton - and is more representative. + This way, + the thickness measure is integrated over the whole region skeleton and is more representative. \end_layout \begin_layout Subsection @@ -9375,7 +9657,9 @@ It is often convenient to describe and \series bold quantify the shape \series default -of regions independently of their location, orientation, or relative scaling. +of regions independently of their location, + orientation, + or relative scaling. Several indices are commonly used to describe the shape of the particles, independently of their size. We present here the definitions used within the MorphoLibJ plugins. @@ -9408,7 +9692,8 @@ shape factor \begin_inset Quotes erd \end_inset -, or +, + or \begin_inset Quotes eld \end_inset @@ -9416,8 +9701,8 @@ isperimetric deficit index \begin_inset Quotes erd \end_inset -) is defined as the ratio of area over the square of the perimeter, normalized - such that the value for a disk equals one: +) is defined as the ratio of area over the square of the perimeter, + normalized such that the value for a disk equals one: \begin_inset Formula \begin{eqnarray} \mbox{circularity} & = & 4\pi\frac{A}{P^{2}} @@ -9429,13 +9714,12 @@ isperimetric deficit index \end_layout \begin_layout Standard -While the values of isoperimetric deficit index theoretically range within - the interval +While the values of isoperimetric deficit index theoretically range within the interval \begin_inset Formula $[0;1]$ \end_inset -, the measurements errors of the perimeter may produce circularity values - above 1 +, + the measurements errors of the perimeter may produce circularity values above 1 \begin_inset CommandInset citation LatexCommand citep key "Lehmann_2012_ij" @@ -9474,8 +9758,7 @@ solidity \begin_inset Quotes erd \end_inset -) is defined as the ratio of the area of the region over the area of its - convex hull. +) is defined as the ratio of the area of the region over the area of its convex hull. \begin_inset Formula \begin{align*} \text{convexity} & =\frac{A(X)}{A(\text{ConvHull}(X))} @@ -9488,6 +9771,8 @@ solidity \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -9496,7 +9781,7 @@ status open \align center \begin_inset Graphics filename images/analysis/demoShape-convexity.png - height 4.5cm + special height=4.5cm \end_inset @@ -9548,6 +9833,7 @@ reference "op:Convexify" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -9560,9 +9846,9 @@ Elongation \end_layout \begin_layout Standard -The MorphoLibJ library provides several shape indices describing the elongation - of the regions. - Their values is 1 for a disk, and increase for elongated regions. +The MorphoLibJ library provides several shape indices describing the elongation of the regions. + Their values is 1 for a disk, + and increase for elongated regions. \end_layout \begin_layout Description @@ -9578,7 +9864,8 @@ elongation \begin_inset space ~ \end_inset -factor, defined as the ratio of the largest over the smallest axis lengths, +factor, + defined as the ratio of the largest over the smallest axis lengths, can be used to quantify the shape of the region. \end_layout @@ -9599,8 +9886,8 @@ box \begin_inset space ~ \end_inset -elongation, defined as the ratio of the length of the oriented bounding - box over its width +elongation, + defined as the ratio of the length of the oriented bounding box over its width \end_layout \begin_layout Description @@ -9612,8 +9899,8 @@ geodesic \begin_inset space ~ \end_inset -elongation, defined as the ratio of the geodesic diameter of the diameter - of the largest inscribed disk. +elongation, + defined as the ratio of the geodesic diameter of the diameter of the largest inscribed disk. \end_layout \begin_layout Subsubsection @@ -9625,15 +9912,14 @@ The \series bold tortuosity \series default - is defined as the ratio of the geodesic diameter over the largest Feret - diameter. + is defined as the ratio of the geodesic diameter over the largest Feret diameter. \end_layout \begin_layout Standard It describes the complexity of the region. - Its theroretical value is 1 for convex regions, and increases for regions - with complex geometries. + Its theroretical value is 1 for convex regions, + and increases for regions with complex geometries. \end_layout \begin_layout Subsection @@ -9651,12 +9937,14 @@ name "subsec:Analyze-Regions-Plugins" \end_layout \begin_layout Standard -Most MorphoLibJ plugins consider the current image as input, that must be - either binary (only one region is considered), or label (typically the - result of a connected components labeling, see section +Most MorphoLibJ plugins consider the current image as input, + that must be either binary (only one region is considered), + or label (typically the result of a connected components labeling, + see section \begin_inset CommandInset ref LatexCommand ref reference "sec:Connected-Components-Labeling" +nolink "false" \end_inset @@ -9666,8 +9954,7 @@ reference "sec:Connected-Components-Labeling" ResultsTable \emph default ) containing one row for each label actually present within the image. - The spatial calibration of the image is taken into account for most measurement -s. + The spatial calibration of the image is taken into account for most measurements. All plugins can be found under the \begin_inset Quotes eld \end_inset @@ -9706,7 +9993,9 @@ Analyze Regions \end_inset ). - For 2D particles, the area, the perimeter and derived features are implemented. + For 2D particles, + the area, + the perimeter and derived features are implemented. \end_layout @@ -9721,8 +10010,8 @@ Area the area of the regions \begin_layout Labeling \labelwidthstring 00.00.0000 -Perimeter the perimeter, measured using discrete version of Crofton formula - (see section +Perimeter the perimeter, + measured using discrete version of Crofton formula (see section \begin_inset space ~ \end_inset @@ -9730,6 +10019,7 @@ Perimeter the perimeter, measured using discrete version of Crofton formula \begin_inset CommandInset ref LatexCommand ref reference "subsec:Intrinsic-Volumes-2D" +nolink "false" \end_inset @@ -9753,8 +10043,8 @@ Equivalent \begin_inset space ~ \end_inset -Ellipse the position, size and orientation of the equivalent ellipse (see - section +Ellipse the position, + size and orientation of the equivalent ellipse (see section \begin_inset space ~ \end_inset @@ -9765,6 +10055,7 @@ reference "subsec:Geometric-Moment-And-Equivalent-Ellipse" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -9779,10 +10070,12 @@ Ellipse_Elong. \begin_layout Labeling \labelwidthstring 00.00.0000 -Convexity the convexity, as defined in section +Convexity the convexity, + as defined in section \begin_inset CommandInset ref LatexCommand ref reference "subsec:Convexity" +nolink "false" \end_inset @@ -9808,8 +10101,8 @@ Oriented \begin_inset space ~ \end_inset -Box the position, size and orientation of the oriented box with smallest - width +Box the position, + size and orientation of the oriented box with smallest width \end_layout \begin_layout Labeling @@ -9837,8 +10130,8 @@ Diameter the length of the geodesic diameter \begin_layout Labeling \labelwidthstring 00.00.0000 -Tortuosity the tortuosity, as the ratio of geodesic diameter over largest - Feret diameter +Tortuosity the tortuosity, + as the ratio of geodesic diameter over largest Feret diameter \end_layout \begin_layout Labeling @@ -9851,8 +10144,7 @@ inscribed \begin_inset space ~ \end_inset -disc the position and the radius of the largest circle that can be inscribed - within the region +disc the position and the radius of the largest circle that can be inscribed within the region \end_layout \begin_layout Labeling @@ -9866,8 +10158,8 @@ Elong. \end_layout \begin_layout Standard -The first columns of the resulting ResultsTable contain the label of the - regions, to facilitate their identification. +The first columns of the resulting ResultsTable contain the label of the regions, + to facilitate their identification. \end_layout \begin_layout Subsubsection @@ -9893,8 +10185,7 @@ Bounding Box plugin \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for binary images) +Label the label of the region measured on the current line (equal to 255 for binary images) \end_layout \begin_layout Labeling @@ -9918,8 +10209,7 @@ Box2D.YMax the maximum y coordinate \end_layout \begin_layout Standard -It is also possible to draw the resulting bounding box(es) onto another - image (Fig. +It is also possible to draw the resulting bounding box(es) onto another image (Fig. \begin_inset space ~ \end_inset @@ -9927,6 +10217,7 @@ It is also possible to draw the resulting bounding box(es) onto another \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-1" +nolink "false" \end_inset @@ -9935,6 +10226,8 @@ reference "fig:Regions-Analysis-Output-1" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -9942,6 +10235,8 @@ status collapsed \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -9973,6 +10268,8 @@ Bounding Box \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10004,6 +10301,8 @@ Equivalent Ellipse \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10071,15 +10370,13 @@ The \series bold Equivalent Ellipse plugin \series default - computes the equivalent ellipse for each region within a binary or label - image. + computes the equivalent ellipse for each region within a binary or label image. The result of the plugin comprises the following features: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for binary images) +Label the label of the region measured on the current line (equal to 255 for binary images) \end_layout \begin_layout Labeling @@ -10104,13 +10401,12 @@ Ellipse.Radius2 the length of the smallest semi-axis \begin_layout Labeling \labelwidthstring 00.00.0000 -Ellipse.Orientation the orientation of the ellipse, in degrees from the horizonta -l. +Ellipse.Orientation the orientation of the ellipse, + in degrees from the horizontal. \end_layout \begin_layout Standard -It is also possible to draw the resulting ellipse(s) onto another image - (Fig. +It is also possible to draw the resulting ellipse(s) onto another image (Fig. \begin_inset space ~ \end_inset @@ -10118,6 +10414,7 @@ It is also possible to draw the resulting ellipse(s) onto another image \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-1" +nolink "false" \end_inset @@ -10133,15 +10430,14 @@ The \series bold Max Feret Diameter plugin \series default - computes the length of the largest Feret diameter of each region within - a binary or label image, as well as the position of the extreme points. + computes the length of the largest Feret diameter of each region within a binary or label image, + as well as the position of the extreme points. The result of the plugin comprises the following features: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for bionary images) +Label the label of the region measured on the current line (equal to 255 for bionary images) \end_layout \begin_layout Labeling @@ -10151,7 +10447,8 @@ Diameter the length of the Feret diameter \begin_layout Labeling \labelwidthstring 00.00.0000 -Orientation the orientation of the diameter, in degrees from the horizontal +Orientation the orientation of the diameter, + in degrees from the horizontal \end_layout \begin_layout Labeling @@ -10175,8 +10472,7 @@ P2.Y the y-coordinate of the second extremity \end_layout \begin_layout Standard -It is also possible to draw the resulting diameter as a line segment onto - another image (Fig. +It is also possible to draw the resulting diameter as a line segment onto another image (Fig. \begin_inset space ~ \end_inset @@ -10184,6 +10480,7 @@ It is also possible to draw the resulting diameter as a line segment onto \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-1" +nolink "false" \end_inset @@ -10199,15 +10496,13 @@ The \series bold Oriented Box plugin \series default - computes the minimal width oriented bounding box of each region within - a binary or label image. + computes the minimal width oriented bounding box of each region within a binary or label image. The result of the plugin comprises the following features: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for bionary images) +Label the label of the region measured on the current line (equal to 255 for bionary images) \end_layout \begin_layout Labeling @@ -10232,12 +10527,12 @@ OBox.Width the width of the oriented box \begin_layout Labeling \labelwidthstring 00.00.0000 -OBox.Orientation the orientation of the box, in degrees from the horizontal. +OBox.Orientation the orientation of the box, + in degrees from the horizontal. \end_layout \begin_layout Standard -It is also possible to draw the resulting oriented boxe(s) onto another - image (Fig. +It is also possible to draw the resulting oriented boxe(s) onto another image (Fig. \begin_inset space ~ \end_inset @@ -10245,6 +10540,7 @@ It is also possible to draw the resulting oriented boxe(s) onto another \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-2" +nolink "false" \end_inset @@ -10253,6 +10549,8 @@ reference "fig:Regions-Analysis-Output-2" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10260,6 +10558,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10291,6 +10591,8 @@ Oriented box \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10322,6 +10624,8 @@ Geodesic diameter \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10395,8 +10699,7 @@ Geodesic Diameter plugin \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for binary images) +Label the label of the region measured on the current line (equal to 255 for binary images) \end_layout \begin_layout Labeling @@ -10411,8 +10714,8 @@ Diam. \begin_layout Labeling \labelwidthstring 00.00.0000 -Radius the radius of the largest inscribed circle, which is computed during - the algorithm. +Radius the radius of the largest inscribed circle, + which is computed during the algorithm. \end_layout \begin_layout Labeling @@ -10422,10 +10725,8 @@ Geod. \end_inset Elong. - the ratio of geodesic diameter over the diameter of the largest inscribed - circle. - The values range from 1 for nearly round particles and increases for elongated - particles. + the ratio of geodesic diameter over the diameter of the largest inscribed circle. + The values range from 1 for nearly round particles and increases for elongated particles. \end_layout \begin_layout Labeling @@ -10456,8 +10757,7 @@ y2 coordinates of another geodesic extremity of the particle. \end_layout \begin_layout Standard -It is also possible to draw the resulting geodesic paths onto another image - (Fig. +It is also possible to draw the resulting geodesic paths onto another image (Fig. \begin_inset space ~ \end_inset @@ -10465,6 +10765,7 @@ It is also possible to draw the resulting geodesic paths onto another image \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-2" +nolink "false" \end_inset @@ -10490,18 +10791,16 @@ The \series bold largest inscribed circle plugin \series default -computes for each label the largest disk that can be enclosed within the - corresponding particle. - The plugin opens a dialog that allows to choose the label image to characterize -, the choice of the method for computing distance, and eventually the image - on which overlaid circles can be drawn. +computes for each label the largest disk that can be enclosed within the corresponding particle. + The plugin opens a dialog that allows to choose the label image to characterize, + the choice of the method for computing distance, + and eventually the image on which overlaid circles can be drawn. The output of the plugin includes the following information: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Label the label of the region measured on the current line (equal to 255 - for bionary images) +Label the label of the region measured on the current line (equal to 255 for bionary images) \end_layout \begin_layout Labeling @@ -10528,6 +10827,7 @@ It is also possible to draw the resulting circle(s) onto another image (Fig. \begin_inset CommandInset ref LatexCommand ref reference "fig:Regions-Analysis-Output-2" +nolink "false" \end_inset @@ -10557,8 +10857,9 @@ name "sec:Region-Analysis-3D" \begin_layout Standard Region analysis may also be performed on 3D images. - As for 2D images, input images may be either binary (corresponding to a - single region), or contain the labels of the different regions to analyze. + As for 2D images, + input images may be either binary (corresponding to a single region), + or contain the labels of the different regions to analyze. \end_layout \begin_layout Subsection @@ -10566,15 +10867,18 @@ Intrinsic volumes \end_layout \begin_layout Standard -For 3D particles, intrinsic volumes correspond to the +For 3D particles, + intrinsic volumes correspond to the \series bold volume \series default -, the +, + the \series bold surface area \series default -, the +, + the \series bold mean breadth \series default @@ -10583,10 +10887,9 @@ mean breadth 3D Euler number \series default . - While the volume and the surface area are rather common, the latter two - are less intuitive. - Both the mean breadth and the 3D Euler number can be related to the curvatures - that can be measured on smooth surfaces. + While the volume and the surface area are rather common, + the latter two are less intuitive. + Both the mean breadth and the 3D Euler number can be related to the curvatures that can be measured on smooth surfaces. \end_layout \begin_layout Subsubsection @@ -10610,7 +10913,8 @@ surface area \begin_inset Formula $\partial X$ \end_inset - can be defined using integrals over the set, or over its boundary: + can be defined using integrals over the set, + or over its boundary: \begin_inset Formula \begin{align} V(X) & =\int_{X}dx @@ -10626,8 +10930,9 @@ The measurement of \series bold volume of 3D region \series default - is as straightforward as in 2D: it consists in counting the voxels that - belong to the 3D region, multiplied by the volume of an individual voxel. + is as straightforward as in 2D: + it consists in counting the voxels that belong to the 3D region, + multiplied by the volume of an individual voxel. \end_layout @@ -10665,8 +10970,8 @@ The measurement of surface area \series default from 3D binary images follows the same principle as the estimation of perimeter. - One considers the intersections of the region with straight lines, and - averages over all possible directions + One considers the intersections of the region with straight lines, + and averages over all possible directions \begin_inset CommandInset citation LatexCommand citep key "Lang2001,Legland2007" @@ -10675,11 +10980,11 @@ literal "true" \end_inset . - The number of directions is typically chosen equal to 3 (the three main - axes in image), or 13 (by considering also diagonals). - As for perimeter estimation, surface area estimation is usually biased, - but is usually more precise than measuring the surface area of the polygonal - mesh reconstructed from binary images + The number of directions is typically chosen equal to 3 (the three main axes in image), + or 13 (by considering also diagonals). + As for perimeter estimation, + surface area estimation is usually biased, + but is usually more precise than measuring the surface area of the polygonal mesh reconstructed from binary images \begin_inset CommandInset citation LatexCommand citep key "Lehmann_2012_ij" @@ -10706,11 +11011,11 @@ The \series bold mean breadth \series default -, also known as the mean width or the mean diameter, is a feature that quantifie -s the size of a set as an average diameter. - In the case of a convex set, the average breadth corresponds to the average - of the caliper diameter (or Feret diameter) measured over all directions - (Fig. +, + also known as the mean width or the mean diameter, + is a feature that quantifies the size of a set as an average diameter. + In the case of a convex set, + the average breadth corresponds to the average of the caliper diameter (or Feret diameter) measured over all directions (Fig. \begin_inset space ~ \end_inset @@ -10721,6 +11026,7 @@ reference "fig:Mean-breadth" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -10730,6 +11036,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10737,6 +11045,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10768,6 +11078,8 @@ Convex set. \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -10811,8 +11123,8 @@ name "fig:Mean-breadth" \end_inset Mean breadth of a convex (a) and of a non convex (b) set. - In the case of a non-convex set, the concavities are taken into account - for measuring the diameters. + In the case of a non-convex set, + the concavities are taken into account for measuring the diameters. \end_layout \end_inset @@ -10826,8 +11138,9 @@ Mean breadth of a convex (a) and of a non convex (b) set. \end_layout \begin_layout Standard -In the case of a non-convex set, the concavities are taken into account - for measuring the diameters, resulting in +In the case of a non-convex set, + the concavities are taken into account for measuring the diameters, + resulting in \begin_inset Quotes eld \end_inset @@ -10850,13 +11163,13 @@ reference "fig:Mean-breadth" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). - For 3D sets, the measurements of total projected diameter consists in measuring - the (2D) Euler number of the intersection of the set with planes orthogonal - to the direction + For 3D sets, + the measurements of total projected diameter consists in measuring the (2D) Euler number of the intersection of the set with planes orthogonal to the direction \begin_inset CommandInset citation LatexCommand citep key "Serra_1982" @@ -10869,7 +11182,9 @@ literal "false" \begin_inset Formula $\Omega$ \end_inset -, the set of all directions, results in the mean breadth +, + the set of all directions, + results in the mean breadth \begin_inset Formula $\bar{b}$ \end_inset @@ -10896,8 +11211,8 @@ For a three-dimensional set \begin_inset Formula $\partial X$ \end_inset -, an alternative definition of the mean breadth is based on integral geometry - +, + an alternative definition of the mean breadth is based on integral geometry \begin_inset CommandInset citation LatexCommand citep key "Serra_1982,Ohser2009" @@ -10914,7 +11229,8 @@ literal "true" \begin_inset Formula $\partial X$ \end_inset -, two curvatures +, + two curvatures \begin_inset Formula $\kappa_{1}(x)$ \end_inset @@ -10923,11 +11239,14 @@ literal "true" \end_inset can be defined. - The integral of their average over the surface, known as the + The integral of their average over the surface, + known as the \series bold integral of the mean curvature \series default -, is proportional to the mean breadth: +, + is proportional to the mean breadth: + \begin_inset Formula \begin{align} \bar{b}(X) & =\frac{1}{2\pi}\int_{\partial X}\frac{\kappa_{1}(x)+\kappa_{2}(x)}{2}dx @@ -10939,14 +11258,14 @@ integral of the mean curvature \end_layout \begin_layout Standard -In practice, the mean breadth may be computed from digital binary images - by considering elementary configurations of +In practice, + the mean breadth may be computed from digital binary images by considering elementary configurations of \begin_inset Formula $2\times2\times2$ \end_inset - voxels, identifying the contribution of this configuration to the total - mean breadth, and combining with the histogram of binary configuration - within the image + voxels, + identifying the contribution of this configuration to the total mean breadth, + and combining with the histogram of binary configuration within the image \begin_inset CommandInset citation LatexCommand citep key "Ohser2009,Legland2007" @@ -10962,13 +11281,14 @@ Euler number \end_layout \begin_layout Standard -As in 2D, the +As in 2D, + the \series bold 3D Euler number \series default also quantifies the topology of a set. - It corresponds to the number of connected components, minus the number - of + It corresponds to the number of connected components, + minus the number of \begin_inset Quotes eld \end_inset @@ -10984,7 +11304,8 @@ tunnels \begin_inset Quotes eld \end_inset - through the structure, plus the number of bubbles within the particles + through the structure, + plus the number of bubbles within the particles \begin_inset CommandInset citation LatexCommand citep key "Serra_1982,Ohser2009" @@ -10992,7 +11313,8 @@ literal "true" \end_inset -, see Figure +, + see Figure \begin_inset space ~ \end_inset @@ -11000,6 +11322,7 @@ literal "true" \begin_inset CommandInset ref LatexCommand ref reference "fig:Euler-Number-3d" +nolink "false" \end_inset @@ -11008,6 +11331,8 @@ reference "fig:Euler-Number-3d" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -11016,7 +11341,7 @@ status open \align center \begin_inset Graphics filename images/analysis/euler-number-3d.png - height 4cm + special height=4cm \end_inset @@ -11034,8 +11359,8 @@ name "fig:Euler-Number-3d" \end_inset Euler Number of a 3D particle. - The Euler number equals -1, corresponding to the subtraction of 1 connected - components minus two handles. + The Euler number equals -1, + corresponding to the subtraction of 1 connected components minus two handles. \end_layout \end_inset @@ -11057,11 +11382,13 @@ For a set \begin_inset Formula $\partial X$ \end_inset -, the 3D Euler number is proportionnal to the integral of the +, + the 3D Euler number is proportionnal to the integral of the \series bold gaussian curvature \series default -, corresponding to the product of the curvatures: +, + corresponding to the product of the curvatures: \begin_inset Formula \begin{align} \chi(X) & =\frac{1}{4\pi}\int_{\partial X}\kappa_{1}(x)\cdot\kappa_{2}(x)dx @@ -11073,12 +11400,12 @@ gaussian curvature \end_layout \begin_layout Standard -As for 2D images, the measurement of Euler number from 3D images also relies - on the choice of a connectivity between adjacent voxels. - In 3D, the 6-connectivity considers the neighbors in the three main directions - within the image, whereas the 26 connectivity also considers the diagonals. - Other connectivities have been proposed but are not implemented in MorphoLibJ - +As for 2D images, + the measurement of Euler number from 3D images also relies on the choice of a connectivity between adjacent voxels. + In 3D, + the 6-connectivity considers the neighbors in the three main directions within the image, + whereas the 26 connectivity also considers the diagonals. + Other connectivities have been proposed but are not implemented in MorphoLibJ \begin_inset CommandInset citation LatexCommand citep key "Ohser2009" @@ -11087,12 +11414,11 @@ literal "true" \end_inset . - Note that depending on the choice of connectivity, very different results - may be obtained. - Such differences may result from the small irregularities arising in images - after segmentation. - A typical work-around is to regularize the binary or label image, for example - by applying + Note that depending on the choice of connectivity, + very different results may be obtained. + Such differences may result from the small irregularities arising in images after segmentation. + A typical work-around is to regularize the binary or label image, + for example by applying \begin_inset ERT status open @@ -11162,11 +11488,9 @@ The first moment \end_inset corresponds to the volume of the particle. - The normalization of the first-order moments by the volume leads to the - 3D centroid of the particle. + The normalization of the first-order moments by the volume leads to the 3D centroid of the particle. The second-order moments can be used to compute an equivalent ellipsoid, - defined as the ellipsoid with the same moments up to the second order as - the region of interest (see appendix + defined as the ellipsoid with the same moments up to the second order as the region of interest (see appendix \begin_inset space ~ \end_inset @@ -11177,6 +11501,7 @@ reference "chap:Equivalent-Ellipsoid-Computation" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -11188,8 +11513,7 @@ Equivalent Ellipsoid plugin \end_layout \begin_layout Standard -Returns the parameters of the equivalent ellipsoid into a ResultsTable with - the following columns: +Returns the parameters of the equivalent ellipsoid into a ResultsTable with the following columns: \end_layout \begin_layout Labeling @@ -11238,8 +11562,8 @@ yaw \begin_layout Labeling \labelwidthstring 00.00.0000 -Ellipsoid.Theta the elevation of the major axis on the XY plane, in degrees - ( +Ellipsoid.Theta the elevation of the major axis on the XY plane, + in degrees ( \begin_inset Quotes eld \end_inset @@ -11260,11 +11584,14 @@ roll \begin_inset Quotes erd \end_inset -), in degrees +), + in degrees \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -11312,6 +11639,7 @@ The three angles correspond to a succession of three rotations (see Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Ellipsoid-Angles" +nolink "false" \end_inset @@ -11421,8 +11749,8 @@ name "subsec:Shape-Indices-3D" \end_layout \begin_layout Standard -In 3D, shape indices can be also defined to quantify the shape of the regions - independently of their size. +In 3D, + shape indices can be also defined to quantify the shape of the regions independently of their size. \end_layout \begin_layout Minisec @@ -11459,8 +11787,8 @@ status open \end_inset to 3D. - It can be defined as the ratio of the squared volume over the cube of the - surface area, normalized such that the value for a ball equals one: + It can be defined as the ratio of the squared volume over the cube of the surface area, + normalized such that the value for a ball equals one: \begin_inset Formula \begin{eqnarray} \mbox{sphericity} & = & 36\pi\frac{V^{2}}{S^{3}} @@ -11472,8 +11800,8 @@ status open \end_layout \begin_layout Standard -Other shape factors may be obtained by computing normalized ratios of volume - with mean breadth, or surface with mean breadth. +Other shape factors may be obtained by computing normalized ratios of volume with mean breadth, + or surface with mean breadth. Their interpretation is however often not obvious. \end_layout @@ -11482,11 +11810,12 @@ Elongation \end_layout \begin_layout Standard -It is also possible to compute elongation factors from ratio of the radiuses - if the equivalent ellipsoid. - With three radius values, three ratios can be computed. - In MorphoLibJ, the largest radius is used as numerator, resulting in the - following ratios: +It is also possible to compute elongation factors from ratio of the radiuses if the equivalent ellipsoid. + With three radius values, + three ratios can be computed. + In MorphoLibJ, + the largest radius is used as numerator, + resulting in the following ratios: \begin_inset Formula \[ e_{12}=\frac{r_{1}}{r_{2}},\,e_{23}=\frac{r_{2}}{r_{3}},\,e_{13}=\frac{r_{1}}{r_{3}},\text{ with }r_{1}\ge r_{2}\ge r_{3} @@ -11538,7 +11867,8 @@ Analyze Regions 3D \emph on ResultsTable \emph default -, whose name contains the name of the original image. +, + whose name contains the name of the original image. \end_layout \begin_layout Minisec @@ -11556,8 +11886,7 @@ The \series bold Interface Surface Area \series default - plugin allows to measure the surface area of the interface between two - labels within a + plugin allows to measure the surface area of the interface between two labels within a \begin_inset ERT status open @@ -11605,17 +11934,18 @@ Label \begin_layout Labeling \labelwidthstring 00.00.0000 -Method the number of directions to use for the computation (either 3 or - 13). +Method the number of directions to use for the computation (either 3 or 13). \end_layout \begin_layout Standard One of the two labels can have the value 0. - In this case, the interface of the other label with the background is measured. + In this case, + the interface of the other label with the background is measured. \end_layout \begin_layout Standard -If the two regions do not touch anywhere, the resulting value will be 0. +If the two regions do not touch anywhere, + the resulting value will be 0. The \begin_inset ERT status open @@ -11651,6 +11981,7 @@ reference "sec:Region-Adjacency-Graph" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -11672,8 +12003,7 @@ name "sec:Intensity-Measurements" \end_layout \begin_layout Standard -Other measurements are provided for pairs of grayscale and label 2D or 3D - images ( +Other measurements are provided for pairs of grayscale and label 2D or 3D images ( \begin_inset Quotes eld \end_inset @@ -11685,17 +12015,20 @@ Intensity Measurements 2D/3D \end_inset ). - The label image can correspond to a segmented particle, or to a more generic - region of interest. + The label image can correspond to a segmented particle, + or to a more generic region of interest. \end_layout \begin_layout Standard -The plugin calculates the mean, standard deviation, maximum, minimum, median, - mode, skewness and kurtosis of the intensity value distribution of each - labeled region in the grayscale image as well as the same statistics of - the neighboring (adjacent) regions of each of the labels. - If a regions has no adjacent labels, their measurements will appear as - NaN (not a number). +The plugin calculates the mean, + standard deviation, + maximum, + minimum, + median, + mode, + skewness and kurtosis of the intensity value distribution of each labeled region in the grayscale image as well as the same statistics of the neighboring (adjacent) regions of each of the labels. + If a regions has no adjacent labels, + their measurements will appear as NaN (not a number). The results are displayed in an ImageJ \emph on ResultsTable @@ -11725,8 +12058,8 @@ name "sec:Label-Overlap-measures" \end_layout \begin_layout Standard -Given two label images, there are different measures that allow us to evaluate - the overlap agreement (or error) between the labels. +Given two label images, + there are different measures that allow us to evaluate the overlap agreement (or error) between the labels. Following \begin_inset CommandInset citation LatexCommand citet @@ -11735,7 +12068,8 @@ literal "true" \end_inset -, and given a source image +, + and given a source image \begin_inset ERT status open @@ -11757,9 +12091,8 @@ $T$ \end_inset -, this plugin provides the following overlap measurements in two different - result tables (one with the total values for all labels and one with values - for individual labels): +, + this plugin provides the following overlap measurements in two different result tables (one with the total values for all labels and one with values for individual labels): \end_layout \begin_layout Itemize @@ -12025,10 +12358,9 @@ Microstructure analysis \end_layout \begin_layout Standard -In some cases, the content of the image to analyze is better seen as a represent -ative observation of a stationnary binary process. - This context arise frequently in material sciences or in the study of porous - media such as bone material +In some cases, + the content of the image to analyze is better seen as a representative observation of a stationnary binary process. + This context arise frequently in material sciences or in the study of porous media such as bone material \begin_inset CommandInset citation LatexCommand citep key "Lang2001,Ohser2009,Doube2010" @@ -12037,8 +12369,7 @@ literal "true" \end_inset . - An example of such image (obtained from a dairy gel) is represented in - Figure + An example of such image (obtained from a dairy gel) is represented in Figure \begin_inset space ~ \end_inset @@ -12046,6 +12377,7 @@ literal "true" \begin_inset CommandInset ref LatexCommand ref reference "fig:Binary-Microstructure" +nolink "false" \end_inset @@ -12054,6 +12386,8 @@ reference "fig:Binary-Microstructure" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12065,6 +12399,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12096,6 +12432,8 @@ Sample image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12158,10 +12496,10 @@ Analysis of binary microstrucure. \end_layout \begin_layout Standard -To analyze such images, the notion of particle analysis is not relevant - anymore. - One possibility is to adapt the definitions of intrinsic volumes, by considerin -g that the image corresponds to a sampling window. +To analyze such images, + the notion of particle analysis is not relevant anymore. + One possibility is to adapt the definitions of intrinsic volumes, + by considering that the image corresponds to a sampling window. This induces the two modifications: \end_layout @@ -12178,6 +12516,7 @@ within the sampling window \begin_inset CommandInset ref LatexCommand ref reference "fig:Binary-Microstructure" +nolink "false" \end_inset @@ -12189,7 +12528,8 @@ the result is normalized by the area (or the volume) of the sampling window. \end_layout \begin_layout Standard -For the planar case, one obtains the following definitions: +For the planar case, + one obtains the following definitions: \begin_inset Formula \begin{align} A_{A}(X) & =\frac{\int_{X\cap W}dx}{A(W)}\\ @@ -12273,10 +12613,8 @@ name "chap:Binary-Images" \end_layout \begin_layout Standard -Binary and label images are a convenient way of representing the result - of segmentation algorithms. - The MorphoLibJ library provides several plugins for the processing and - the management of binary and label images. +Binary and label images are a convenient way of representing the result of segmentation algorithms. + The MorphoLibJ library provides several plugins for the processing and the management of binary and label images. \end_layout \begin_layout Standard @@ -12321,15 +12659,16 @@ name "subsec:Distance-Transform" \end_layout \begin_layout Standard -When analyzing images, it is often necessary to compute distances to a particula -r structure or position. +When analyzing images, + it is often necessary to compute distances to a particular structure or position. A convenient operator for binary images is the \series bold distance transform \series default . - Its principle is to compute, for each foreground pixel, the distance to - the nearest background pixel (Fig. + Its principle is to compute, + for each foreground pixel, + the distance to the nearest background pixel (Fig. \begin_inset space ~ \end_inset @@ -12337,6 +12676,7 @@ r structure or position. \begin_inset CommandInset ref LatexCommand ref reference "fig:Distance-Transform" +nolink "false" \end_inset @@ -12350,6 +12690,8 @@ Distance Map \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12382,7 +12724,8 @@ name "fig:Distance-Transform" \end_inset -Binary image, and result of computation of the distance transform. +Binary image, + and result of computation of the distance transform. \end_layout \end_inset @@ -12415,18 +12758,18 @@ Several methods exist for computing distance maps. \series bold chamfer masks \series default -, that are simpler to compute than exact Euclidean distance +, + that are simpler to compute than exact Euclidean distance \begin_inset CommandInset citation LatexCommand citep -key "Rosenfeld1968,Borgefors1984,Borgefors1986" +key "Rosenfeld_1968_PattRec,Borgefors1984,Borgefors1986" literal "true" \end_inset . - The principle is to update the distance associated to each pixel by considering - the distances within a small neighborhood, and adding a weight depending - on the relative location of the neighbor (Figure + The principle is to update the distance associated to each pixel by considering the distances within a small neighborhood, + and adding a weight depending on the relative location of the neighbor (Figure \begin_inset space ~ \end_inset @@ -12437,6 +12780,7 @@ reference "fig:Chamfer-Mask-Neighborhoods" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -12445,6 +12789,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12472,10 +12818,11 @@ name "fig:Chamfer-Mask-Neighborhoods" \end_inset Computation of distance maps using chamfer masks. - The distance associated to each pixel is updated according to the distances - associated to the neighbor pixels. - Left: 3x3 neighborhood. - Right: 5x5 neighborhood. + The distance associated to each pixel is updated according to the distances associated to the neighbor pixels. + Left: + 3x3 neighborhood. + Right: + 5x5 neighborhood. \end_layout \end_inset @@ -12489,10 +12836,10 @@ Computation of distance maps using chamfer masks. \end_layout \begin_layout Standard -In practice, using integer weights may result in faster computations. - This also allows to store the resulting distance map within 16-bits grayscale - images, resulting in more efficient memory usage than floating point computatio -n. +In practice, + using integer weights may result in faster computations. + This also allows to store the resulting distance map within 16-bits grayscale images, + resulting in more efficient memory usage than floating point computation. \end_layout \begin_layout Standard @@ -12504,6 +12851,7 @@ Several typical choices for chamfer weights are illustrated on Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Weights-2D" +nolink "false" \end_inset @@ -12523,8 +12871,8 @@ Chessboard mask \series default -, that considers distance equal to 1 for both orthogonal and diagonal neighbors - (Fig. +, + that considers distance equal to 1 for both orthogonal and diagonal neighbors (Fig. \begin_inset space ~ \end_inset @@ -12532,6 +12880,7 @@ Chessboard \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Weights-2D" +nolink "false" \end_inset @@ -12549,8 +12898,8 @@ City-block \series bold Manhattan mask \series default - uses a weight equal to 2 for diagonal neighbord, resulting in diamond-like - propagation of distance (Fig. + uses a weight equal to 2 for diagonal neighbord, + resulting in diamond-like propagation of distance (Fig. \begin_inset space ~ \end_inset @@ -12558,6 +12907,7 @@ Manhattan mask \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Weights-2D" +nolink "false" \end_inset @@ -12578,8 +12928,7 @@ Borgefors \begin_inset Quotes erd \end_inset - distance uses the weight 3 for orthogonal pixels and 4 for diagonal pixels - + distance uses the weight 3 for orthogonal pixels and 4 for diagonal pixels \begin_inset CommandInset citation LatexCommand citep key "Borgefors1986" @@ -12588,8 +12937,7 @@ literal "false" \end_inset . - It was claimed to be best integer approximation when considering the 3-by-3 - neighborhood (Fig. + It was claimed to be best integer approximation when considering the 3-by-3 neighborhood (Fig. \begin_inset space ~ \end_inset @@ -12597,6 +12945,7 @@ literal "false" \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Weights-2D" +nolink "false" \end_inset @@ -12637,16 +12986,18 @@ literal "false" \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Weights-2D" +nolink "false" \end_inset -d). - It is usually the best choice, as it considers a larger neighborhood. + It is usually the best choice, + as it considers a larger neighborhood. \end_layout \begin_layout Itemize -The MorphoLibJ library also provides chamfer masks with four weights, as - proposed by +The MorphoLibJ library also provides chamfer masks with four weights, + as proposed by \begin_inset CommandInset citation LatexCommand citet key "Verwer_1989_PAMI" @@ -12659,11 +13010,14 @@ literal "false" \begin_inset Formula $(\pm1,\pm3)$ \end_inset - from the reference pixel, in any direction. + from the reference pixel, + in any direction. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12671,6 +13025,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12703,6 +13059,8 @@ Chessboard (1,1) \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12735,6 +13093,8 @@ City-block (1,2) \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12767,6 +13127,8 @@ Borgefors (3,4) \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12811,11 +13173,11 @@ name "fig:Chamfer-Weights-2D" \end_inset Several examples of distance maps computed with different chamfer masks. - For each image, the distance to the lower-left pixel is represented both - with numeric value and with color code. - Numbers in brackets correspond to the weights associated with orthogonal - and diagonal directions. - For chess-knight weights, the weight 11 corresponds to a shift of + For each image, + the distance to the lower-left pixel is represented both with numeric value and with color code. + Numbers in brackets correspond to the weights associated with orthogonal and diagonal directions. + For chess-knight weights, + the weight 11 corresponds to a shift of \begin_inset Formula $(\pm1,\pm2)$ \end_inset @@ -12835,11 +13197,10 @@ Several examples of distance maps computed with different chamfer masks. \begin_layout Standard As chamfer masks are only an approximation of the real Euclidean distance, - some differences are expected compared to the actual Euclidean distance - map. - Using larger weights reduces the relative error, but the largest possible - distance (that depends on the bit-depth of the output image) may be reached - faster, leading to + some differences are expected compared to the actual Euclidean distance map. + Using larger weights reduces the relative error, + but the largest possible distance (that depends on the bit-depth of the output image) may be reached faster, + leading to \begin_inset Quotes eld \end_inset @@ -12862,8 +13223,7 @@ Chamfer distance computation \end_layout \begin_layout Standard -A great advantage of chamfer masks is that they allow fast computation of - distance maps by dividing the process into two passes. +A great advantage of chamfer masks is that they allow fast computation of distance maps by dividing the process into two passes. During the first pass (in \begin_inset Quotes eld \end_inset @@ -12872,9 +13232,10 @@ forward \begin_inset Quotes erd \end_inset - direction), pixels are iterated from left to right and from top to bottom. - The distance associated to each pixel is updated based on pixels already - updated, located upper and on the left (Figure + direction), + pixels are iterated from left to right and from top to bottom. + The distance associated to each pixel is updated based on pixels already updated, + located upper and on the left (Figure \begin_inset space ~ \end_inset @@ -12885,11 +13246,13 @@ reference "fig:Chamfer-Masks" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -a). - During the second pass, pixels are iterated + During the second pass, + pixels are iterated \begin_inset Quotes eld \end_inset @@ -12897,8 +13260,8 @@ backward \begin_inset Quotes erd \end_inset - (from right to left and from bottom to top), and the distance map is updated - based on the pixels located bottom and on the right (Figure + (from right to left and from bottom to top), + and the distance map is updated based on the pixels located bottom and on the right (Figure \begin_inset space ~ \end_inset @@ -12909,11 +13272,14 @@ reference "fig:Chamfer-Masks" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -12921,6 +13287,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -12953,6 +13321,8 @@ Forward mask \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -13005,7 +13375,8 @@ half-masks \begin_inset Quotes erd \end_inset -, one for each pass. +, + one for each pass. \end_layout \end_inset @@ -13023,13 +13394,13 @@ half-masks \end_layout \begin_layout Standard -For 3D images, chamfer distance maps can be computed using the same principle. - Three different chamfer weights can be associated to the 6 orthogonal neighbors -, to the 12 neighbor voxel sharing an edge with reference voxel, and to - the 8 neighbor voxel sharing only a corner with reference voxel. - The results can be represented via the discrete ball, obtained by applying - a threshold on the distance map computed from a single voxel located in - the center of the image (Fig. +For 3D images, + chamfer distance maps can be computed using the same principle. + Three different chamfer weights can be associated to the 6 orthogonal neighbors, + to the 12 neighbor voxel sharing an edge with reference voxel, + and to the 8 neighbor voxel sharing only a corner with reference voxel. + The results can be represented via the discrete ball, + obtained by applying a threshold on the distance map computed from a single voxel located in the center of the image (Fig. \begin_inset space ~ \end_inset @@ -13037,6 +13408,7 @@ For 3D images, chamfer distance maps can be computed using the same principle. \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Masks-3D-1" +nolink "false" \end_inset @@ -13046,6 +13418,8 @@ reference "fig:Chamfer-Masks-3D-1" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13053,6 +13427,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13085,6 +13461,8 @@ Chessboard (1,1,1) \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13117,6 +13495,8 @@ City-block (1,2,3) \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13161,8 +13541,8 @@ name "fig:Chamfer-Masks-3D-1" \end_inset Discrete 3D balls resulting from different chamfer distances. - The distance map is computed to the center voxel, then the result is thresholde -d and represented in 3D. + The distance map is computed to the center voxel, + then the result is thresholded and represented in 3D. \end_layout @@ -13190,6 +13570,7 @@ The (3D) chessboard distance uses the same weight for all the 26 neighbors. \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Masks-3D-1" +nolink "false" \end_inset @@ -13201,7 +13582,8 @@ The (3D) Manhattan distance considers weights triplet equal to \begin_inset Formula $(1,2,3)$ \end_inset -, resulting in octagon-like distance propagation (Fig. +, + resulting in octagon-like distance propagation (Fig. \begin_inset space ~ \end_inset @@ -13209,6 +13591,7 @@ The (3D) Manhattan distance considers weights triplet equal to \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Masks-3D-1" +nolink "false" \end_inset @@ -13216,8 +13599,7 @@ reference "fig:Chamfer-Masks-3D-1" \end_layout \begin_layout Itemize -The Borgefors weights (3,4,5) usually give a good approximation of the Euclidean - distance when considering only the 3-by-3-by-3 neighborhood (Fig. +The Borgefors weights (3,4,5) usually give a good approximation of the Euclidean distance when considering only the 3-by-3-by-3 neighborhood (Fig. \begin_inset space ~ \end_inset @@ -13225,6 +13607,7 @@ The Borgefors weights (3,4,5) usually give a good approximation of the Euclidean \begin_inset CommandInset ref LatexCommand ref reference "fig:Chamfer-Masks-3D-1" +nolink "false" \end_inset @@ -13233,6 +13616,8 @@ reference "fig:Chamfer-Masks-3D-1" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13240,6 +13625,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -13272,6 +13659,8 @@ Svensson (3,4,5,7) \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -13304,6 +13693,8 @@ Five weights \begin_inset Float figure +placement document +alignment document wide false sideways false status collapsed @@ -13348,9 +13739,10 @@ name "fig:Chamfer-Masks-3D-2" \end_inset Enhancement of 3D distance maps when using larger chamfer masks. - Masks are based on (a) four, (b) five, or (c) six weights. - Using All images represent the threshold of the distance 100 from image - center. + Masks are based on (a) four, + (b) five, + or (c) six weights. + Using All images represent the threshold of the distance 100 from image center. \end_layout \end_inset @@ -13364,8 +13756,8 @@ Enhancement of 3D distance maps when using larger chamfer masks. \end_layout \begin_layout Standard -Larger neighborhood may be considered, resulting in a better approximation - (Fig. +Larger neighborhood may be considered, + resulting in a better approximation (Fig. \begin_inset space ~ \end_inset @@ -13376,6 +13768,7 @@ reference "fig:Chamfer-Masks-3D-2" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -13383,13 +13776,11 @@ noprefix "false" \end_layout \begin_layout Itemize -Svensson and Borgefors found that adding a fourth weight for voxels shifted - by +Svensson and Borgefors found that adding a fourth weight for voxels shifted by \begin_inset Formula $(\pm1,\pm1,\pm2)$ \end_inset - in any direction results in a substantial error reduction while preserving - a low complexity of the algorithm + in any direction results in a substantial error reduction while preserving a low complexity of the algorithm \begin_inset CommandInset citation LatexCommand citep key "Svensson_Borgefors_2002_prl,Svensson_Borgefors_2002_cviu" @@ -13402,14 +13793,13 @@ literal "true" \end_layout \begin_layout Itemize -Starting from version 1.5, MorphoLibJ allows using up to six weights (correspondi -ng to the complete 5–by–5-by–5 neighborhood). +Starting from version 1.5, + MorphoLibJ allows using up to six weights (corresponding to the complete 5–by–5-by–5 neighborhood). \end_layout \begin_layout Standard -As for the 2D case, the choice of the chamfer distance is compromise between - the accuracy (larger neighborhood and weights are usually more accurate) - and the largest distance that can be represented. +As for the 2D case, + the choice of the chamfer distance is compromise between the accuracy (larger neighborhood and weights are usually more accurate) and the largest distance that can be represented. \end_layout \begin_layout Subsubsection @@ -13418,13 +13808,16 @@ Case of label images \begin_layout Standard The distance transform algorithm may also be applied to label images. - However, as regions corresponding to each label may be continuous, the - algorithm need to be adapted. + However, + as regions corresponding to each label may be continuous, + the algorithm need to be adapted. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13457,8 +13850,8 @@ name "fig:Distance-Transform-Label-Image" \end_inset -An example of a label image containing contiguous regions, and result of - the distance transform applied on the label image. +An example of a label image containing contiguous regions, + and result of the distance transform applied on the label image. \end_layout \end_inset @@ -13472,11 +13865,11 @@ An example of a label image containing contiguous regions, and result of \end_layout \begin_layout Standard -For label image, distances are computed between each foreground (greater - than zero) pixel and the nearest pixel with a different value : either - 0 (the background) or another label. - Distances are propagated as for binary images, using a pair of forward - and backward passes. +For label image, + distances are computed between each foreground (greater than zero) pixel and the nearest pixel with a different value : + either 0 (the background) or another label. + Distances are propagated as for binary images, + using a pair of forward and backward passes. An example of result is provided on Figure \begin_inset space ~ \end_inset @@ -13485,6 +13878,7 @@ For label image, distances are computed between each foreground (greater \begin_inset CommandInset ref LatexCommand ref reference "fig:Distance-Transform-Label-Image" +nolink "false" \end_inset @@ -13496,8 +13890,7 @@ Plugin usage \end_layout \begin_layout Standard -The MorphoLibJ library provides two plugins for computing chamfer distance - maps for 2D or 3D binary images: +The MorphoLibJ library provides two plugins for computing chamfer distance maps for 2D or 3D binary images: \end_layout \begin_layout Minisec @@ -13511,9 +13904,8 @@ name "op:Chamfer-Distance-Map" \end_inset -computes a chamfer distance map from a binary or label image, between each - foreground pixel to the nearest pixel with a different value (either background - or another label). +computes a chamfer distance map from a binary or label image, + between each foreground pixel to the nearest pixel with a different value (either background or another label). \end_layout \begin_layout Minisec @@ -13527,20 +13919,18 @@ name "op:Chamfer-Distance-Map-3d" \end_inset -computes a chamfer distance map from a 3D binary image between each foreground - voxel to the nearest voxel with a different value (either background or - another label). +computes a chamfer distance map from a 3D binary image between each foreground voxel to the nearest voxel with a different value (either background or another label). Input image is assumed to have cubic voxels. \end_layout \begin_layout Standard -For each plugin, a dialog opens and allows to select the following parameters: +For each plugin, + a dialog opens and allows to select the following parameters: \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Distances the weights of the chamfer mask used for computing the distance - map +Distances the weights of the chamfer mask used for computing the distance map \end_layout \begin_layout Labeling @@ -13549,16 +13939,14 @@ Output \begin_inset space ~ \end_inset -Type specify if the result should be stored in 16-bits image (uses less - memory), or 32-bits image (larger distances can be computed). +Type specify if the result should be stored in 16-bits image (uses less memory), + or 32-bits image (larger distances can be computed). \end_layout \begin_layout Labeling \labelwidthstring 00.00.0000 -Normalize specify if the resulting map should be divided by the weight associate -d with orthogonal pixels or voxels. - This may be useful for masks with large weights to have resulting distances - comparable to Euclidean ones. +Normalize specify if the resulting map should be divided by the weight associated with orthogonal pixels or voxels. + This may be useful for masks with large weights to have resulting distances comparable to Euclidean ones. \end_layout \begin_layout Labeling @@ -13588,16 +13976,16 @@ name "subsec:Geodesic-Distance-Transform" \end_layout \begin_layout Standard -In some cases it may be useful to restrict the propagation of distances - to a specific region or mask. - For example, one may be interested in the distance between two points in - a vasculature network, while staying within the network. +In some cases it may be useful to restrict the propagation of distances to a specific region or mask. + For example, + one may be interested in the distance between two points in a vasculature network, + while staying within the network. The \series bold geodesic distance transform \series default - consists in computing the distance from a given binary marker, while constraini -ng the propagation of the distance within a binary mask. + consists in computing the distance from a given binary marker, + while constraining the propagation of the distance within a binary mask. An illustration is given in Figure \begin_inset space ~ \end_inset @@ -13606,10 +13994,12 @@ ng the propagation of the distance within a binary mask. \begin_inset CommandInset ref LatexCommand ref reference "fig:Geodesic-Distance-Map" +nolink "false" \end_inset -, and a 3D example is shown in Figure +, + and a 3D example is shown in Figure \begin_inset space ~ \end_inset @@ -13617,6 +14007,7 @@ reference "fig:Geodesic-Distance-Map" \begin_inset CommandInset ref LatexCommand ref reference "fig:Geodesic-Distance-Map-3d" +nolink "false" \end_inset @@ -13626,6 +14017,8 @@ reference "fig:Geodesic-Distance-Map-3d" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13633,6 +14026,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13665,6 +14060,8 @@ Original image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13708,8 +14105,7 @@ name "fig:Geodesic-Distance-Map" \end_inset -Computation of the geodesic distance map on a binary image from the DRIVE - database +Computation of the geodesic distance map on a binary image from the DRIVE database \begin_inset CommandInset citation LatexCommand citep key "Staal_2004_tmi" @@ -13719,8 +14115,9 @@ literal "true" . (a) Original image with marker superimposed in red. - (b) Color representation of the geodesic distance map: hot colors correspond - to large distances, cold colors correspond to small distances. + (b) Color representation of the geodesic distance map: + hot colors correspond to large distances, + cold colors correspond to small distances. \end_layout \end_inset @@ -13735,6 +14132,8 @@ literal "true" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13789,9 +14188,8 @@ name "op:Geodesic-Distance-Map" \end_inset -Computes the geodesic distance between each foreground pixel of a binary - mask image to the closest pixel of a marker image, while staying within - the particle represented by the mask image (See Figure +Computes the geodesic distance between each foreground pixel of a binary mask image to the closest pixel of a marker image, + while staying within the particle represented by the mask image (See Figure \begin_inset space ~ \end_inset @@ -13799,6 +14197,7 @@ Computes the geodesic distance between each foreground pixel of a binary \begin_inset CommandInset ref LatexCommand ref reference "fig:Geodesic-Distance-Map" +nolink "false" \end_inset @@ -13820,10 +14219,8 @@ name "op:Interactive-Geodesic-Distance-Map" \end_inset -Computes the geodesic distance between each foreground pixel of a the currently - selected image (considered the mask image) to the closest pixel of a marker - image defined by the user ROIs, while staying within the particle represented - by the mask image. +Computes the geodesic distance between each foreground pixel of a the currently selected image (considered the mask image) to the closest pixel of a marker image defined by the user ROIs, + while staying within the particle represented by the mask image. \end_layout \begin_layout Minisec @@ -13837,9 +14234,8 @@ name "op:Geodesic-Distance-Map-3d" \end_inset -Computes the 3D geodesic distance between each foreground pixel of a binary - mask image to the closest pixel of a marker image, while staying within - the particle represented by the mask image (See Figure +Computes the 3D geodesic distance between each foreground pixel of a binary mask image to the closest pixel of a marker image, + while staying within the particle represented by the mask image (See Figure \begin_inset space ~ \end_inset @@ -13847,6 +14243,7 @@ Computes the 3D geodesic distance between each foreground pixel of a binary \begin_inset CommandInset ref LatexCommand ref reference "fig:Geodesic-Distance-Map-3d" +nolink "false" \end_inset @@ -13859,15 +14256,17 @@ Results interpretation \end_layout \begin_layout Standard -Geodesic distance transforms plugins result in images that contains the - geodesic distance of foreground pixels or voxels, but also background pixels/vo -xels of the mask. - Also, some regions may not be reacheable by the propagation algorithm. +Geodesic distance transforms plugins result in images that contains the geodesic distance of foreground pixels or voxels, + but also background pixels/voxels of the mask. + Also, + some regions may not be reacheable by the propagation algorithm. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13875,6 +14274,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13906,6 +14307,8 @@ Input marker and mask images. \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -13973,41 +14376,43 @@ Values in geodesic distance maps can be interpreted this way: \end_layout \begin_layout Itemize -0: the pixel is contained both within the original marker and mask images - (distance is zero by definition) +0: + the pixel is contained both within the original marker and mask images (distance is zero by definition) \end_layout \begin_layout Itemize -numerical value: the value corresponds to the length of the path that joins - the current pixel or voxel to the closest pixel or voxel belonging to the - mask. +numerical value: + the value corresponds to the length of the path that joins the current pixel or voxel to the closest pixel or voxel belonging to the mask. \end_layout \begin_layout Itemize -NaN: the pixel/voxel does not belong to the mask, and is not considered - during propagation. +NaN: + the pixel/voxel does not belong to the mask, + and is not considered during propagation. \end_layout \begin_layout Itemize -“Infinity”, or very large value: the pixel does belong to the mask, but - can not be reached by propagation. +“Infinity”, + or very large value: + the pixel does belong to the mask, + but can not be reached by propagation. This corresponds to the case where the mask is composed of several components. \end_layout \begin_layout Standard -Geodesic distance maps are computed by propagating chamfer weights, as for - the computation of distance maps. +Geodesic distance maps are computed by propagating chamfer weights, + as for the computation of distance maps. As chamfer weights are only an approximation of the real Euclidean distance, some differences are expected compared to the actual geodesic distance. \end_layout \begin_layout Standard -When computation are performed with integers, special values like Inf or - Nan can not be represented. - In these cases, they are replaced by the largest possible value for 16-bits - unsigned integer type. +When computation are performed with integers, + special values like Inf or Nan can not be represented. + In these cases, + they are replaced by the largest possible value for 16-bits unsigned integer type. \end_layout @@ -14025,18 +14430,16 @@ literal "false" \end_inset . - The simplest one consists in iterating forward and backward passes that - update the result map according to the neighbors pixels, until no more - modification occurs. - An alternative is to propagate the distance maps from the pixels within - the markers using a priority queue. + The simplest one consists in iterating forward and backward passes that update the result map according to the neighbors pixels, + until no more modification occurs. + An alternative is to propagate the distance maps from the pixels within the markers using a priority queue. \end_layout \begin_layout Standard -The MorphoLibJ plugins use an hybrid algorithm, that initializes the distance - map by a single sequence of forward and backward passes, and initializes - the queue during the backward pass. +The MorphoLibJ plugins use an hybrid algorithm, + that initializes the distance map by a single sequence of forward and backward passes, + and initializes the queue during the backward pass. This reduces the amount of memory required by the priority queue. \end_layout @@ -14062,14 +14465,13 @@ name "sec:Connected-Components-Labeling" \end_layout \begin_layout Standard -The different structures within a binary images can be individualised by - using a connected +The different structures within a binary images can be individualised by using a connected \series bold component labeling algorithm \series default . - The result is an image containing integer label, each label corresponding - to a set of connected pixels or voxels (Figure + The result is an image containing integer label, + each label corresponding to a set of connected pixels or voxels (Figure \begin_inset space ~ \end_inset @@ -14077,12 +14479,12 @@ component labeling algorithm \begin_inset CommandInset ref LatexCommand ref reference "fig:Connected-component-labeling" +nolink "false" \end_inset ). - Label images can be represented with colored LUT to help distinguish adjacent - labels (see section + Label images can be represented with colored LUT to help distinguish adjacent labels (see section \begin_inset space ~ \end_inset @@ -14093,6 +14495,7 @@ reference "subsec:Visualization-of-Label-Images" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -14101,6 +14504,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14133,7 +14538,8 @@ name "fig:Connected-component-labeling" \end_inset -Binary image, and result of connected components labeling. +Binary image, + and result of connected components labeling. \end_layout \end_inset @@ -14151,8 +14557,8 @@ The result of a connected component labeling depends on the chosen \series bold connectivity \series default -, that corresponds to the convention used to decide wether two pixels or - voxels are connected or not (Figure +, + that corresponds to the convention used to decide wether two pixels or voxels are connected or not (Figure \begin_inset space ~ \end_inset @@ -14160,6 +14566,7 @@ connectivity \begin_inset CommandInset ref LatexCommand ref reference "fig:Connectivity-2D" +nolink "false" \end_inset @@ -14175,6 +14582,7 @@ reference "sec:Digital-Connectivity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -14182,8 +14590,9 @@ noprefix "false" \end_layout \begin_layout Standard -For planar images, a typical choice is the 4-connectivity, that considers - only the orthogonal neighbors of a given pixel (Figure +For planar images, + a typical choice is the 4-connectivity, + that considers only the orthogonal neighbors of a given pixel (Figure \begin_inset space ~ \end_inset @@ -14191,14 +14600,14 @@ For planar images, a typical choice is the 4-connectivity, that considers \begin_inset CommandInset ref LatexCommand ref reference "fig:Connectivity-2D" +nolink "false" \end_inset -b). - When two components touch only via a corner, they are not considered as - the same one. - The 8-connectivity is an alternative that also considers the diagonal pixels - as neighbors (Figure + When two components touch only via a corner, + they are not considered as the same one. + The 8-connectivity is an alternative that also considers the diagonal pixels as neighbors (Figure \begin_inset space ~ \end_inset @@ -14206,6 +14615,7 @@ reference "fig:Connectivity-2D" \begin_inset CommandInset ref LatexCommand ref reference "fig:Connectivity-2D" +nolink "false" \end_inset @@ -14215,6 +14625,8 @@ reference "fig:Connectivity-2D" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14222,6 +14634,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14254,6 +14668,8 @@ Binary image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14286,6 +14702,8 @@ status open \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14346,9 +14764,9 @@ Impact of the connectivity on the result of connected component labeling. \end_layout \begin_layout Standard -For 3D images, the 6-connectivity considers only orthogonal neighbors in - the three main directions, whereas the 26-connectivity considers all the - neighbors of a given voxel in its 3-by-3-by-3 surrounding. +For 3D images, + the 6-connectivity considers only orthogonal neighbors in the three main directions, + whereas the 26-connectivity considers all the neighbors of a given voxel in its 3-by-3-by-3 surrounding. The connectivity is also considered for computing \begin_inset ERT status open @@ -14381,10 +14799,12 @@ status open \begin_inset CommandInset ref LatexCommand ref reference "sec:Morphological-Reconstruction" +nolink "false" \end_inset -), or for computing the +), + or for computing the \begin_inset ERT status open @@ -14419,6 +14839,7 @@ reference "subsec:Digital-Euler-Number" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -14426,11 +14847,11 @@ noprefix "false" \end_layout \begin_layout Standard -The number of labels that can be represented within a label map depends - on the image type: 255 for byte images, 65535 for short images, and around - 16 millions for 32-bit floating point images (only the 24 bits of the mantissa - are used for label representation, leading to a maximum number of labels - equal to +The number of labels that can be represented within a label map depends on the image type: + 255 for byte images, + 65535 for short images, + and around 16 millions for 32-bit floating point images (only the 24 bits of the mantissa are used for label representation, + leading to a maximum number of labels equal to \begin_inset Formula $2^{24}$ \end_inset @@ -14448,8 +14869,7 @@ name "op:Connected-Components-Labeling" \end_inset -transforms the binary image into a label image by assigning a specific number - (label) to each connected component +transforms the binary image into a label image by assigning a specific number (label) to each connected component \end_layout \begin_layout Section @@ -14461,9 +14881,8 @@ Convexification \end_layout \begin_layout Standard -When processing a binary region, it can sometimes be useful to consider - the binary region corresponding to the convex hull of the original region - (Fig. +When processing a binary region, + it can sometimes be useful to consider the binary region corresponding to the convex hull of the original region (Fig. \begin_inset space ~ \end_inset @@ -14474,11 +14893,13 @@ reference "fig:Convexification" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ). - For example, the + For example, + the \begin_inset ERT status open @@ -14498,16 +14919,18 @@ reference "subsec:Convexity" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset ) is based on the convex hull. - The Convexify plugin allows to generate the smallest convex region containing - a binary region. + The Convexify plugin allows to generate the smallest convex region containing a binary region. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14515,6 +14938,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14546,6 +14971,8 @@ Binary image. \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14577,6 +15004,8 @@ Convexification. \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14643,8 +15072,8 @@ name "op:Convexify" \end_inset -for a binary image, generate the smallest convex region containing a region - in the image. +for a binary image, + generate the smallest convex region containing a region in the image. \end_layout \begin_layout Subsection @@ -14662,8 +15091,7 @@ name "subsec:Binary-Images-Selection" \end_layout \begin_layout Standard -The MorphoLibJ library offers several tools for automatically selecting - binary regions based on size or position criteria. +The MorphoLibJ library offers several tools for automatically selecting binary regions based on size or position criteria. Some of them are illustrated on Figure \begin_inset space ~ \end_inset @@ -14672,12 +15100,13 @@ The MorphoLibJ library offers several tools for automatically selecting \begin_inset CommandInset ref LatexCommand ref reference "fig:Binary-Images-Utilities" +nolink "false" \end_inset . - As the algorithms usually requires connected component labeling, it is - often more convenient to use corresponding methods for label images (Section + As the algorithms usually requires connected component labeling, + it is often more convenient to use corresponding methods for label images (Section \begin_inset space ~ \end_inset @@ -14688,6 +15117,7 @@ reference "subsec:Label-Images-Selection" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -14696,6 +15126,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14743,8 +15175,11 @@ name "fig:Binary-Images-Utilities" \end_inset Utilities for binary images. - From left to right: original image, keep largest region, remove largest - region, apply size opening for keeping only regions with at least 150 pixels. + From left to right: + original image, + keep largest region, + remove largest region, + apply size opening for keeping only regions with at least 150 pixels. \end_layout \end_inset @@ -14762,7 +15197,8 @@ Keep Largest Region \end_layout \begin_layout Standard -Identifies the largest connected component, and remove all other regions. +Identifies the largest connected component, + and remove all other regions. \end_layout \begin_layout Minisec @@ -14770,7 +15206,8 @@ Remove Largest Region \end_layout \begin_layout Standard -Identifies the largest connected component, and remove it from image. +Identifies the largest connected component, + and remove it from image. \end_layout \begin_layout Minisec @@ -14784,9 +15221,9 @@ name "op:Size-Opening" \end_inset -computes the size (area in 2D, volume in 3D) of each connected component, - and remove all particles whose size is below the value specified by the - user. +computes the size (area in 2D, + volume in 3D) of each connected component, + and remove all particles whose size is below the value specified by the user. Algorithms work for both 2D or 3D images. Default connectivity 4 (resp. 6) is used for 2D (resp. @@ -14812,24 +15249,26 @@ name "chap:label-images" \end_layout \begin_layout Standard -When several structures or components are present within an image, it may - be convenient to work with +When several structures or components are present within an image, + it may be convenient to work with \series bold label images \series default -, or +, + or \series bold label maps \series default . - Within a label map, each pixel or voxel of a label image corresponds to - the integer index of the particle it belongs to. - By convention, the value 0 corresponds to the background. - Label images are typically computed from binary images by connected component - algorithms (section + Within a label map, + each pixel or voxel of a label image corresponds to the integer index of the particle it belongs to. + By convention, + the value 0 corresponds to the background. + Label images are typically computed from binary images by connected component algorithms (section \begin_inset CommandInset ref LatexCommand ref reference "sec:Connected-Components-Labeling" +nolink "false" \end_inset @@ -14888,14 +15327,16 @@ name "subsec:Visualization-of-Label-Images" \end_layout \begin_layout Standard -Label images can be represented either using shades of gray, or using color - maps to better distinguish the different regions. - It may also be convenient to overlay the region label on the image to associate - it to values within a table. +Label images can be represented either using shades of gray, + or using color maps to better distinguish the different regions. + It may also be convenient to overlay the region label on the image to associate it to values within a table, + or to convert the boundary of each region into a Region of Interest (ROI) that can be managed within the ROI Manager dialog. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14903,6 +15344,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14911,7 +15354,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-WTH-areaOpen-lbl2-border.png - height 4cm + special height=4cm \end_inset @@ -14934,6 +15377,8 @@ Using Colormap \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14942,7 +15387,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-drawLabels.png - height 4cm + special height=4cm \end_inset @@ -14965,6 +15410,8 @@ Draw Labels as Overlay \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -14974,7 +15421,7 @@ status open \begin_inset Graphics filename images/grains/grains-OverlayLabels.png lyxscale 60 - height 4cm + special height=4cm \end_inset @@ -15011,8 +15458,7 @@ name "fig:Label-Images-Visualization" Various visualization modes of label images. (a) Display regions using appropriate colormap. (b) The label associated to each region is overlaid on another image. - (c) Label map or binary images can be overlaid on another grayscale image - using user-defined opacity. + (c) Label map or binary images can be overlaid on another grayscale image using user-defined opacity. \end_layout \end_inset @@ -15030,8 +15476,8 @@ Color maps \end_layout \begin_layout Standard -When the number of labels within a label image is large, it may be difficult - to differentiate regions whose labels are close. +When the number of labels within a label image is large, + it may be difficult to differentiate regions whose labels are close. The Figure \begin_inset CommandInset ref LatexCommand ref @@ -15039,6 +15485,7 @@ reference "fig:ColorMaps" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15048,6 +15495,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15055,6 +15504,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15074,7 +15525,8 @@ status open \begin_inset Caption Standard \begin_layout Plain Layout -Glasbey, Black +Glasbey, + Black \end_layout \end_inset @@ -15086,6 +15538,8 @@ Glasbey, Black \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15105,7 +15559,8 @@ status open \begin_inset Caption Standard \begin_layout Plain Layout -GlasbeyBright, White +GlasbeyBright, + White \end_layout \end_inset @@ -15117,6 +15572,8 @@ GlasbeyBright, White \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15136,7 +15593,8 @@ status open \begin_inset Caption Standard \begin_layout Plain Layout -GlasbeyDark, White +GlasbeyDark, + White \end_layout \end_inset @@ -15148,6 +15606,8 @@ GlasbeyDark, White \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15167,7 +15627,8 @@ status open \begin_inset Caption Standard \begin_layout Plain Layout -Golden Angle, Black +Golden Angle, + Black \end_layout \end_inset @@ -15212,31 +15673,36 @@ Glasbey \begin_inset Quotes erd \end_inset - colormap, included within ImageJ, generates colors that are perceptually - contrasted (Figure + colormap, + included within ImageJ, + generates colors that are perceptually contrasted (Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:ColorMaps" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -a). - It however generates black and white colors, making them difficult to distingui -sh from background (on the example from Figure + It however generates black and white colors, + making them difficult to distinguish from background (on the example from Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:ColorMaps" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset --a, the region in the top-right corner is not visible anymore). - Therefore, the +-a, + the region in the top-right corner is not visible anymore). + Therefore, + the \begin_inset Quotes eld \end_inset @@ -15252,8 +15718,8 @@ Glasbey Dark \begin_inset Quotes erd \end_inset - colormaps were made available, to provide good contrast both between labels - and with background + colormaps were made available, + to provide good contrast both between labels and with background \begin_inset CommandInset citation LatexCommand citep key "Glasbey_2007,Kovesi_2015" @@ -15283,20 +15749,21 @@ https://colorcet.holoviz.org/index.html \end_inset . - The Golden Angle colormap is an alternative to the Glasbey family, that - provides more saturated colors (Figure + The Golden Angle colormap is an alternative to the Glasbey family, + that provides more saturated colors (Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:ColorMaps" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -d). - The contrast between colors is less than for Glasbey colormaps, making - adjacent region potentially more difficult to distinguish. + The contrast between colors is less than for Glasbey colormaps, + making adjacent region potentially more difficult to distinguish. \end_layout \begin_layout Subsection @@ -15305,11 +15772,11 @@ Plugins \begin_layout Standard Several plugins allow to control the appearance of label images. - It is possible to choose a given color map, or to transform a label image - into a color image. - In both cases, the background color can be specified, and the color order - can be shuffled to facilitate the discrimination of neighbor regions with - similar labels. + It is possible to choose a given color map, + or to transform a label image into a color image. + In both cases, + the background color can be specified, + and the color order can be shuffled to facilitate the discrimination of neighbor regions with similar labels. \end_layout \begin_layout Minisec @@ -15331,7 +15798,7 @@ name "op:Set-Label-Map" \end_inset -allows to choose the color map used to display a label image (Fig. +Allows to choose the color map used to display a label image (Fig. \begin_inset space ~ \end_inset @@ -15342,15 +15809,16 @@ reference "fig:Label-Images-Visualization" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -a). - In particular, shuffling the color map and/or choosing a specific color - for background allows better visualization than with only gray levels. - Note that when the number of regions is large, regions with small labels - will be associated to the same color as background, and will therefore - not be visible! + In particular, + shuffling the color map and/or choosing a specific color for background allows better visualization than with only gray levels. + Note that when the number of regions is large, + regions with small labels will be associated to the same color as background, + and will therefore not be visible! \end_layout \begin_layout Minisec @@ -15372,10 +15840,9 @@ name "op:Label-To-RGB" \end_inset -converts a label image to a true RGB image. - Similar to ImageJ native conversion, but this plugin avoids confusion between - background pixels and labels with small values when the number of labels - is large. +Converts a label image to a true RGB image. + Similar to ImageJ native conversion, + but this plugin avoids confusion between background pixels and labels with small values when the number of labels is large. \end_layout \begin_layout Minisec @@ -15401,8 +15868,8 @@ name "op:Draw-Labels-As-Overlay" \end_inset -Choose another image, and display the label associated to each region as - a text overlay (Fig. +Choose another image, + and display the label associated to each region as a text overlay (Fig. \begin_inset space ~ \end_inset @@ -15413,12 +15880,13 @@ reference "fig:Label-Images-Visualization" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). - The position of the overlay is the centroid of each region, and a small - shift can be specified. + The position of the overlay is the centroid of each region, + and a small shift can be specified. \end_layout \begin_layout Minisec @@ -15448,7 +15916,8 @@ name "op:Overlay-Binary-Or-Label-Image" \end_inset -Opens a dialog to choose a reference/background image, and an image to overlay, +Opens a dialog to choose a reference/background image, + and an image to overlay, that can be either a binary image or a label map (Fig. \begin_inset space ~ \end_inset @@ -15460,16 +15929,91 @@ reference "fig:Label-Images-Visualization" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -c). - User can specifiy the opacity of the overlay, and generate a new Color - image for the result. + User can specifiy the opacity of the overlay, + and generate a new Color image for the result. +\end_layout + +\begin_layout Minisec +Label Map To ROIs \end_layout \begin_layout Standard -\begin_inset Newpage clearpage +\begin_inset CommandInset label +LatexCommand label +name "op:Label-Map-To-ROIs" + +\end_inset + +Converts a label into a series of ROI: + one polygon ROI per label. + Different connectivities can be chosen, + as well as the boundary points to extract from each boundary pixel (see Figue +\begin_inset space ~ +\end_inset + + +\begin_inset CommandInset ref +LatexCommand ref +reference "fig:Region-Boundary-Points" +plural "false" +caps "false" +noprefix "false" +nolink "false" + +\end_inset + +). +\end_layout + +\begin_layout Standard +\begin_inset Float figure +placement document +alignment document +wide false +sideways false +status open + +\begin_layout Plain Layout +\align center +\begin_inset Graphics + filename images/region/regionBoundaryPoints.png + width 7cm + +\end_inset + + +\end_layout + +\begin_layout Plain Layout +\begin_inset Caption Standard + +\begin_layout Plain Layout +\begin_inset CommandInset label +LatexCommand label +name "fig:Region-Boundary-Points" + +\end_inset + +Boundary points of a regions. + The boundary points can correspond to pixel centers (black dots), + to pixel corners (red squares), + or to the middle of pixel edges (green diamonds). +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Plain Layout + +\end_layout + \end_inset @@ -15480,8 +16024,8 @@ Visualization of region features \end_layout \begin_layout Standard -When images contain many labels, it is may be difficult to interpret together - the localisation and the features describing the regions. +When images contain many labels, + it is may be difficult to interpret together the localisation and the features describing the regions. The \begin_inset Quotes eld \end_inset @@ -15503,6 +16047,8 @@ Draw Label Values \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15512,14 +16058,14 @@ status open \begin_inset Graphics filename images/grains/grains-WTH-areaOpen-lbl2-border-drawLabelValues.png lyxscale 60 - height 4cm + special height=4cm \end_inset \begin_inset Graphics filename images/grains/grains-lbl2-ElongMap.png - height 4cm + special height=4cm \end_inset @@ -15537,8 +16083,10 @@ name "fig:Display-Region-Feature" \end_inset Various possibilities to graphically visualize region feature. - On the left, the table used for display. - Center, overlay of the elongation feature using the + On the left, + the table used for display. + Center, + overlay of the elongation feature using the \begin_inset Quotes eld \end_inset @@ -15547,8 +16095,10 @@ Draw Label Values \end_inset plugin. - On the right, color representation of the elongation using a color code: - between dark purple (circular, compact) to white (very elongated). + On the right, + color representation of the elongation using a color code: + between dark purple (circular, + compact) to white (very elongated). \end_layout \end_inset @@ -15580,8 +16130,8 @@ name "op:Draw-Label-Values" \end_inset -draws the value of a feature measured on each label of an image using two - coordinates (bounding box, centroid...) also stored in a ResultsTable. +draws the value of a feature measured on each label of an image using two coordinates (bounding box, + centroid...) also stored in a ResultsTable. An example is shown on Figure \begin_inset space ~ \end_inset @@ -15593,6 +16143,7 @@ reference "fig:Display-Region-Feature" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15623,9 +16174,8 @@ name "op:Colorize-Labels" \end_inset -combines a label image with a results table, and creates a new 32-bits image - for which each pixel/voxel is assigned the measurement value corresponding - to the label it belongs to (Figure +combines a label image with a results table, + and creates a new 32-bits image for which each pixel/voxel is assigned the measurement value corresponding to the label it belongs to (Figure \begin_inset space ~ \end_inset @@ -15636,6 +16186,7 @@ reference "fig:Display-Region-Feature" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15670,11 +16221,10 @@ name "subsec:Label-Images-Selection" \end_layout \begin_layout Standard -It is often convenient to select regions in a label image based on their - size or their location (e.g. +It is often convenient to select regions in a label image based on their size or their location (e.g. removing the regions touching the border). - The MorphoLibJ library offers several utility tools for automatically selecting - or removing specific regions, or to edit the label images. + The MorphoLibJ library offers several utility tools for automatically selecting or removing specific regions, + or to edit the label images. Some of them are illustrated on Figure \begin_inset space ~ \end_inset @@ -15683,6 +16233,7 @@ It is often convenient to select regions in a label image based on their \begin_inset CommandInset ref LatexCommand ref reference "fig:Label-Images-Utilities" +nolink "false" \end_inset @@ -15707,6 +16258,7 @@ reference "sec:Label-Edition-plugin" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15715,6 +16267,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -15762,9 +16316,11 @@ name "fig:Label-Images-Utilities" \end_inset Utilities for label images. - From left to right: original label image, remove border labels, remove - largest region, apply size opening for keeping only regions with at least - 150 pixels. + From left to right: + original label image, + remove border labels, + remove largest region, + apply size opening for keeping only regions with at least 150 pixels. \end_layout \end_inset @@ -15796,7 +16352,8 @@ kill borders \begin_inset Quotes erd \end_inset - function, but operates faster as no morphological reconstruction is required. + function, + but operates faster as no morphological reconstruction is required. \end_layout \begin_layout Minisec @@ -15804,8 +16361,8 @@ Select Label(s) \end_layout \begin_layout Standard -Enters a set of labels, and creates a new label image containing only the - selected labels. +Enters a set of labels, + and creates a new label image containing only the selected labels. \end_layout \begin_layout Minisec @@ -15813,7 +16370,8 @@ Keep / Remove Largest Label \end_layout \begin_layout Standard -Identifies the largest label, and keep it or remove it +Identifies the largest label, + and keep it or remove it \end_layout \begin_layout Minisec @@ -15827,8 +16385,9 @@ name "op:Label-Size-Filtering" \end_inset -Filters the labels according to their size (area in 2D, volume in 3D), by - specifying a comparison operator and a threshold value. +Filters the labels according to their size (area in 2D, + volume in 3D), + by specifying a comparison operator and a threshold value. \begin_inset Note Note status collapsed @@ -15848,9 +16407,12 @@ name "op:Label-Size-Opening" \end_inset -computes the size (area in 2D, volume in 3D) of each region, and remove - all labels whose size is below the value specified by the user. - [Note: deprecated, replaced by Label Size Filtering] +computes the size (area in 2D, + volume in 3D) of each region, + and remove all labels whose size is below the value specified by the user. + [Note: + deprecated, + replaced by Label Size Filtering] \end_layout \end_inset @@ -15879,11 +16441,14 @@ Label Morphological Filtering \end_layout \begin_layout Standard -Applies morphological filtering operators on the label map, by choosing - the type of operation (dilation, erosion, opening or closing), and the - radius of the operation. +Applies morphological filtering operators on the label map, + by choosing the type of operation (dilation, + erosion, + opening or closing), + and the radius of the operation. The principle is the same as morphological filtering on grayscale images, - but using label values instead of gray levels, and avoiding + but using label values instead of gray levels, + and avoiding \begin_inset Quotes eld \end_inset @@ -15895,7 +16460,8 @@ collisions \end_layout \begin_layout Itemize -when applying a dilation, only background pixels or voxels are updated, +when applying a dilation, + only background pixels or voxels are updated, according to the closest label within the neighborhood (Figure \begin_inset space ~ \end_inset @@ -15907,18 +16473,19 @@ reference "fig:Morphological-Filtering-Label" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -b). - When two regions are adjacent without background pixel between them, the - application of dilation do not transform nor move their boundary. + When two regions are adjacent without background pixel between them, + the application of dilation do not transform nor move their boundary. \end_layout \begin_layout Itemize -when applying an erosion, label pixels or voxels are removed depending on - the labels within the neighborhood and on the +when applying an erosion, + label pixels or voxels are removed depending on the labels within the neighborhood and on the \begin_inset Quotes eld \end_inset @@ -15931,13 +16498,13 @@ any Label \begin_deeper \begin_layout Itemize -if true, current label is removed if any other label (background or another - region) is contained within the neighborhood +if true, + current label is removed if any other label (background or another region) is contained within the neighborhood \end_layout \begin_layout Itemize -if false, current label is removed if and only if a background pixel or - voxel is contained within the neighborhood (Figure +if false, + current label is removed if and only if a background pixel or voxel is contained within the neighborhood (Figure \begin_inset space ~ \end_inset @@ -15948,6 +16515,7 @@ reference "fig:Morphological-Filtering-Label" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15965,9 +16533,10 @@ Any Label \begin_inset Quotes erd \end_inset - option is set to false, performing a morphological closing results in a - label map with more regular regions, with less gaps between regions, and - preserved boundaries between adjacent regions (Figure + option is set to false, + performing a morphological closing results in a label map with more regular regions, + with less gaps between regions, + and preserved boundaries between adjacent regions (Figure \begin_inset space ~ \end_inset @@ -15978,6 +16547,7 @@ reference "fig:Morphological-Filtering-Label" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -15985,8 +16555,9 @@ noprefix "false" \end_layout \begin_layout Standard -The computation of the neighborhood, and of the closest label, is based - on chamfer masks (see Section +The computation of the neighborhood, + and of the closest label, + is based on chamfer masks (see Section \begin_inset space ~ \end_inset @@ -15997,6 +16568,7 @@ reference "subsec:Distance-Transform" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -16005,6 +16577,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16012,6 +16586,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16043,6 +16619,8 @@ Label image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16074,6 +16652,8 @@ Dilation \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16105,6 +16685,8 @@ Erosion \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16167,8 +16749,8 @@ Fill Label Holes \begin_layout Standard Fills the holes within regions. - Only the holes that are adjacent to a single region are filled, using a - fill corresponding to the label of the adjacent region. + Only the holes that are adjacent to a single region are filled, + using a fill corresponding to the label of the adjacent region. \end_layout \begin_layout Standard @@ -16216,7 +16798,9 @@ clear \begin_inset Quotes erd \end_inset - a label, by replacing its value by 0, or to merge to adjacent regions, + a label, + by replacing its value by 0, + or to merge to adjacent regions, by replacing the value of a label by the value of its neighbor. \end_layout @@ -16231,8 +16815,7 @@ name "op:Remap-Labels" \end_inset -re-computes the label of each region such that the largest label is equal - to the number of labels (Figure +re-computes the label of each region such that the largest label is equal to the number of labels (Figure \begin_inset space ~ \end_inset @@ -16243,6 +16826,7 @@ reference "fig:Remap-Labels" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -16261,6 +16845,8 @@ empty labels \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16268,6 +16854,8 @@ status open \begin_layout Plain Layout \align center \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16276,7 +16864,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-WTH-areaOpen-lbl2-border.png - height 4cm + special height=4cm \end_inset @@ -16299,6 +16887,8 @@ Label image \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16307,7 +16897,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-lbl2-hist.png - height 4cm + special height=4cm \end_inset @@ -16330,6 +16920,8 @@ Original histogram \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16338,7 +16930,7 @@ status open \align center \begin_inset Graphics filename images/grains/grains-lbl2-trim-hist.png - height 4cm + special height=4cm \end_inset @@ -16382,8 +16974,10 @@ Remap Labels plugin. (a) Original label image. - (b) Histogram of original label image, showing missing labels. - (c) Histogram of the remapped label image, without missing labels. + (b) Histogram of original label image, + showing missing labels. + (c) Histogram of the remapped label image, + without missing labels. \end_layout \end_inset @@ -16405,6 +16999,7 @@ The Figure \begin_inset CommandInset ref LatexCommand ref reference "fig:Remap-Labels" +nolink "false" \end_inset @@ -16413,8 +17008,7 @@ reference "fig:Remap-Labels" Remap Labels \series default plugin. - The left image is a label image in which small labels as well as labels - touching image borders have been removed (Fig. + The left image is a label image in which small labels as well as labels touching image borders have been removed (Fig. \begin_inset space ~ \end_inset @@ -16422,6 +17016,7 @@ Remap Labels \begin_inset CommandInset ref LatexCommand ref reference "fig:Remap-Labels" +nolink "false" \end_inset @@ -16434,7 +17029,8 @@ holes \begin_inset Quotes erd \end_inset -, corresponding to the labels that have been removed (Fig. +, + corresponding to the labels that have been removed (Fig. \begin_inset space ~ \end_inset @@ -16442,12 +17038,13 @@ holes \begin_inset CommandInset ref LatexCommand ref reference "fig:Remap-Labels" +nolink "false" \end_inset -b). - The application of the plugin results in a similar images, without missing - labels (Fig. + The application of the plugin results in a similar images, + without missing labels (Fig. \begin_inset space ~ \end_inset @@ -16455,12 +17052,13 @@ reference "fig:Remap-Labels" \begin_inset CommandInset ref LatexCommand ref reference "fig:Remap-Labels" +nolink "false" \end_inset -c). - The number of labels in the image corresponds to the maximal value in the - image (in this case, 71). + The number of labels in the image corresponds to the maximal value in the image (in this case, + 71). \end_layout \begin_layout Standard @@ -16475,11 +17073,10 @@ Region adjacencies \end_layout \begin_layout Standard -It may sometimes be useful to consider the adjacency relationships between - regions. +It may sometimes be useful to consider the adjacency relationships between regions. This can be useful for post-processing of segmentation results (using e.g. - graph processing algorithms), or for exploring collections of cells within - cellular tissues + graph processing algorithms), + or for exploring collections of cells within cellular tissues \begin_inset CommandInset citation LatexCommand citep key "Florindo_2016_botanique" @@ -16512,8 +17109,7 @@ The \series bold region adjacency graph \series default -plugin gives access to the neighborhood relationship between adjacent regions - (Figure +plugin gives access to the neighborhood relationship between adjacent regions (Figure \begin_inset space ~ \end_inset @@ -16521,6 +17117,7 @@ plugin gives access to the neighborhood relationship between adjacent regions \begin_inset CommandInset ref LatexCommand ref reference "fig:Region-Adjacency-Graph" +nolink "false" \end_inset @@ -16533,15 +17130,16 @@ Region Adjacency Graph \end_layout \begin_layout Standard -The plugin works for both 2D and 3D images, and requires a label image as - input. - The output of the plugin is a results table with as many rows as the number - of pairs of adjacent regions, containing the labels of the two adjacent - regions. +The plugin works for both 2D and 3D images, + and requires a label image as input. + The output of the plugin is a results table with as many rows as the number of pairs of adjacent regions, + containing the labels of the two adjacent regions. \end_layout \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16584,11 +17182,13 @@ name "fig:Region-Adjacency-Graph" \end_inset -Computation of the Region Adjacency Graph (RAG) on a microscopy image of - plant tissue. - Left: original image. - Middle: result of watershed segmentation. - Right: overlay of edges representing adjacent regions. +Computation of the Region Adjacency Graph (RAG) on a microscopy image of plant tissue. + Left: + original image. + Middle: + result of watershed segmentation. + Right: + overlay of edges representing adjacent regions. \end_layout \end_inset @@ -16602,9 +17202,8 @@ Computation of the Region Adjacency Graph (RAG) on a microscopy image of \end_layout \begin_layout Standard -In the current implementation, MorphoLibJ considers that two regions are - adjacent if they are separated by 0 or 1 pixel (or voxel) in one of the - two (or three) main directions. +In the current implementation, + MorphoLibJ considers that two regions are adjacent if they are separated by 0 or 1 pixel (or voxel) in one of the two (or three) main directions. \end_layout @@ -16620,8 +17219,7 @@ Adjacent region boundaries \end_layout \begin_layout Standard -It may sometimes be useful to visualize the boundaries between adjacent - regions (Fig. +It may sometimes be useful to visualize the boundaries between adjacent regions (Fig. \begin_inset space ~ \end_inset @@ -16632,6 +17230,7 @@ reference "fig:Region-Boundary-Labeling" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -16641,6 +17240,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16696,9 +17297,11 @@ Label Region Boundaries \end_inset plugin. - Left: a label image containing regions with various adjacencies. - Right: a new label map was created, where each label corresponds to the - boundary between two or more regions within the original image. + Left: + a label image containing regions with various adjacencies. + Right: + a new label map was created, + where each label corresponds to the boundary between two or more regions within the original image. \end_layout \end_inset @@ -16729,8 +17332,8 @@ Region Boundaries Labeling \begin_inset Quotes erd \end_inset - considers similar boundaries, but in addition it associates a label to - each boundary. + considers similar boundaries, + but in addition it associates a label to each boundary. \end_layout @@ -16739,11 +17342,10 @@ Label Boundaries \end_layout \begin_layout Standard -Creates a new binary image containing value 255 for pixels/voxels having - a neighbor with a different value. +Creates a new binary image containing value 255 for pixels/voxels having a neighbor with a different value. The background is taken into account for computing boundaries. - Only the bottom-left neighborhood is checked during image iteration, to - generate a thinner boundary image. + Only the bottom-left neighborhood is checked during image iteration, + to generate a thinner boundary image. \end_layout \begin_layout Minisec @@ -16751,15 +17353,14 @@ Region Boundaries Labeling \end_layout \begin_layout Standard -Computes a new label map, where each label corresponds to the boundary between - two (or more) regions. +Computes a new label map, + where each label corresponds to the boundary between two (or more) regions. The background is also considered as a region. - The list of identified boundaries together with their label and bounding - regions is displayed in the log window. - Most boundaries are adjacent to two regions, but the junctions between - boundaries may be adjacent to three or more regions. - Label map of boundaries is represented using floating point numbers, leading - to a maximum number of + The list of identified boundaries together with their label and bounding regions is displayed in the log window. + Most boundaries are adjacent to two regions, + but the junctions between boundaries may be adjacent to three or more regions. + Label map of boundaries is represented using floating point numbers, + leading to a maximum number of \begin_inset Formula $2^{23}$ \end_inset @@ -16808,10 +17409,12 @@ reference "op:Interface-Surface-Area" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -), that measures the surface area between adjacent 3D regions. +), + that measures the surface area between adjacent 3D regions. \end_layout \begin_layout Standard @@ -16847,6 +17450,7 @@ reference "fig:Extract-Neighbor-Labels" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -16855,6 +17459,8 @@ noprefix "false" \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -16887,8 +17493,8 @@ name "fig:Extract-Neighbor-Labels" \end_inset -An example of a label image containing contiguous regions, and result of - the selection of the neighbors of two regions (keeping the original regions). +An example of a label image containing contiguous regions, + and result of the selection of the neighbors of two regions (keeping the original regions). \end_layout \end_inset @@ -16923,8 +17529,8 @@ name "sec:Label-Edition-plugin" \end_layout \begin_layout Standard -To ease the processing of label images, MorphoLibJ provides the Label Edition - plugin (available under +To ease the processing of label images, + MorphoLibJ provides the Label Edition plugin (available under \begin_inset Quotes eld \end_inset @@ -16936,8 +17542,7 @@ Label Edition \end_inset ). - This plugin contains a graphical user interface (GUI) where the users can - perform the following set of editing tasks (Figure + This plugin contains a graphical user interface (GUI) where the users can perform the following set of editing tasks (Figure \begin_inset space ~ \end_inset @@ -16945,6 +17550,7 @@ Label Edition \begin_inset CommandInset ref LatexCommand ref reference "fig:Label-Edition-plugin" +nolink "false" \end_inset @@ -16952,17 +17558,18 @@ reference "fig:Label-Edition-plugin" \end_layout \begin_layout Itemize -Manually merge labels after their selection using the point selection tool - (in 2D and 3D). +Manually merge labels after their selection using the point selection tool (in 2D and 3D). \end_layout \begin_layout Itemize -Apply morphological erosion, dilation, opening and closing with a square/cube - of radius 1 as structuring element. +Apply morphological erosion, + dilation, + opening and closing with a square/cube of radius 1 as structuring element. \end_layout \begin_layout Itemize -Remove labels by area or volume (size opening operation), largest size, +Remove labels by area or volume (size opening operation), + largest size, manual selection or border location. \end_layout @@ -16975,9 +17582,11 @@ in place \begin_inset Quotes erd \end_inset -, i.e., the input image gets directly modified. - However, the initial status of the label image can be recovered by clicking - on +, + i.e., + the input image gets directly modified. + However, + the initial status of the label image can be recovered by clicking on \begin_inset Quotes eld \end_inset @@ -16990,6 +17599,8 @@ Reset \begin_layout Standard \begin_inset Float figure +placement document +alignment document wide false sideways false status open @@ -17016,10 +17627,12 @@ name "fig:Label-Edition-plugin" \end_inset Label Edition plugin. - From left to right and from top to bottom: overview of the plugin GUI on - a 2D label image, result of label merging by manual selection, removal - of selected labels, label erosion and removal of largest label (in this - case, the largest label corresponds to the background). + From left to right and from top to bottom: + overview of the plugin GUI on a 2D label image, + result of label merging by manual selection, + removal of selected labels, + label erosion and removal of largest label (in this case, + the largest label corresponds to the background). \end_layout @@ -17042,14 +17655,13 @@ Library interoperability \end_layout \begin_layout Standard -A key design concept was the modularity of the implementation to facilitate - its reusability. +A key design concept was the modularity of the implementation to facilitate its reusability. Three layers with different programming abstraction can be identified: \end_layout \begin_layout Itemize -For final users, plugins provide graphical display and intuitive tuning - of parameters. +For final users, + plugins provide graphical display and intuitive tuning of parameters. Such plugins can easily be incorporated into a macro: \begin_inset listings lstparams "basicstyle={\scriptsize},breaklines=true,captionpos=b,commentstyle={\color{mygreen}},keywordstyle={\color{blue}},language=Java,numbers=left,showstringspaces=false,stringstyle={\color{magenta}}" @@ -17063,7 +17675,8 @@ status open \begin_layout Plain Layout -run("Regional Min & Max", "operation=[Regional Maxima] connectivity=4"); +run("Regional Min & Max", + "operation=[Regional Maxima] connectivity=4"); \end_layout \end_inset @@ -17072,9 +17685,9 @@ run("Regional Min & Max", "operation=[Regional Maxima] connectivity=4"); \end_layout \begin_layout Itemize -For plugins developers, operators are available through collections of static - methods, making it possible to apply most operations with a single line - of code. +For plugins developers, + operators are available through collections of static methods, + making it possible to apply most operations with a single line of code. Example: \begin_inset listings lstparams "basicstyle={\scriptsize},breaklines=true,captionpos=b,commentstyle={\color{mygreen}},keywordstyle={\color{blue}},language=Java,numbers=left,showstringspaces=false,stringstyle={\color{magenta}}" @@ -17088,7 +17701,8 @@ status open \begin_layout Plain Layout -ImageProcessor maxima = MinimaAndMaxima.regionalMaxima(image, 4); +ImageProcessor maxima = MinimaAndMaxima.regionalMaxima(image, + 4); \end_layout \end_inset @@ -17097,9 +17711,10 @@ ImageProcessor maxima = MinimaAndMaxima.regionalMaxima(image, 4); \end_layout \begin_layout Itemize -For core developers, algorithms are implementations of abstract interfaces, - making it possible to choose or develop the most appropriate one, and to - monitor execution events. +For core developers, + algorithms are implementations of abstract interfaces, + making it possible to choose or develop the most appropriate one, + and to monitor execution events. \begin_inset listings lstparams "basicstyle={\scriptsize},breaklines=true,captionpos=b,commentstyle={\color{mygreen}},keywordstyle={\color{blue}},language=Java,numbers=left,showstringspaces=false,stringstyle={\color{magenta}}" inline false @@ -17112,7 +17727,8 @@ status open \begin_layout Plain Layout -RegionalExtremaAlgo algo = new RegionalExtremaByFlooding(); +RegionalExtremaAlgo algo = new RegionalExtremaByFlooding(); + \end_layout \begin_layout Plain Layout @@ -17151,7 +17767,8 @@ ImageProcessor result = algo.applyTo(image); \end_layout \begin_layout Standard -In total, the library provides nearly two hundred classes and interfaces. +In total, + the library provides nearly two hundred classes and interfaces. \end_layout @@ -17160,33 +17777,35 @@ Library organization \end_layout \begin_layout Standard -The library follows a logic structure of folders divided by topics aiming - at their re-usability from other plugins or scripts, among others: +The library follows a logic structure of folders divided by topics aiming at their re-usability from other plugins or scripts, + among others: \end_layout \begin_layout Description -inra.ijpb.data contains generic data structures for manipulating 2D or 3D - images +inra.ijpb.data contains generic data structures for manipulating 2D or 3D images \end_layout \begin_layout Description -inra.ijpb.binary contains the set of utilities for working on binary images - (connected component labeling, distance transform, geodesic distance transform...) +inra.ijpb.binary contains the set of utilities for working on binary images (connected component labeling, + distance transform, + geodesic distance transform...) \end_layout \begin_layout Description -inra.ijpb.geometry contains utility functions for geometric computing, and - several classes for representing geometric primitives (ellipse, point pair...) +inra.ijpb.geometry contains utility functions for geometric computing, + and several classes for representing geometric primitives (ellipse, + point pair...) \end_layout \begin_layout Description -inra.ijpb.label contains the utilities for label images (cropping, size opening, - remove border labels, etc) +inra.ijpb.label contains the utilities for label images (cropping, + size opening, + remove border labels, + etc) \end_layout \begin_layout Description -inra.ijpb.measure contains the tools for geometric and gray level characterization - of 2D or 3D images +inra.ijpb.measure contains the tools for geometric and gray level characterization of 2D or 3D images \end_layout \begin_layout Description @@ -17194,20 +17813,16 @@ inra.ijpb.morphology contains the collection of mathematical morphology operator \end_layout \begin_layout Description -inra.ijpb.watershed contains the classes implementing the different versions - of the watershed algorithm +inra.ijpb.watershed contains the classes implementing the different versions of the watershed algorithm \end_layout \begin_layout Description -inra.ijpb.plugins contains the set of plugins that is accessible from ImageJ/Fiji - Plugins menu +inra.ijpb.plugins contains the set of plugins that is accessible from ImageJ/Fiji Plugins menu \end_layout \begin_layout Standard -All major methods have a general class with static methods that allow calling - the methods on 2D and 3D images in a transparent way. - This modularity permitted to develop other plugins devoted to the analysis - of nucleus images +All major methods have a general class with static methods that allow calling the methods on 2D and 3D images in a transparent way. + This modularity permitted to develop other plugins devoted to the analysis of nucleus images \begin_inset CommandInset citation LatexCommand citep key "Poulet_2015_bmc" @@ -17215,7 +17830,8 @@ literal "true" \end_inset -, gray level granulometries +, + gray level granulometries \begin_inset CommandInset citation LatexCommand citep key "Devaux2014" @@ -17239,9 +17855,7 @@ Scripting MorphoLibJ \end_layout \begin_layout Standard -One advantage of this organization of the library and the use of public - static methods is that it allows very easy and fast prototyping of morphologica -l algorithms and pipelines. +One advantage of this organization of the library and the use of public static methods is that it allows very easy and fast prototyping of morphological algorithms and pipelines. \end_layout @@ -17250,9 +17864,8 @@ Segmentation pipeline prototype \end_layout \begin_layout Standard -Let's see an example in a complete Beanshell script that takes the active - 2D or 3D image and finds a reasonable segmentation combining a set of morpholog -ical operations (gradient, extended minima and watershed): +Let's see an example in a complete Beanshell script that takes the active 2D or 3D image and finds a reasonable segmentation combining a set of morphological operations (gradient, + extended minima and watershed): \end_layout \begin_layout Standard @@ -17347,18 +17960,20 @@ strel = Strel3D.Shape.CUBE.fromRadius( 1 ); \begin_layout Plain Layout -image = Morphology.gradient( imp.getImageStack(), strel ); +image = Morphology.gradient( imp.getImageStack(), + strel ); \end_layout \begin_layout Plain Layout -// find regional minima on gradient image with dynamic value of 30 and 6-connect -ivity +// find regional minima on gradient image with dynamic value of 30 and 6-connectivity \end_layout \begin_layout Plain Layout -regionalMinima = MinimaAndMaxima3D.extendedMinima( image, 30, 6 ); +regionalMinima = MinimaAndMaxima3D.extendedMinima( image, + 30, + 6 ); \end_layout \begin_layout Plain Layout @@ -17368,8 +17983,9 @@ regionalMinima = MinimaAndMaxima3D.extendedMinima( image, 30, 6 ); \begin_layout Plain Layout -imposedMinima = MinimaAndMaxima3D.imposeMinima( image, regionalMinima, 6 - ); +imposedMinima = MinimaAndMaxima3D.imposeMinima( image, + regionalMinima, + 6 ); \end_layout \begin_layout Plain Layout @@ -17379,13 +17995,14 @@ imposedMinima = MinimaAndMaxima3D.imposeMinima( image, regionalMinima, 6 \begin_layout Plain Layout -labeledMinima = BinaryImages.componentsLabeling( regionalMinima, 6, 32 ); +labeledMinima = BinaryImages.componentsLabeling( regionalMinima, + 6, + 32 ); \end_layout \begin_layout Plain Layout -// apply marker-based watershed using the labeled minima on the minima-imposed - +// apply marker-based watershed using the labeled minima on the minima-imposed \end_layout \begin_layout Plain Layout @@ -17395,7 +18012,9 @@ labeledMinima = BinaryImages.componentsLabeling( regionalMinima, 6, 32 ); \begin_layout Plain Layout -resultStack = Watershed.computeWatershed( imposedMinima, labeledMinima, 6, +resultStack = Watershed.computeWatershed( imposedMinima, + labeledMinima, + 6, true ); \end_layout @@ -17411,7 +18030,8 @@ resultStack = Watershed.computeWatershed( imposedMinima, labeledMinima, 6, \begin_layout Plain Layout -resultImage = new ImagePlus( "watershed", resultStack ); +resultImage = new ImagePlus( "watershed", + resultStack ); \end_layout \begin_layout Plain Layout @@ -17444,10 +18064,7 @@ Label visualization in 3D viewer \end_layout \begin_layout Standard -Making use of MorphoLibJ's label methods and the ImageJ 3D Viewer's visualizatio -n tools it is quite simple to create a script to display each label of an - image as 3D surfaces of the corresponding colors provided by the image - look-up table: +Making use of MorphoLibJ's label methods and the ImageJ 3D Viewer's visualization tools it is quite simple to create a script to display each label of an image as 3D surfaces of the corresponding colors provided by the image look-up table: \end_layout \begin_layout Standard @@ -17463,32 +18080,38 @@ status open \begin_layout Plain Layout -import inra.ijpb.label.LabelImages; +import inra.ijpb.label.LabelImages; + \end_layout \begin_layout Plain Layout -import ij3d.Image3DUniverse; +import ij3d.Image3DUniverse; + \end_layout \begin_layout Plain Layout -import ij3d.ContentConstants; +import ij3d.ContentConstants; + \end_layout \begin_layout Plain Layout -import org.scijava.vecmath.Color3f; +import org.scijava.vecmath.Color3f; + \end_layout \begin_layout Plain Layout -import ij.IJ; +import ij.IJ; + \end_layout \begin_layout Plain Layout -import isosurface.SmoothControl; +import isosurface.SmoothControl; + \end_layout \begin_layout Plain Layout @@ -17502,7 +18125,8 @@ import isosurface.SmoothControl; \begin_layout Plain Layout -verbose = false; +verbose = false; + \end_layout \begin_layout Plain Layout @@ -17521,7 +18145,10 @@ verbose = false; \begin_layout Plain Layout -imp.setDisplayRange( 0, 255 ); imp.updateAndDraw(); +imp.setDisplayRange( 0, + 255 ); + imp.updateAndDraw(); + \end_layout \begin_layout Plain Layout @@ -17535,7 +18162,8 @@ imp.setDisplayRange( 0, 255 ); imp.updateAndDraw(); \begin_layout Plain Layout -labels = LabelImages.findAllLabels( imp ); +labels = LabelImages.findAllLabels( imp ); + \end_layout \begin_layout Plain Layout @@ -17545,12 +18173,14 @@ labels = LabelImages.findAllLabels( imp ); \begin_layout Plain Layout -univ = new Image3DUniverse(); +univ = new Image3DUniverse(); + \end_layout \begin_layout Plain Layout -univ.show(); +univ.show(); + \end_layout \begin_layout Plain Layout @@ -17560,7 +18190,8 @@ univ.show(); \begin_layout Plain Layout -lut = imp.getLuts()[0]; +lut = imp.getLuts()[0]; + \end_layout \begin_layout Plain Layout @@ -17575,7 +18206,9 @@ lut = imp.getLuts()[0]; \begin_layout Plain Layout -for( i=0; ir_{2}>r_{3}$ \end_inset -, corresponding to the lengths of each semi-axis +, + corresponding to the lengths of each semi-axis \end_layout \begin_layout Itemize -a 3D orientation, that can be represented by three Euler angles. +a 3D orientation, + that can be represented by three Euler angles. \end_layout \begin_layout Section @@ -24881,7 +25605,8 @@ Moments \end_layout \begin_layout Standard -In 3D, the +In 3D, + the \series bold moments \series default @@ -24909,11 +25634,13 @@ where \begin_inset Formula $X$ \end_inset -, taking value 1 if the specified point is within the set +, + taking value 1 if the specified point is within the set \begin_inset Formula $X$ \end_inset -, and +, + and \begin_inset Formula $0$ \end_inset @@ -25022,7 +25749,8 @@ where \begin_inset Formula $3\times3$ \end_inset - matrix whose diagonal elements are the corresponding eigen values, + matrix whose diagonal elements are the corresponding eigen values, + \begin_inset Formula $\Lambda_{ii}=\lambda_{i}$ \end_inset @@ -25035,18 +25763,19 @@ Eigen values are ordered in decreasing order. \begin_inset Formula $\boldsymbol{Q}$ \end_inset - can be used to extract the orientation of the main axes of the structure - (section + can be used to extract the orientation of the main axes of the structure (section \begin_inset CommandInset ref LatexCommand ref reference "sec:Equivalent-Ellipsoid-Angles" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset -), whereas the eigen values +), + whereas the eigen values \begin_inset Formula $\lambda_{i}$ \end_inset @@ -25057,6 +25786,7 @@ reference "sec:Equivalent-Ellipsoid-Radius" plural "false" caps "false" noprefix "false" +nolink "false" \end_inset @@ -25128,7 +25858,8 @@ A rotation of \end_layout \begin_layout Standard -Similarily, a rotation of +Similarily, + a rotation of \begin_inset Formula $\theta$ \end_inset @@ -25152,7 +25883,8 @@ Similarily, a rotation of \end_layout \begin_layout Standard -Finally, a rotation of +Finally, + a rotation of \begin_inset Formula $\varphi$ \end_inset @@ -25192,29 +25924,33 @@ R_{31} & R_{32} & R_{33} \end_layout \begin_layout Standard -Such a matrix can be represented by a sequence of three successive rotations - around the main axes. - As matrix multiplication does not commute, the order of the axes one rotates - about will affect the result. - In MorphoLibJ, we follow the choice of G. +Such a matrix can be represented by a sequence of three successive rotations around the main axes. + As matrix multiplication does not commute, + the order of the axes one rotates about will affect the result. + In MorphoLibJ, + we follow the choice of G. Slabaugh and consider rotation first about the \begin_inset Formula $x$ \end_inset --axis, then about the +-axis, + then about the \begin_inset Formula $y$ \end_inset --axis, and finally about the +-axis, + and finally about the \begin_inset Formula $z$ \end_inset -axis. - Then, the angles + Then, + the angles \begin_inset Formula $\psi$ \end_inset -, +, + \begin_inset Formula $\theta$ \end_inset @@ -25235,7 +25971,8 @@ roll \begin_inset Quotes erd \end_inset -, angle +, + angle \begin_inset Formula $\theta$ \end_inset @@ -25247,7 +25984,8 @@ pitch \begin_inset Quotes erd \end_inset -, and angle +, + and angle \begin_inset Formula $\varphi$ \end_inset @@ -25284,7 +26022,8 @@ The problem is now to identify the three Euler angles \begin_inset Formula $\psi$ \end_inset -, +, + \begin_inset Formula $\theta$ \end_inset @@ -25305,7 +26044,8 @@ We start considering the elevation \begin_inset Formula $\theta$ \end_inset -, or +, + or \begin_inset Quotes eld \end_inset @@ -25318,7 +26058,8 @@ pitch \begin_inset Formula $R_{31}$ \end_inset - of the matrix, one finds + of the matrix, + one finds \begin_inset Formula \begin{align*} R_{31} & =-\sin\theta @@ -25352,7 +26093,8 @@ by keeping the value of \end_inset will be considered later. - In practice, we replace the + In practice, + we replace the \begin_inset Formula $\sin^{-1}$ \end_inset @@ -25364,7 +26106,8 @@ by keeping the value of \end_layout \begin_layout Standard -Compared to the document of Slabaugh, keeping +Compared to the document of Slabaugh, + keeping \begin_inset Formula $\theta\in[-\frac{\pi}{2};\frac{\pi}{2}]$ \end_inset @@ -25372,7 +26115,8 @@ Compared to the document of Slabaugh, keeping \begin_inset Formula $\cos\theta$ \end_inset -, and therefore simplifies the remaining computations. +, + and therefore simplifies the remaining computations. \end_layout \begin_layout Subsection @@ -25445,7 +26189,8 @@ The azimut \begin_inset Formula $\varphi$ \end_inset -, or +, + or \begin_inset Quotes eld \end_inset @@ -25453,7 +26198,8 @@ yaw \begin_inset Quotes erd \end_inset -, can be obtained from +, + can be obtained from \begin_inset Formula \begin{align*} \frac{R_{21}}{R_{11}} & =\tan\varphi\\ @@ -25478,11 +26224,13 @@ When the matrix element \begin_inset Formula $R_{31}=\pm1$ \end_inset -, we have +, + we have \begin_inset Formula $\theta=\pm\pi/2$ \end_inset -: the main axis of the ellipsoid is aligned with the +: + the main axis of the ellipsoid is aligned with the \begin_inset Formula $z$ \end_inset @@ -25491,15 +26239,18 @@ When the matrix element \begin_inset Formula $R_{12}$ \end_inset -, +, + \begin_inset Formula $R_{13}$ \end_inset -, +, + \begin_inset Formula $R_{22}$ \end_inset -, and +, + and \begin_inset Formula $R_{23}$ \end_inset @@ -25511,7 +26262,8 @@ When the matrix element \begin_inset Formula $\varphi$ \end_inset - are linked, and an infinite number of solutions exists + are linked, + and an infinite number of solutions exists \begin_inset CommandInset citation LatexCommand citep key "Slabaugh_1999" @@ -25525,8 +26277,7 @@ literal "false" Gimbal lock \emph default . - A convenient way to obtain a single valid solution is to set the value - for the azimut + A convenient way to obtain a single valid solution is to set the value for the azimut \begin_inset Formula $\varphi$ \end_inset @@ -25534,7 +26285,8 @@ Gimbal lock \begin_inset Formula $0$ \end_inset -, and compute +, + and compute \begin_inset Formula $\psi$ \end_inset @@ -25581,7 +26333,8 @@ If \begin_inset Formula $\theta=-\pi/2$ \end_inset -, similar development leads to: +, + similar development leads to: \begin_inset Formula \begin{align*} \psi & =-\varphi+\text{atan2}(-R_{12},-R_{13}) @@ -25620,20 +26373,22 @@ name "sec:Equivalent-Ellipsoid-Radius" \end_layout \begin_layout Standard -Let us suppose that the ellipsoid is centered and aligned with the main - axes. - From centering, we have +Let us suppose that the ellipsoid is centered and aligned with the main axes. + From centering, + we have \begin_inset Formula $m_{pqr}=\mu_{pqr}$ \end_inset . - For integration, it is more convenient to use spherical coordinates + For integration, + it is more convenient to use spherical coordinates \begin_inset Formula $(\rho,\theta,\varphi)$ \end_inset -, corresponding to the distance to the origin, to the inclination with the - vertical, and to the azimuth (these notations are different from the ones - used for Euler angles). +, + corresponding to the distance to the origin, + to the inclination with the vertical, + and to the azimuth (these notations are different from the ones used for Euler angles). This corresponds to: \begin_inset Formula \begin{align*} @@ -25648,7 +26403,8 @@ with \begin_inset Formula $\rho\in[0;+\infty[$ \end_inset -, +, + \begin_inset Formula $\varphi\in[0;2\pi]$ \end_inset @@ -25660,8 +26416,7 @@ with \end_layout \begin_layout Standard -The Jacobian matrix of the transformation is as follow (see example 3 in - +The Jacobian matrix of the transformation is as follow (see example 3 in \begin_inset Quotes eld \end_inset @@ -25724,7 +26479,8 @@ The determinant equals \begin_inset Formula $a$ \end_inset -, +, + \begin_inset Formula $b$ \end_inset @@ -25782,8 +26538,8 @@ Moment m200 \end_layout \begin_layout Standard -When considering centered ellipsoid aligned with principal axes, the eigen - values +When considering centered ellipsoid aligned with principal axes, + the eigen values \begin_inset Formula $\lambda_{i}$ \end_inset @@ -25791,7 +26547,8 @@ When considering centered ellipsoid aligned with principal axes, the eigen \begin_inset Formula $\mu_{200}$ \end_inset -, +, + \begin_inset Formula $\mu_{020}$ \end_inset @@ -25857,7 +26614,8 @@ Coming back to moment integral: \end_layout \begin_layout Standard -Then, the central moments are expressed as: +Then, + the central moments are expressed as: \begin_inset Formula \begin{align*} \lambda_{1}=\mu_{200} & =\frac{r_{1}^{2}}{5}m_{000}\\ @@ -25875,7 +26633,8 @@ We therefore have \begin_inset Formula $\lambda_{i}=\frac{r_{i}^{2}}{5}m_{000}$ \end_inset -, leading to: +, + leading to: \begin_inset Formula \begin{align} r_{i} & =\sqrt{\frac{5\cdot\lambda_{i}}{m_{000}}} diff --git a/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.odg b/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.odg new file mode 100644 index 00000000..13fcc0e5 Binary files /dev/null and b/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.odg differ diff --git a/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.png b/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.png new file mode 100644 index 00000000..bff4c5a4 Binary files /dev/null and b/doc/MorphoLibJ-manual/images/region/regionBoundaryPoints.png differ