Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liberalize reg suffixes #36

Merged
merged 4 commits into from
Jun 8, 2021
Merged

Liberalize reg suffixes #36

merged 4 commits into from
Jun 8, 2021

Conversation

yoda-vid
Copy link
Collaborator

@yoda-vid yoda-vid commented Jun 5, 2021

MagellanMapper uses "registered image suffixes" for two main purposes:

  • Convenience when loading images that have been registered to another image, where the various registered images each have a different suffix (eg atlasVolume for the atlas intensity image registered to a sample image, annotation for the registered atlas labels image)
  • Overlaying different types of images, such as the atlas type for the intensity image and annotation type for the labels image

These suffixes are accessed through the --reg_suffixes command-line flag or the "Intensity" and "Labels" selection controls in the "Registered Images" section of the GUI. Registered images are identified by a base image path to which these suffixes are appended. Filenames given in the GUI are deconstructed if possible to these base and suffix components, and starting in v1.4, the same occurs for files given by command-line.

Occasionally, users may wish to load a labels image not registered to the main image, which the registered suffixes does not support. As a way to specify a non-registered path while still using the registered suffixes to load certain file types such as labels, this PR allows registered suffixes to be given as absolute paths and loaded directly, without modifying the path.

Also, an image loaded as a registered "atlas" (intensity) image takes precedence over the main intensity image, but this main image will still be loaded even if the registered atlas image is set. This loading allows any metadata from the main image to be loaded, but loading the main image could also trigger an image import or load unintended metadata. As a simplification, this PR skips loading the main image if a registered intensity image is specified.

Many of the atlas-related functions have assumed that certain registered suffixes are used, but we are slowly making these suffixes customizable through the CLI flag. This PR adds supports for this customization in the edge detection task.

yoda-vid added 4 commits June 4, 2021 17:43
- Use the labels registered image suffix when finding the labels image during edge detection, allowing users to customize the selected labels image while continuing to fall back to the main annotation image
- Allows users to not use any labels image by not supplying the `path_atlas_dir` argument and by setting the registered labels image suffix to an empty string
The registered "atlas" (intensity) image takes precedence over the main intensity image, but this main image will still be loaded even if the registered atlas image is set. This loading allows any metadata from the main image to be loaded, but loading the main image could also trigger an image import or load unintended metadata. As a simplification, skip loading the main image if a registered intensity image is specified.
Registered image suffixes have been assumed to be appended to the main image path. These suffixes are also currently the only way to load images as labels or borders. Occasionally, users may wish to load a labels image that is not registered to the main image, which the registered suffixes does not currently support. As a way to specify a non-registered path while still using the registered suffixes to load certain file types such as labels, load "registered suffixes" given as absolute paths directly, without modifying the path.
@yoda-vid yoda-vid added the enhancement New feature or request label Jun 5, 2021
@yoda-vid yoda-vid added this to the v1.5.0 milestone Jun 5, 2021
@yoda-vid yoda-vid merged commit 55954a4 into master Jun 8, 2021
@yoda-vid yoda-vid deleted the liberalize_reg_suffixes branch June 8, 2021 04:18
@yoda-vid yoda-vid mentioned this pull request Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant