Analysis operators ================== Label operators --------------- clean-borders [-l] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This operator removes the image contents touching the borders. This is obtained by subtracting from the input image its morphological reconstruction from the border. The operator can be applied to both intensity and label images; however, its typical application is the removal of segmented objects that intersect the image border. The ``-l`` option must be used when processing label images. click-select [-d max-distance] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This operator selects labels in the input image based on specified positions. The algorithm works by determining for each position the closest label, i.e. the label having the pixel/voxel closest to the specified position. Proximity is measured using Euclidean distance, taking into account the spatial calibration of the image. The file ```` contains the positions to be used for the selection, following the ``sviewer`` in-house shape file format. The positions should be defined in the physical space of the image. The ``-d`` option allows to set a maximum distance, above which labels are simply ignored. click-replace [-d max-distance] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This operator replace labels in the input image based on specified positions. The algorithm works by determining for each position the closest label, i.e. the label having the pixel/voxel closest to the specified position, and replaces this label by a new value. Proximity is measured using Euclidean distance, taking into account the spatial calibration of the image. The file ```` contains the positions to be used for the selection, following the ``sviewer`` in-house shape file format. The positions should be defined in the physical space of the image. The parameter specifies the value to assign to the selected labels. The ``-d`` option allows to set a maximum distance, above which labels are simply ignored. label-boundaries [-a] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This operator computes the boundaries between labels in an image. By default, the output is a binary image of the boundaries. If the ``-a`` option is specified, the boundaries are overlaid to the labels of the input image. .. figure:: ../../include/root-label-boundaries.png :width: 75.0% Computing boundaries between labels with ``label-boundaries``. label-defragmentation [-n 4,6|8,26] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This operator takes as input a label image in which each label may appear as several connected components. The operator retains the largest component for each label and removes all the other ones. The discarded components are removed by filling the holes they make in the largest components of other labels. The connectivity used to define connected sets is set with the ``-n`` option. See :ref:`sec-neighbourhood-system` for more information about the meaning and usage of this option. replace largest|