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

feat(adapters): default to creation of labelmap images in 2D instead of a volume #1692

Merged

Conversation

pedrokohler
Copy link
Contributor

Context

In order to address OHIF/Viewers#3496 we're taking a two steps approach:

1 - chopping the volume data buffer array into planar data buffer arrays
2 - adopt some strategy to duplicate these planar data buffer arrays when we get overlapping segs

This PR aims to cover the first step.

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] "OS:
  • [] "Node version:
  • [] "Browser:

Copy link

stackblitz bot commented Dec 10, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 29595dc
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/676074371e1fa200082e8651
😎 Deploy Preview https://deploy-preview-1692--cornerstone-3d-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pedrokohler pedrokohler marked this pull request as ready for review December 16, 2024 18:09
pedrokohler and others added 5 commits December 16, 2024 15:26
…MSegBuffer and clean up unused code

- Updated loadSegmentation to use createFromDICOMSegBuffer for improved segmentation handling.
- Removed deprecated sliceLabelmapBufferArray function from Segmentation_4X.js.
- Cleaned up Segmentation.js to eliminate references to Segmentation_5X.
- Introduced createLabelmapsFromBufferInternal for better label map creation from segmentation buffers.
- Added comprehensive documentation for new and modified functions.
…createLabelmapsFromBufferInternal

- Modified loadSegmentation to use non-overlapping label map images for setting scalar data.
- Adjusted createLabelmapsFromBufferInternal to return labelMapImages as an array of arrays to accommodate overlapping segments.
Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

@sedghi sedghi merged commit 960b75a into cornerstonejs:main Dec 16, 2024
26 checks passed
@sedghi sedghi changed the title feat(adapters): chop volume array into chunks feat(adapters): default to creation of labelmap images in 2D instead of a volume Dec 16, 2024
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.

2 participants