Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://doi.org/10.5201/ipol.2022.215
11 April 2026, 15:45:18 UTC
  • Code
  • Branches (0)
  • Releases (2)
  • Visits
    • Branches
    • Releases
      • 2
      • 2
      • 1
    • c530314
    • /
    • paraws
    • /
    • README.txt
    Raw File Download

    To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
    Select below a type of object currently browsed in order to display its associated SWHID and permalink.

    • content
    • directory
    • snapshot
    • release
    origin badgecontent badge
    swh:1:cnt:b745367968d5a868b69e60581f25b4a249a83ef8
    origin badgedirectory badge
    swh:1:dir:bb309b6c220124321a1ac969488a1621c674679d
    origin badgesnapshot badge
    swh:1:snp:78d18a3e9f4a56ecaf1e6817d370abae618d0a7c
    origin badgerelease badge
    swh:1:rel:f3a4320e8346f38185539583336571c1b856fc47

    This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
    Select below a type of object currently browsed in order to generate citations for them.

    • content
    • directory
    • snapshot
    • release
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    README.txt
    - Name and brief description of the program:
    
    paraws is an algorithm to compute the watershed lines in a disorderly fashion.
    This new approach allows for easy parallelisation and as it does not require
    sorting the pixels elevations. The watershed transform can be performed on more
    complex types such as floats.
    
    
    
    
    - Version number and release date:
    
    This program has no versioning numbers but its current version has been
    released in 26 May 2020.
    
    
    
    
    - Reference to the article:
    
    Not yet published
    
    
    
    
    - Authors and licence:
    
    This program is written by Theodore Chabardes
    <theodore.chabardes@mines-paristech.fr> with contributions from Pierre Guillou
    <pierre.guillou@mines-paristech.fr> and distributed under the terms of the
    GPLv3 license.
    
    
    
    
    - Location of future releases and updates :
    
    Not known yet.
    
    
    
    
    - Copyright, patent and licence information :
    
    See GPLv3.txt
    
    
    
    
    - Tools and libraries needed to compile and use the program
    
    This program has been successfully built with gcc 8.3.0 and clang 4.0.1.
    It depends on libpng (http://www.libpng.org/pub/png/libpng.html) and has been
    successfully built with libpng 1.6.30.
    
    
    
    
    - Compilation instructions:
    
    Use make or meson/ninja.
    
    
    
    
    - Usage intructions and example:
    
    One executable is produced: paraws. The directory 'examples' contains several
    images used to test the executions of the algorithm.
    
    ./paraws [options]
    Options:
    -A | --paraws_bench           Benchs paraws
    -B | --hqws_bench             Benchs hqws
    -h | --help                   Print this help
    -i | --input_uint8            Path to uint8 input image
    -I | --input_uint16           Path to uint16 input image
    -m | --marker_uint8           Path to uint8 marker image
    -M | --marker_uint16          Path to uint16 marker image
    -N | --marker_uint32          Path to uint32 marker image
    -o | --output_uint8           Path to uint8 output image
    -O | --output_uint16          Path to uint16 output image
    -P | --output_uint32          Path to uint32 output image
    -C | --cross                  4-connex structuring element
    -S | --square                 8-connex structuring element
    -R | --cross3d                6-connex structuring element (3d)
    -U | --cube                   26-connex structuring element (3d)
    -x | --size_x                 Width dimension (only for raw images)
    -y | --size_y                 Height dimension (only for raw images)
    -z | --size_z                 Depth dimension (only for raw images)
    -w | --without_labels_limit   Ignore errors due to label number overflow
    -g | --export_RGB             Export the output image in RGB format.
    
    This program needs at least one input image, one output image and a structuring element. Only png and raw format are supported, and it should be identical for the input and the ouput. If raw format is used, dimensions must be specified. An additional markers image can be used for constrained watershed, whose type should match the output image..
    
    Examples of execution:
    
    paraws -i examples/dots.png -o examples/dots_out.png -C
    
    paraws -i examples/grains.png -o examples/grains_out.png -S
    
    paraws -i examples/lenna.png -O examples/lenna_out.png -C --export_RGB
    
    
    
    
    - Changes in the software since it was first published:
    
    This version is the sixth publication of this code.
    
    Changes include in second publication:
        - Fix label function that causes segmentation fault.
        - The executable now use a portable, reentrant, embeddable, getopt-like option parser and features a detailed usage message.
        - The linker problem with libpng has been fixed.
        - The flag -fopenmp has been added by default.
        - A concurrence race has been fixed in the distance function.
        - A concurrence race has been fixed in the paraws function.
        - Hexagonal structuring element has been desactived, as it seems to cause some troubles. It will be enable in the next release.
        - Example images have been added. Corresponding calls to the executable can be found in the file 'README.txt'.
              generate more warnings.
    
    Changes include in third publication:
        - Support markers-based watershed.
        - Fix hexagonal structuring element.
        - Add a benchmark option. 
    
    Changes include in fourth publication:
    
    Changes include in fifth publication:
        - Add RGB output.
    
    Changes include in sixth publication:
        - Bug fix that could cause a memory leak due to the popping of an empty hierarchical queue in flood.hpp
    
    - List of the files:
    
    examples: contains various test images.
    
    tests: contains unit tests that verifies the shape of the watershed lines.
    
    src: contains source files.
    
    README.txt: this file.
    
    paraws.cpp: executable that read the input image and write the output image at
    the specified location.
    
    meson_options.txt: contains meson options.
    
    meson.build: contains meson build definitions
    
    Makefile: build file.
    
    Dockerfile: docker commands
    
    GPLv3.txt: holds copyrights.
    
    common.mk: holds common flags for compilation with makefile.
    
    
    
    
    - List of known defects:
    
    The connected component labeling algorithm is not optimised.
    
    Missing doxygen documentation.
    
    This implementation does not support hexagonal structuring element yet.
    
    - Credits and acknowledgments:
    
    Petr Dokladal, thesis supervisor.
    Matthieu Faessel, thesis supervisor.
    Michel Bilodeau, thesis supervisor.
    Pierre Guillou, for the meson build system and docker file and for the git.
    Nicolas Limare, for the function, which output labeled images in RGB format. 
    

    back to top

    Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
    The source code of Software Heritage itself is available on our development forge.
    The source code files archived by Software Heritage are available under their own copyright and licenses.
    Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API