Skip to content

Update ip_points2label#219

Draft
kostrykin wants to merge 5 commits intoBMCV:masterfrom
kostrykin:dev/points2label
Draft

Update ip_points2label#219
kostrykin wants to merge 5 commits intoBMCV:masterfrom
kostrykin:dev/points2label

Conversation

@kostrykin
Copy link
Copy Markdown
Member

@kostrykin kostrykin commented Mar 29, 2026

Updates of the implementation:

  • Add --label_property parameter
  • Add --bg_label parameter
  • Add --split parameter

Updates of the XML wrapper:

  • Add label_property parameter (type text, defaults to name)
  • Add bg_label parameter (type integer, defaults to 0)
  • Add split parameter (type bool, defaults to False)
  • Update required package versions
  • Add tests for new parameters
  • Automatically choose proper dtype for output images (prefer uint8 over uint16 if possible)

Check-list for the contributor

Mandatory checks:

  • I have read the CONTRIBUTING.md document (last updated: 2026/03/06).
  • License permits unrestricted use (educational + commercial).
  • I agree to license these and all my past contributions to the Galaxy Image Analysis codebase under the MIT license.

If this PR adds or updates a tool or tool collection:

  • This PR adds a new tool or tool collection.
  • This PR updates an existing tool or tool collection.
  • Tools added/updated by this PR comply with the Guidelines below (or explain why they do not).

Guidelines for the contributor

This section is cited from the Naming and Annotation Conventions for Tools in the Image Community in Galaxy.

Naming

Generally, the name of Galaxy tools in our community should be expressive and concise, while stating the purpose of the tool as precisely as possible. Consistency of the namings of Galaxy tools is important to ensure they can be found easily. To maintain consistency, we consider phrasing names as imperatives a good practice, such as "Analyze particles" or "Perform segmentation using watershed transformation". An acknowledged exception from this rule is the names of tool wrappers of major tool suites, where the name of a tool wrapper should be chosen identically to the module or function of the tool which is wrapped (e.g., "MaskImage" in CellProfiler).

Tool description

If a Galaxy tool is a thin tool wrapper (e.g, part of a major tool suite), then the name of the wrapped tool (and only the name of the wrapped tool, subsequent to the term "with" as in "with Bioformats") should be used as the description of the tool (further examples include "with CellProfiler", "with ImageJ2", "with ImageMagick", "with SpyBOAT", "with SuperDSM"). This ensures that the tool is found by typing the name of the wrapped tool into the "Search" field on the Galaxy interface. The tool description should be empty if a tool is either not part of a major tool suite, or the main functionality of the tool is implemented in the wrapper.

Annotations

We point out that there is a global list of precedential annotations with Bio.tools identifiers (Ison et al., 2019) in Galaxy (see mappings), which may outweigh the annotations made in the XML specification of a Galaxy tool (and thus the annotations of a tool reported within the web interface of Galaxy might be divergent). However, since the precedential annotations are subject to possible changes and to avoid redundant work, we do not aim to reflect those in our specifications (those which we make in the XML specifications of Galaxy tools).

Refactor rasterize function to yield masks and labels instead of returning an image. Update main function to handle rasterization output accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant