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

Further segmentation efficiency improvements #285

Merged
merged 13 commits into from
May 27, 2024

Conversation

CPBridge
Copy link
Collaborator

Several important changes to improve efficiency of segmentation creation, including:

  • Avoiding unnecessary image resize operations in highdicom.seg.pyramid.create_segmentation_pyramid
  • Avoiding unnecessary construction of plane_positions when creating TILED_FULL segmentations
  • Avoiding unnecessary construction of source_plane_positions when creating segmentations under certain circumstances
  • Incrementally encoding frames of the pixel array when creating native encoded binary segmentations with bitpacking. This saves a lot of memory in some situations and saves a large allocation when the frames are concatenated at the end.
  • Using lower level pydicom functionality to avoid keyword dictionary lookups in key functions that are called in loops, in particular Segmentation._get_pffg_item and constructor of PlanePositionSequence

@CPBridge CPBridge added the enhancement New feature or request label May 27, 2024
@CPBridge CPBridge merged commit 4c151d6 into v0.23.0dev May 27, 2024
@CPBridge CPBridge deleted the tiled_segmentation_efficiency branch June 27, 2024 22:48
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