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

Group instances into same pyramid if origin difference is below a threshold #176

Merged

Conversation

jleuschn
Copy link
Contributor

@jleuschn jleuschn commented Nov 20, 2024

Resolves #173

  • new configurable setting pyramids_origin_threshold
  • wsidicom.series.pyramids.Pyramids now groups instances into the same pyramid (greedily) if their origins differ slightly, using pyramids_origin_threshold as the threshold

@jleuschn
Copy link
Contributor Author

Some thoughts:

  • Due to the greedy nature of the matching, the order of the instances might make a difference. Should we enforce an order to avoid non-deterministic results?
  • I used a local function, is that fine, or should I refactor that e.g. into a class method (for pickle-ability)?

@jleuschn
Copy link
Contributor Author

Thanks for the comments! I incorporated them and also fixed the case in which instance.image_coordinate_system is None.

@jleuschn jleuschn changed the title Resolves #173 Group instances into same pyramid if origin difference is below a threshold Group instances into same pyramid if origin difference is below a threshold Nov 20, 2024
@erikogabrielsson
Copy link
Collaborator

Merging this although failing tests, as the fails does not seem to due to the changes.

@erikogabrielsson erikogabrielsson merged commit 6d962d8 into imi-bigpicture:main Nov 21, 2024
7 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Levels are not grouped in the same pyramid if their origins differ slightly
2 participants